X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fvnet.h;h=54988aec6675e8cb2c8ecbaa3604f372c8c3cef0;hb=7c2a3357f32ae02bcc20cdad6d87beda39f71d31;hp=9b2a8788752f8a6bf70de79df3becd57af7fdc4c;hpb=3ae2873e568dd441a22903ab9f8c7954835b0bf1;p=vpp.git diff --git a/src/vnet/vnet.h b/src/vnet/vnet.h index 9b2a8788752..54988aec667 100644 --- a/src/vnet/vnet.h +++ b/src/vnet/vnet.h @@ -40,14 +40,41 @@ #ifndef included_vnet_vnet_h #define included_vnet_vnet_h +#include + #include #include +#include #include #include #include #include +/* ip table add delete callback */ +typedef struct _vnet_ip_table_function_list_elt +{ + struct _vnet_ip_table_function_list_elt *next_ip_table_function; + clib_error_t *(*fp) (struct vnet_main_t * vnm, u32 table_id, u32 flags); +} _vnet_ip_table_function_list_elt_t; + +typedef struct +{ + /* Trace RX pkts */ + u8 pcap_rx_enable; + /* Trace TX pkts */ + u8 pcap_tx_enable; + /* Trace drop pkts */ + u8 pcap_drop_enable; + u8 pad1; + u32 max_bytes_per_pkt; + u32 pcap_sw_if_index; + pcap_main_t pcap_main; + u32 filter_classify_table_index; + vlib_is_packet_traced_fn_t *current_filter_function; + vlib_error_t pcap_error_index; +} vnet_pcap_t; + typedef struct vnet_main_t { u32 local_interface_hw_if_index; @@ -71,18 +98,24 @@ typedef struct vnet_main_t uword *interface_tag_by_sw_if_index; - /* - * Last "api" error, preserved so we can issue reasonable diagnostics - * at or near the top of the food chain - */ - vnet_api_error_t api_errno; + _vnet_ip_table_function_list_elt_t + * ip_table_add_del_functions[VNET_ITF_FUNC_N_PRIO]; + + /* pcap rx / tx tracing */ + vnet_pcap_t pcap; + + /* + * Last "api" error, preserved so we can issue reasonable diagnostics + * at or near the top of the food chain + */ + vnet_api_error_t api_errno; - vlib_main_t *vlib_main; + vlib_main_t *vlib_main; } vnet_main_t; extern vnet_main_t vnet_main; -extern vnet_main_t **vnet_mains; +#include #include #include