diff options
author | 2017-03-13 22:28:09 +0200 | |
---|---|---|
committer | 2017-03-14 11:48:46 +0200 | |
commit | af25eb9b8463225827fd38223f36a9c361f2d254 (patch) | |
tree | a730c203d0befb660501b7fdce982d6607019a62 /src/common | |
parent | 11c76dca3353e3407c907a60d9b35746f9fc96c1 (diff) |
Software mode for latency and flow stat statistics
Also supporting QinQ for flow stat
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Diffstat (limited to 'src/common')
-rwxr-xr-x | src/common/Network/Packet/EthernetHeader.h | 27 | ||||
-rwxr-xr-x | src/common/Network/Packet/EthernetHeader.inl | 10 |
2 files changed, 25 insertions, 12 deletions
diff --git a/src/common/Network/Packet/EthernetHeader.h b/src/common/Network/Packet/EthernetHeader.h index 002d6c25..cf93e850 100755 --- a/src/common/Network/Packet/EthernetHeader.h +++ b/src/common/Network/Packet/EthernetHeader.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2015-2016 Cisco Systems, Inc. +Copyright (c) 2015-2017 Cisco Systems, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -36,15 +36,16 @@ public: { enum Type { - IP = 0x0800, - VLAN = 0x8100, - ARP = 0x0806, - IPv6 = 0x86DD, - MPLS_Unicast = 0x8847, - MPLS_Multicast = 0x8848, - PPP = 0x880b, - PPPoED = 0x8863, - PPPoES = 0x8864 + IP = 0x0800, + VLAN = 0x8100, + ARP = 0x0806, + IPv6 = 0x86DD, + MPLS_Unicast = 0x8847, + MPLS_Multicast = 0x8848, + PPP = 0x880b, + PPPoED = 0x8863, + PPPoES = 0x8864, + QINQ = 0x88A8 }; }; @@ -81,7 +82,8 @@ public: // Retrieve VLAN fields for tag and protocol information inline uint16_t getVlanTag (); inline uint16_t getVlanProtocol (); - + inline uint16_t getQinQTag (); + inline uint16_t getQinQProtocol (); void dump (FILE* fd); @@ -92,7 +94,8 @@ private: uint16_t myProtocol; uint16_t myVlanTag; uint16_t myVlanProtocol; - + uint16_t myQinQTag; + uint16_t myQinQProtocol; }; #include "EthernetHeader.inl" diff --git a/src/common/Network/Packet/EthernetHeader.inl b/src/common/Network/Packet/EthernetHeader.inl index 0d6e32c9..4091b945 100755 --- a/src/common/Network/Packet/EthernetHeader.inl +++ b/src/common/Network/Packet/EthernetHeader.inl @@ -37,3 +37,13 @@ inline uint16_t EthernetHeader::getVlanTag() { return( PKT_HTONS(myVlanTag)); } + +inline uint16_t EthernetHeader::getQinQProtocol() +{ + return( PKT_HTONS(myQinQProtocol)); +} + +inline uint16_t EthernetHeader::getQinQTag() +{ + return( PKT_HTONS(myQinQTag)); +} |