16 #ifndef included_ip_table_h 17 #define included_ip_table_h 22 typedef struct _vnet_ip_table_function_list_elt
24 struct _vnet_ip_table_function_list_elt *next_ip_table_function;
26 } _vnet_ip_table_function_list_elt_t;
33 #define VNET_IP_TABLE_FUNC_N_PRIO ((vnet_ip_table_function_priority_t)VNET_IP_TABLE_FUNC_PRIORITY_HIGH+1) 35 #ifndef CLIB_MARCH_VARIANT 36 #define _VNET_IP_TABLE_FUNCTION_DECL_PRIO(f,tag,p) \ 38 static void __vnet_ip_table_function_init_##tag##_##f (void) \ 39 __attribute__((__constructor__)) ; \ 41 static void __vnet_ip_table_function_init_##tag##_##f (void) \ 43 vnet_main_t * vnm = vnet_get_main(); \ 44 static _vnet_ip_table_function_list_elt_t init_function; \ 45 init_function.next_ip_table_function = vnm->tag##_functions[p]; \ 46 vnm->tag##_functions[p] = &init_function; \ 47 init_function.fp = (void *) &f; \ 49 static void __vnet_ip_table_function_deinit_##tag##_##f (void) \ 50 __attribute__((__destructor__)) ; \ 52 static void __vnet_ip_table_function_deinit_##tag##_##f (void) \ 54 vnet_main_t * vnm = vnet_get_main(); \ 55 _vnet_ip_table_function_list_elt_t *next; \ 56 if (vnm->tag##_functions[p]->fp == f) \ 58 vnm->tag##_functions[p] = \ 59 vnm->tag##_functions[p]->next_ip_table_function; \ 62 next = vnm->tag##_functions[p]; \ 63 while (next->next_ip_table_function) \ 65 if (next->next_ip_table_function->fp == f) \ 67 next->next_ip_table_function = \ 68 next->next_ip_table_function->next_ip_table_function; \ 71 next = next->next_ip_table_function; \ 77 #define _VNET_IP_TABLE_FUNCTION_DECL_PRIO(f,tag,p) \ 78 static __clib_unused void * __clib_unused_##f = f; 81 #define _VNET_IP_TABLE_FUNCTION_DECL(f,tag) \ 82 _VNET_IP_TABLE_FUNCTION_DECL_PRIO(f,tag,VNET_ITF_FUNC_PRIORITY_LOW) 84 #define VNET_IP_TABLE_ADD_DEL_FUNCTION(f) \ 85 _VNET_IP_TABLE_FUNCTION_DECL(f,ip_table_add_del) vl_api_wireguard_peer_flags_t flags
vnet_ip_table_function_priority_t_
enum vnet_ip_table_function_priority_t_ vnet_ip_table_function_priority_t