X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip4.h;h=4c5cc054c4a2fe08af0047b70f10b913606661f2;hb=refs%2Fchanges%2F48%2F8548%2F6;hp=8f9a8e27bf538070778477663f26c182392e6b8b;hpb=fdbc38249a8c672937a74667dcfaafa2cfd292e7;p=vpp.git diff --git a/src/vnet/ip/ip4.h b/src/vnet/ip/ip4.h index 8f9a8e27bf5..4c5cc054c4a 100644 --- a/src/vnet/ip/ip4.h +++ b/src/vnet/ip/ip4.h @@ -44,6 +44,7 @@ #include #include #include +#include typedef struct ip4_mfib_t { @@ -72,6 +73,16 @@ typedef struct uword function_opaque; } ip4_add_del_interface_address_callback_t; +typedef void (ip4_table_bind_function_t) + (struct ip4_main_t * im, + uword opaque, u32 sw_if_index, u32 new_fib_index, u32 old_fib_index); + +typedef struct +{ + ip4_table_bind_function_t *function; + uword function_opaque; +} ip4_table_bind_callback_t; + /** * @brief IPv4 main type. * @@ -117,6 +128,9 @@ typedef struct ip4_main_t ip4_add_del_interface_address_callback_t * add_del_interface_address_callbacks; + /** Functions to call when interface to table biding changes. */ + ip4_table_bind_callback_t *table_bind_callbacks; + /** Template used to generate IP4 ARP packets. */ vlib_packet_template_t ip4_arp_request_packet_template; @@ -267,6 +281,12 @@ int vnet_set_ip4_flow_hash (u32 table_id, int vnet_set_ip4_classify_intfc (vlib_main_t * vm, u32 sw_if_index, u32 table_index); +void ip4_punt_policer_add_del (u8 is_add, u32 policer_index); + +void ip4_punt_redirect_add (u32 rx_sw_if_index, + u32 tx_sw_if_index, ip46_address_t * nh); +void ip4_punt_redirect_del (u32 rx_sw_if_index); + /* Compute flow hash. We'll use it to select which adjacency to use for this flow. And other things. */ always_inline u32