aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/flowperpkt-plugin/flowperpkt/flowperpkt.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-11-30 15:23:07 -0500
committerDamjan Marion <dmarion.lists@gmail.com>2016-12-01 11:27:10 +0000
commitde7f3a7791b4758fc0c2ea91dc66a27e179201ff (patch)
tree3cc5de34c4dd1fd8641b9466d082fbb8c78ab64b /plugins/flowperpkt-plugin/flowperpkt/flowperpkt.c
parent10389371b317da0cf87df383ba8431729f8f8932 (diff)
Add rx interface, ip4 src+dst to the flow-per-packet records
Change-Id: I1f49cdaf5879d9638742ed1ecc699f2e9a87f0f8 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'plugins/flowperpkt-plugin/flowperpkt/flowperpkt.c')
-rw-r--r--plugins/flowperpkt-plugin/flowperpkt/flowperpkt.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/plugins/flowperpkt-plugin/flowperpkt/flowperpkt.c b/plugins/flowperpkt-plugin/flowperpkt/flowperpkt.c
index 529b9195b46..96c930ae599 100644
--- a/plugins/flowperpkt-plugin/flowperpkt/flowperpkt.c
+++ b/plugins/flowperpkt-plugin/flowperpkt/flowperpkt.c
@@ -143,7 +143,10 @@ flowperpkt_template_rewrite (flow_report_main_t * frm,
/*
* Supported Fields:
*
+ * ingressInterface, TLV type 10, u32
* egressInterface, TLV type 14, u32
+ * sourceIpv4Address, TLV type 8, u32
+ * destinationIPv4Address, TLV type 12, u32
* ipClassOfService, TLV type 5, u8
* flowStartNanoseconds, TLV type 156, dateTimeNanoseconds (f64)
* Implementation: f64 nanoseconds since VPP started
@@ -152,8 +155,8 @@ flowperpkt_template_rewrite (flow_report_main_t * frm,
* warning: wireshark doesn't understand this TLV at all
*/
- /* Currently 4 fields */
- field_count += 4;
+ /* Currently 7 fields */
+ field_count += 7;
/* allocate rewrite space */
vec_validate_aligned (rewrite,
@@ -183,9 +186,18 @@ flowperpkt_template_rewrite (flow_report_main_t * frm,
h->domain_id = clib_host_to_net_u32 (stream->domain_id);
/* Add TLVs to the template */
+ f->e_id_length = ipfix_e_id_length (0 /* enterprise */ , ingressInterface,
+ 4);
+ f++;
f->e_id_length = ipfix_e_id_length (0 /* enterprise */ , egressInterface,
4);
f++;
+ f->e_id_length = ipfix_e_id_length (0 /* enterprise */ , sourceIPv4Address,
+ 4);
+ f++;
+ f->e_id_length = ipfix_e_id_length (0 /* enterprise */ ,
+ destinationIPv4Address, 4);
+ f++;
f->e_id_length = ipfix_e_id_length (0 /* enterprise */ , ipClassOfService,
1);
f++;