From 6d7d179632b6c551909fd805c181ae6154d21608 Mon Sep 17 00:00:00 2001 From: Peter Haag Date: Tue, 27 Aug 2024 19:53:22 +0200 Subject: [PATCH] Add src/dst tcp/udp port IE 180-183 --- src/netflow/ipfix.c | 4 ++++ src/netflow/ipfix.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/netflow/ipfix.c b/src/netflow/ipfix.c index a051af19..7b8723e7 100755 --- a/src/netflow/ipfix.c +++ b/src/netflow/ipfix.c @@ -140,10 +140,14 @@ static const struct ipfixTranslationMap_s { {IPFIX_forwardingStatus, SIZEfwdStatus, NumberCopy, EXgenericFlowID, OFFfwdStatus, STACK_NONE, "forwarding status"}, {IPFIX_tcpControlBits, SIZEtcpFlags, NumberCopy, EXgenericFlowID, OFFtcpFlags, STACK_NONE, "TCP flags"}, {IPFIX_SourceTransportPort, SIZEsrcPort, NumberCopy, EXgenericFlowID, OFFsrcPort, STACK_NONE, "src port"}, + {IPFIX_udpSourcePort, SIZEsrcPort, NumberCopy, EXgenericFlowID, OFFsrcPort, STACK_NONE, "src port"}, + {IPFIX_tcpSourcePort, SIZEsrcPort, NumberCopy, EXgenericFlowID, OFFsrcPort, STACK_NONE, "src port"}, {IPFIX_SourceIPv4Address, SIZEsrc4Addr, NumberCopy, EXipv4FlowID, OFFsrc4Addr, STACK_NONE, "src IPv4"}, {IPFIX_SourceIPv4PrefixLength, SIZEsrcMask, NumberCopy, EXflowMiscID, OFFsrcMask, STACK_NONE, "src mask IPv4"}, {IPFIX_ingressInterface, SIZEinput, NumberCopy, EXflowMiscID, OFFinput, STACK_NONE, "input interface"}, {IPFIX_DestinationTransportPort, SIZEdstPort, NumberCopy, EXgenericFlowID, OFFdstPort, STACK_DSTPORT, "dst port"}, + {IPFIX_udpDestinationPort, SIZEdstPort, NumberCopy, EXgenericFlowID, OFFdstPort, STACK_DSTPORT, "dst port"}, + {IPFIX_tcpDestinationPort, SIZEdstPort, NumberCopy, EXgenericFlowID, OFFdstPort, STACK_DSTPORT, "dst port"}, {IPFIX_DestinationIPv4Address, SIZEdst4Addr, NumberCopy, EXipv4FlowID, OFFdst4Addr, STACK_NONE, "dst IPv4"}, {IPFIX_DestinationIPv4PrefixLength, SIZEdstMask, NumberCopy, EXflowMiscID, OFFdstMask, STACK_NONE, "dst mask IPv4"}, {IPFIX_egressInterface, SIZEoutput, NumberCopy, EXflowMiscID, OFFoutput, STACK_NONE, "output interface"}, diff --git a/src/netflow/ipfix.h b/src/netflow/ipfix.h index 66efc9f1..934e0d79 100644 --- a/src/netflow/ipfix.h +++ b/src/netflow/ipfix.h @@ -294,6 +294,11 @@ typedef struct ipfix_template_elements_e_s { #define IPFIX_icmpTypeV6 178 #define IPFIX_icmpCodeV6 179 +#define IPFIX_udpSourcePort 180 +#define IPFIX_udpDestinationPort 181 +#define IPFIX_tcpSourcePort 182 +#define IPFIX_tcpDestinationPort 183 + #define IPFIX_ipTTL 192 #define IPFIX_fragmentFlags 197