From 1b6139e155e4c1c0ee5a0509f0b239a2ef372c2c Mon Sep 17 00:00:00 2001 From: Peter Haag Date: Fri, 29 Mar 2024 12:48:18 +0100 Subject: [PATCH] Add dot1q in ipfix. Fix for #515 --- src/netflow/ipfix.c | 2 ++ src/netflow/ipfix.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/netflow/ipfix.c b/src/netflow/ipfix.c index a172b0af..debe4893 100755 --- a/src/netflow/ipfix.c +++ b/src/netflow/ipfix.c @@ -173,6 +173,8 @@ static const struct ipfixTranslationMap_s { {IPFIX_postDestinationMacAddress, SIZEoutDstMac, NumberCopy, EXmacAddrID, OFFoutDstMac, STACK_NONE, "out dst MAC addr"}, {IPFIX_vlanId, SIZEsrcVlan, NumberCopy, EXvLanID, OFFsrcVlan, STACK_NONE, "src VLAN ID"}, {IPFIX_postVlanId, SIZEdstVlan, NumberCopy, EXvLanID, OFFdstVlan, STACK_NONE, "dst VLAN ID"}, + {IPFIX_dot1qVlanId, SIZEsrcVlan, NumberCopy, EXvLanID, OFFsrcVlan, STACK_NONE, "src VLAN ID"}, + {IPFIX_postDot1qVlanId, SIZEdstVlan, NumberCopy, EXvLanID, OFFdstVlan, STACK_NONE, "dst VLAN ID"}, {IPFIX_flowDirection, SIZEdir, NumberCopy, EXflowMiscID, OFFdir, STACK_NONE, "flow direction"}, {IPFIX_biflowDirection, SIZEbiFlowDir, NumberCopy, EXflowMiscID, OFFbiFlowDir, STACK_NONE, "biFlow direction"}, {IPFIX_flowEndReason, SIZEflowEndReason, NumberCopy, EXflowMiscID, OFFflowEndReason, STACK_NONE, "Flow end reason"}, diff --git a/src/netflow/ipfix.h b/src/netflow/ipfix.h index e6bb664d..dc6607ba 100644 --- a/src/netflow/ipfix.h +++ b/src/netflow/ipfix.h @@ -306,6 +306,9 @@ typedef struct ipfix_template_elements_e_s { #define IPFIX_biflowDirection 239 +#define IPFIX_dot1qVlanId 243 +#define IPFIX_postDot1qVlanId 254 + // sub template IDs #define IPFIX_newconnections 278 #define IPFIX_subTemplateList 292