#include <vlibapi/api.h>
#include <vlibmemory/api.h>
-#include <vlibsocket/api.h>
/* define message IDs */
#include <flowprobe/flowprobe_msg_enum.h>
#undef vl_printfun
flowprobe_main_t flowprobe_main;
-vlib_node_registration_t flowprobe_walker_node;
static vlib_node_registration_t flowprobe_timer_node;
uword flowprobe_walker_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
vlib_frame_t * f);
static inline ipfix_field_specifier_t *
flowprobe_template_common_fields (ipfix_field_specifier_t * f)
{
-#define flowprobe_template_common_field_count() 3
+#define flowprobe_template_common_field_count() 5
/* ingressInterface, TLV type 10, u32 */
f->e_id_length = ipfix_e_id_length (0 /* enterprise */ ,
ingressInterface, 4);
packetDeltaCount, 8);
f++;
+ /* flowStartNanoseconds, TLV type 156, u64 */
+ f->e_id_length = ipfix_e_id_length (0 /* enterprise */ ,
+ flowStartNanoseconds, 8);
+ f++;
+
+ /* flowEndNanoseconds, TLV type 157, u64 */
+ f->e_id_length = ipfix_e_id_length (0 /* enterprise */ ,
+ flowEndNanoseconds, 8);
+ f++;
+
return f;
}
static inline ipfix_field_specifier_t *
flowprobe_template_l4_fields (ipfix_field_specifier_t * f)
{
-#define flowprobe_template_l4_field_count() 2
+#define flowprobe_template_l4_field_count() 3
/* sourceTransportPort, TLV type 7, u16 */
f->e_id_length = ipfix_e_id_length (0 /* enterprise */ ,
sourceTransportPort, 2);
f->e_id_length = ipfix_e_id_length (0 /* enterprise */ ,
destinationTransportPort, 2);
f++;
+ /* tcpControlBits, TLV type 6, u16 */
+ f->e_id_length = ipfix_e_id_length (0 /* enterprise */ ,
+ tcpControlBits, 2);
+ f++;
+
return f;
}
flow_report_t * fr,
ip4_address_t * collector_address,
ip4_address_t * src_address,
- u16 collector_port)
+ u16 collector_port,
+ ipfix_report_element_t * elts,
+ u32 n_elts, u32 * stream_index)
{
return flowprobe_template_rewrite_inline
(frm, fr, collector_address, src_address, collector_port,
flow_report_t * fr,
ip4_address_t * collector_address,
ip4_address_t * src_address,
- u16 collector_port)
+ u16 collector_port,
+ ipfix_report_element_t * elts,
+ u32 n_elts, u32 * stream_index)
{
return flowprobe_template_rewrite_inline
(frm, fr, collector_address, src_address, collector_port,
flow_report_t * fr,
ip4_address_t * collector_address,
ip4_address_t * src_address,
- u16 collector_port)
+ u16 collector_port,
+ ipfix_report_element_t * elts,
+ u32 n_elts, u32 * stream_index)
{
return flowprobe_template_rewrite_inline
(frm, fr, collector_address, src_address, collector_port,
flow_report_t * fr,
ip4_address_t * collector_address,
ip4_address_t * src_address,
- u16 collector_port)
+ u16 collector_port,
+ ipfix_report_element_t * elts,
+ u32 n_elts, u32 * stream_index)
{
return flowprobe_template_rewrite_inline
(frm, fr, collector_address, src_address, collector_port,
flow_report_t * fr,
ip4_address_t * collector_address,
ip4_address_t * src_address,
- u16 collector_port)
+ u16 collector_port,
+ ipfix_report_element_t * elts,
+ u32 n_elts, u32 * stream_index)
{
return flowprobe_template_rewrite_inline
(frm, fr, collector_address, src_address, collector_port,
fm->vlib_time_0 = vlib_time_now (vm);
fm->nanosecond_time_0 = unix_time_now_nsec ();
- memset (fm->template_reports, 0, sizeof (fm->template_reports));
- memset (fm->template_size, 0, sizeof (fm->template_size));
- memset (fm->template_per_flow, 0, sizeof (fm->template_per_flow));
+ clib_memset (fm->template_reports, 0, sizeof (fm->template_reports));
+ clib_memset (fm->template_size, 0, sizeof (fm->template_size));
+ clib_memset (fm->template_per_flow, 0, sizeof (fm->template_per_flow));
/* Decide how many worker threads we have */
num_threads = 1 /* main thread */ + tm->n_threads;