|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
33 #include <vnet/ipfix-export/ipfix_export.api_enum.h>
34 #include <vnet/ipfix-export/ipfix_export.api_types.h>
36 #define REPLY_MSG_ID_BASE frm->msg_id_base
45 vl_api_set_ipfix_exporter_reply_t *rmp;
47 u16 collector_port = UDP_DST_PORT_ipfix;
49 u32 template_interval;
62 rv = VNET_API_ERROR_UNIMPLEMENTED;
68 if (collector_port == (
u16) ~ 0)
69 collector_port = UDP_DST_PORT_ipfix;
71 fib_id = ntohl (mp->
vrf_id);
83 rv = VNET_API_ERROR_NO_SUCH_FIB;
93 if (template_interval == ~0)
94 template_interval = 20;
97 if (collector.
as_u32 != 0 &&
src.as_u32 == 0)
99 rv = VNET_API_ERROR_INVALID_VALUE;
105 rv = VNET_API_ERROR_INVALID_VALUE;
111 rv = VNET_API_ERROR_INVALID_VALUE;
143 ip46_address_t collector = {.as_u64[0] = 0,.as_u64[1] = 0 };
144 ip46_address_t
src = {.as_u64[0] = 0,.as_u64[1] = 0 };
153 rmp->_vl_msg_id =
ntohs (VL_API_IPFIX_EXPORTER_DETAILS);
180 vl_api_set_ipfix_classify_stream_reply_t *rmp;
201 REPLY_MACRO (VL_API_SET_IPFIX_CLASSIFY_STREAM_REPLY);
218 rmp->_vl_msg_id =
ntohs (VL_API_IPFIX_CLASSIFY_STREAM_DETAILS);
230 vl_api_ipfix_classify_table_add_del_reply_t *rmp;
239 u8 transport_protocol;
254 rv = VNET_API_ERROR_UNSPECIFIED;
274 rv = VNET_API_ERROR_VALUE_EXIST;
284 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
302 if (is_add == 0 || (
rv && is_add))
306 REPLY_MACRO (VL_API_SET_IPFIX_CLASSIFY_STREAM_REPLY);
320 mp->_vl_msg_id =
ntohs (VL_API_IPFIX_CLASSIFY_TABLE_DETAILS);
350 vl_api_ipfix_flush_reply_t *rmp;
366 #include <vnet/ipfix-export/ipfix_export.api.c>
IPFIX classify stream dump request.
vnet_interface_main_t * im
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
flow_report_main_t flow_report_main
vl_api_address_family_t ip_version
void ip4_address_decode(const vl_api_ip4_address_t in, ip4_address_t *out)
ip4_main_t ip4_main
Global ip4 main structure.
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static void vl_api_ipfix_classify_stream_dump_t_handler(vl_api_ipfix_classify_stream_dump_t *mp)
IPFIX add or delete classifier table request.
VLIB_API_INIT_FUNCTION(hw_flow_api_hookup)
static clib_error_t * flow_api_hookup(vlib_main_t *vm)
int vnet_stream_change(flow_report_main_t *frm, u32 old_domain_id, u16 old_src_port, u32 new_domain_id, u16 new_src_port)
static void vl_api_ipfix_classify_table_dump_t_handler(vl_api_ipfix_classify_table_dump_t *mp)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vl_api_address_t src_address
ipfix_classify_table_t * tables
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
static void vl_api_ipfix_classify_table_add_del_t_handler(vl_api_ipfix_classify_table_add_del_t *mp)
vl_api_address_t collector_address
Reply to IPFIX exporter dump request.
static void vl_api_ipfix_flush_t_handler(vl_api_ipfix_flush_t *mp)
void vnet_flow_reports_reset(flow_report_main_t *frm)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vl_api_ip_proto_t transport_protocol
static_always_inline u8 ipfix_classify_table_index_valid(u32 index)
An API client registration, only in vpp/vlib.
static void setup_message_id_table(api_main_t *am)
vlib_frame_t * ipfix_classify_send_flows(flow_report_main_t *frm, flow_report_t *fr, vlib_frame_t *f, u32 *to_next, u32 node_index)
IPFIX classify tables dump request.
ip4_address_t ipfix_collector
vl_api_address_t src_address
vl_api_ip_proto_t transport_protocol
vnet_flow_data_callback_t * flow_data_callback
vl_api_ip_port_and_mask_t src_port
static void vl_api_ipfix_exporter_dump_t_handler(vl_api_ipfix_exporter_dump_t *mp)
IPFIX classify stream configure request.
flow_report_classify_main_t flow_report_classify_main
static void vl_api_set_ipfix_exporter_t_handler(vl_api_set_ipfix_exporter_t *mp)
ip4_address_t src_address
#define REPLY_MSG_ID_BASE
u8 * ipfix_classify_template_rewrite(flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, ipfix_report_element_t *elts, u32 n_elts, u32 *stream_index)
Configure IPFIX exporter process request.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
static vlib_main_t * vlib_get_main(void)
vlib_node_registration_t flow_report_process_node
(constructor) VLIB_REGISTER_NODE (flow_report_process_node)
vl_api_address_family_t ip_version
IPFIX exporter dump request.
static void vl_api_set_ipfix_classify_stream_t_handler(vl_api_set_ipfix_classify_stream_t *mp)
int vnet_flow_report_add_del(flow_report_main_t *frm, vnet_flow_report_add_del_args_t *a, u16 *template_id)
static_always_inline ipfix_classify_table_t * ipfix_classify_add_table(void)
u16 udp_checksum(udp_header_t *uh, u32 udp_len, void *ih, u8 version)
vl_api_address_t collector_address
static_always_inline void ipfix_classify_delete_table(u32 index)
vnet_flow_rewrite_callback_t * rewrite_callback
Reply to IPFIX classify tables dump request.
Reply to IPFIX classify stream dump request.
void * vl_msg_api_alloc(int nbytes)
static void send_ipfix_classify_table_details(u32 table_index, vl_api_registration_t *reg, u32 context)