diff options
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/ip/ip.api | 18 | ||||
-rw-r--r-- | src/vnet/ip/ip_api.c | 10 | ||||
-rw-r--r-- | src/vnet/mpls/mpls.api | 14 | ||||
-rw-r--r-- | src/vnet/mpls/mpls_api.c | 17 |
4 files changed, 59 insertions, 0 deletions
diff --git a/src/vnet/ip/ip.api b/src/vnet/ip/ip.api index fa363370c56..e57c2fe177d 100644 --- a/src/vnet/ip/ip.api +++ b/src/vnet/ip/ip.api @@ -19,6 +19,24 @@ called through a shared memory interface. */ +/** \brief Add / del table request + A table can be added multiple times, but need be deleted only once. + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param is_ipv6 - V4 or V6 table + @param table_id - table ID associated with the route + This table ID will apply to both the unicats + and mlticast FIBs +*/ +autoreply define ip_table_add_del +{ + u32 client_index; + u32 context; + u32 table_id; + u8 is_ipv6; + u8 is_add; +}; + /** \brief Dump IP fib table @param client_index - opaque cookie to identify the sender */ diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c index 0676a38704f..bba65ab4923 100644 --- a/src/vnet/ip/ip_api.c +++ b/src/vnet/ip/ip_api.c @@ -69,6 +69,7 @@ _(IP_ADDRESS_DUMP, ip_address_dump) \ _(IP_DUMP, ip_dump) \ _(IP_NEIGHBOR_ADD_DEL, ip_neighbor_add_del) \ _(IP_ADD_DEL_ROUTE, ip_add_del_route) \ +_(IP_TABLE_ADD_DEL, ip_table_add_del) \ _(SET_IP_FLOW_HASH,set_ip_flow_hash) \ _(SW_INTERFACE_IP6ND_RA_CONFIG, sw_interface_ip6nd_ra_config) \ _(SW_INTERFACE_IP6ND_RA_PREFIX, sw_interface_ip6nd_ra_prefix) \ @@ -698,6 +699,15 @@ vl_api_ip_neighbor_add_del_t_handler (vl_api_ip_neighbor_add_del_t * mp, REPLY_MACRO (VL_API_IP_NEIGHBOR_ADD_DEL_REPLY); } +void +vl_api_ip_table_add_del_t_handler (vl_api_ip_table_add_del_t * mp) +{ + vl_api_ip_table_add_del_reply_t *rmp; + int rv = 0; + + REPLY_MACRO (VL_API_IP_TABLE_ADD_DEL_REPLY); +} + int add_del_route_t_handler (u8 is_multipath, u8 is_add, diff --git a/src/vnet/mpls/mpls.api b/src/vnet/mpls/mpls.api index 5973a0a6cbd..bb849998ab3 100644 --- a/src/vnet/mpls/mpls.api +++ b/src/vnet/mpls/mpls.api @@ -139,6 +139,20 @@ manual_endian manual_print define mpls_tunnel_details /** \brief MPLS Route Add / del route @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request + @param mt_table_id - The MPLS table-id the route is added in + @param mt_is_add - Is this a route add or delete +*/ +autoreply define mpls_table_add_del +{ + u32 client_index; + u32 context; + u32 mt_table_id; + u8 mt_is_add; +}; + +/** \brief MPLS Route Add / del route + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request @param mr_label - The MPLS label value @param mr_eos - The End of stack bit @param mr_table_id - The MPLS table-id the route is added in diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c index 737299e6a2b..2af6af8fd48 100644 --- a/src/vnet/mpls/mpls_api.c +++ b/src/vnet/mpls/mpls_api.c @@ -50,6 +50,7 @@ #define foreach_vpe_api_msg \ _(MPLS_IP_BIND_UNBIND, mpls_ip_bind_unbind) \ _(MPLS_ROUTE_ADD_DEL, mpls_route_add_del) \ +_(MPLS_TABLE_ADD_DEL, mpls_table_add_del) \ _(MPLS_TUNNEL_ADD_DEL, mpls_tunnel_add_del) \ _(MPLS_TUNNEL_DUMP, mpls_tunnel_dump) \ _(MPLS_FIB_DUMP, mpls_fib_dump) @@ -57,6 +58,22 @@ _(MPLS_FIB_DUMP, mpls_fib_dump) extern void stats_dslock_with_hint (int hint, int tag); extern void stats_dsunlock (void); +void +vl_api_mpls_table_add_del_t_handler (vl_api_mpls_table_add_del_t * mp) +{ + vl_api_mpls_table_add_del_reply_t *rmp; + vnet_main_t *vnm; + int rv = 0; + + vnm = vnet_get_main (); + vnm->api_errno = 0; + + + rv = (rv == 0) ? vnm->api_errno : rv; + + REPLY_MACRO (VL_API_MPLS_TABLE_ADD_DEL_REPLY); +} + static int mpls_ip_bind_unbind_handler (vnet_main_t * vnm, vl_api_mpls_ip_bind_unbind_t * mp) |