Skip to content

Commit 0065bd9

Browse files
committed
Template parser: add more biflow field mapping (src <-> dst) for IANA elements
1 parent 965631c commit 0065bd9

1 file changed

Lines changed: 27 additions & 8 deletions

File tree

src/template_mgr/template.c

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -802,14 +802,33 @@ template_ies_biflow_src2dst(const fds_iemgr_t *iemgr, uint32_t pen, uint16_t *id
802802
uint16_t src_id; // Source Field
803803
uint16_t dst_id; // Destination Field
804804
} pairs[] = {
805-
{ 7, 11}, // sourceTransportPort X destinationTransportPort
806-
{ 8, 12}, // sourceIPv4Address X destinationIPv4Address
807-
{ 9, 13}, // sourceIPv4PrefixLength X destinationIPv4PrefixLength
808-
{ 27, 28}, // sourceIPv6Address X destinationIPv6Address
809-
{ 29, 30}, // sourceIPv6PrefixLength X destinationIPv6PrefixLength
810-
{ 44, 45}, // sourceIPv4Prefix X destinationIPv4Prefix
811-
{ 56, 80}, // sourceMacAddress X destinationMacAddress
812-
{170, 169} // sourceIPv6Prefix X destinationIPv6Prefix
805+
{ 7, 11}, // sourceTransportPort X destinationTransportPort
806+
{ 8, 12}, // sourceIPv4Address X destinationIPv4Address
807+
{ 9, 13}, // sourceIPv4PrefixLength X destinationIPv4PrefixLength
808+
{ 10, 14}, // ingressInterface X egressInterface
809+
{ 16, 17}, // bgpSourceAsNumber X bgpDestinationAsNumber
810+
{ 27, 28}, // sourceIPv6Address X destinationIPv6Address
811+
{ 29, 30}, // sourceIPv6PrefixLength X destinationIPv6PrefixLength
812+
{ 44, 45}, // sourceIPv4Prefix X destinationIPv4Prefix
813+
{ 56, 80}, // sourceMacAddress X destinationMacAddress
814+
{ 58, 59}, // vlanId X postVlanId
815+
{ 81, 57}, // postSourceMacAddress X postDestinationMacAddress
816+
{ 92, 93}, // srcTrafficIndex X dstTrafficIndex
817+
{128, 129}, // bgpNextAdjacentAsNumber X bgpPrevAdjacentAsNumber
818+
{170, 169}, // sourceIPv6Prefix X destinationIPv6Prefix
819+
{180, 181}, // udpSourcePort X udpDestinationPort
820+
{182, 183}, // tcpSourcePort X tcpDestinationPort
821+
{225, 226}, // postNATSourceIPv4Address X postNATDestinationIPv4Address
822+
{227, 228}, // postNAPTSourceTransportPort X postNAPTDestinationTransportPort
823+
{234, 235}, // ingressVRFID X egressVRFID
824+
{281, 282}, // postNATSourceIPv6Address X postNATDestinationIPv6Address
825+
// Note: (ingress/egress)(Unicast/Multicast/Broadcast)PacketTotalCount ignored
826+
{368, 369}, // ingressInterfaceType X egressInterfaceType
827+
{414, 415}, // dot1qCustomerSourceMacAddress X dot1qCustomerDestinationMacAddress
828+
// Note: sourceTransportPortsLimit doesn't have its counterpart
829+
{484, 485}, // bgpSourceCommunityList X bgpDestinationCommunityList
830+
{487, 488}, // bgpSourceExtendedCommunityList X bgpDestinationExtendedCommunityList
831+
{490, 491} // bgpSourceLargeCommunityList X bgpDestinationLargeCommunityList
813832
};
814833

815834
uint16_t new_id = 0;

0 commit comments

Comments
 (0)