8 #include <netinet/in.h>
9 #include <netinet/ip6.h>
10 #include <netinet/icmp6.h>
27 #include "pkt/pkt_types.h"
35 #define PKT_TRACE(obj, arg) \
37 std::ostringstream _str; \
39 Pkt##obj::TraceMsg(PacketTraceBuf, __FILE__, __LINE__, _str.str()); \
46 inline bool IsBfdkeepalivePkt(
const AgentHdr &hdr)
49 if ((hdr.
cmd == AGENT_TRAP_BFD) && (hdr.
cmd_param == 0xc0)) {
58 stats_(), agent_(agent), pkt_module_(pkt_module),
59 work_queue_(
TaskScheduler::GetInstance()->GetTaskId(
"Agent::PktHandler"), 0,
60 boost::bind(&
PktHandler::ProcessPacket, this, _1)),
61 work_queue_bfd_ka_(
TaskScheduler::GetInstance()->GetTaskId(
"Agent::BFD_KA"), 0,
62 boost::bind(&
PktHandler::ProcessBfdDataPacket, this, _1))
122 const VlanNH *vlan_nh =
static_cast<const VlanNH *
>(nh);
147 uint16_t sport = pkt->
sport;
157 if (pkt->
ip_proto == IPPROTO_ICMPV6) {
158 protocol = IPPROTO_ICMP;
209 (uint16_t *)&pkt->
sport,
210 (uint16_t *) &pkt->
dport,
222 pkt_info->
ip_proto == IPPROTO_UDP &&
235 pkt_info->
ip_proto == IPPROTO_ICMP) {
252 int len = 0, ret = 0;
270 if (pkt_info->
ip_proto == IPPROTO_UDP &&
272 (pkt_info->
data[0] & 0x20)) {
336 if (is_flow_packet) {
342 PKT_TRACE(Err,
"Flow trap for non-IP packet for interface "
343 "index <" << hdr.
ifindex <<
">");
414 boost::shared_ptr<PacketBufferEnqueueItem>
419 if (IsBfdkeepalivePkt(hdr)) {
430 boost::shared_ptr<PktInfo> pkt_info (
new PktInfo(buff));
431 uint8_t *pkt = buff->data();
445 uint8_t *pkt = buff->data();
454 PKT_TRACE(Err,
"BFD proto_list is not Initialized. Ignoring");
458 boost::shared_ptr<PktInfo> pkt_info (
new PktInfo(buff));
461 pkt_info->is_bfd_keepalive =
true;
462 pkt_info->packet_buffer()->set_module(mod);
473 boost::shared_ptr<PktInfo> pkt_info,
475 pkt_info->packet_buffer()->set_module(mod);
506 pkt_info->
dmac == intf->
mac()) {
517 struct ip *ip_hdr = (
struct ip *)pkt;
530 pkt_info->
eth = (
struct ether_header *) (pkt + len);
534 len +=
sizeof(
struct ether_header);
537 while (pkt_info->
ether_type == ETHERTYPE_VLAN ||
539 pkt_info->
ether_type = ntohs(*((uint16_t *)(pkt + len + 2)));
545 pkt_info->
pbb_header = (uint32_t *)(pkt + len);
558 uint16_t ip_payload_len = 0;
560 struct ip *ip = (
struct ip *)(pkt + len);
566 pkt_info->
ttl = ip->ip_ttl;
567 uint8_t ip_header_len = (ip->ip_hl << 2);
568 ip_payload_len = ip->ip_len - ip_header_len;
569 len += ip_header_len;
570 }
else if (pkt_info->
ether_type == ETHERTYPE_IPV6) {
572 ip6_hdr *ip = (ip6_hdr *)(pkt + len);
575 Ip6Address::bytes_type addr;
577 for (
int i = 0; i < 16; i++) {
578 addr[i] = ip->ip6_src.s6_addr[i];
582 for (
int i = 0; i < 16; i++) {
583 addr[i] = ip->ip6_dst.s6_addr[i];
586 pkt_info->
ttl = ip->ip6_hlim;
588 uint8_t proto = ip->ip6_ctlun.ip6_un1.ip6_un1_nxt;
589 len +=
sizeof(ip6_hdr);
590 if (proto == IPPROTO_FRAGMENT) {
591 ip6_frag *nxt = (ip6_frag *)(pkt + len);
592 proto = nxt->ip6f_nxt;
593 len +=
sizeof(ip6_frag);
606 pkt_info->
transp.
udp = (udphdr *) (pkt + len);
607 len +=
sizeof(udphdr);
608 pkt_info->
data = (pkt + len);
617 pkt_info->
transp.
tcp = (tcphdr *) (pkt + len);
618 len +=
sizeof(tcphdr);
619 pkt_info->
data = (pkt + len);
628 case IPPROTO_SCTP : {
631 pkt_info->
data = (pkt + len);
639 pkt_info->
transp.
icmp = (
struct icmp *) (pkt + len);
642 struct icmp *icmp = (
struct icmp *)(pkt + len);
644 pkt_info->
dport = htons(icmp->icmp_type);
645 if (icmp->icmp_type == ICMP_ECHO || icmp->icmp_type == ICMP_ECHOREPLY) {
646 pkt_info->
dport = ICMP_ECHOREPLY;
647 pkt_info->
sport = htons(icmp->icmp_id);
648 pkt_info->
data = (pkt + len + ICMP_MINLEN);
649 uint16_t icmp_payload_len = ip_payload_len - ICMP_MINLEN;
652 string value(ad->
data_, (
sizeof(ad->
data_) - 1));
653 if (value.compare(0, (
sizeof(ad->
data_) - 1),
659 ((icmp->icmp_type == ICMP_DEST_UNREACH) ||
660 (icmp->icmp_type == ICMP_TIME_EXCEEDED))) {
664 if(
ParseIpPacket(pkt_info, pkt_type, pkt + len +
sizeof(icmp)) == -1) {
671 if (pkt_info->
ip_proto != IPPROTO_ICMP) {
672 uint16_t port = pkt_info->
sport;
674 pkt_info->
dport = port;
682 case IPPROTO_ICMPV6: {
684 icmp6_hdr *icmp = (icmp6_hdr *)(pkt + len);
687 pkt_info->
dport = htons(icmp->icmp6_type);
688 if (icmp->icmp6_type == ICMP6_ECHO_REQUEST ||
689 icmp->icmp6_type == ICMP6_ECHO_REPLY) {
690 pkt_info->
dport = ICMP6_ECHO_REPLY;
691 pkt_info->
sport = htons(icmp->icmp6_id);
693 icmp->icmp6_type < ICMP6_ECHO_REQUEST) {
697 if(
ParseIpPacket(pkt_info, pkt_type, pkt + len +
sizeof(icmp)) == -1) {
704 if (pkt_info->
ip_proto != IPPROTO_ICMPV6) {
705 uint16_t port = pkt_info->
sport;
707 pkt_info->
dport = port;
716 pkt_info->
transp.
igmp = (
struct igmp *) (pkt + len);
721 pkt_info->
data = (pkt + len);
741 uint32_t *control_word = (uint32_t *)(pkt);
745 sizeof(udphdr) +
sizeof(ip);
747 }
else if (pkt_info->
l3_label ==
false) {
748 bool layer2_control_word =
false;
752 layer2_control_word =
true;
758 layer2_control_word =
true;
761 const VrfNH *vrf_nh =
764 layer2_control_word =
true;
768 uint32_t *control_word = (uint32_t *)(pkt);
782 uint32_t mpls_host = ntohl(hdr->
hdr);
783 pkt_info->
tunnel.
label = (mpls_host & 0xFFFFF000) >> 12;
784 uint32_t ret =
sizeof(
MplsHdr);
786 if ((mpls_host & 0x100) == 0) {
788 if (((mpls_host & 0xFFFFF000) >> 12) !=
791 PKT_TRACE(Err,
"Unexpected MPLS Label Stack. Ignoring");
795 mpls_host = ntohl(hdr->
hdr);
796 pkt_info->
tunnel.
label = (mpls_host & 0xFFFFF000) >> 12;
797 if ((mpls_host & 0x100) == 0) {
799 PKT_TRACE(Err,
"Unexpected MPLS Label Stack. Ignoring");
812 PKT_TRACE(Err,
"Invalid MPLS Label <" << label <<
">. Ignoring");
829 if (vrf_nh && vrf_nh->
bridge_nh() ==
true) {
840 if (gre->
protocol != ntohs(VR_GRE_PROTO_MPLS)) {
884 int len =
sizeof(vxlan);
906 if (((pkt_info->
ip_proto == IPPROTO_ICMP) ||
907 (pkt_info->
ip_proto == IPPROTO_IGMP)) && (!pkt_info->
ip)) {
913 if ((pkt_info->
ip_proto == IPPROTO_ICMPV6) && (!pkt_info->
ip6)) {
921 int len = 0, ret = 0;
929 pkt_info->
arp = (ether_arp *) (pkt + len);
932 uint8_t data[
sizeof(in_addr_t)];
935 memcpy(bytes.data, pkt_info->
arp->arp_spa,
sizeof(in_addr_t));
936 in_addr_t spa = ntohl(bytes.addr);
944 pkt_info->
data = (pkt + len);
974 }
else if (!pkt_ok) {
1017 if (tunnel_len < 0) {
1024 if (tunnel_len == 0) {
1031 if (((pkt + len)[0] & 0x60) == 0x60) {
1056 boost::shared_ptr<PktInfo> pkt_info(
new PktInfo(mod, msg));
1058 PKT_TRACE(Err,
"Threshold exceeded while enqueuing IPC Message <" <<
1066 uint16_t offset = htons(pkt_info->
ip->ip_off);
1067 if (((offset & IP_MF) || (offset & IP_OFFMASK)) &&
1070 }
else if (pkt_info->
ip6) {
1071 uint8_t proto = pkt_info->
ip6->ip6_ctlun.ip6_un1.ip6_un1_nxt;
1072 if (proto == IPPROTO_FRAGMENT) {
1102 if (
agent()->tsn_enabled() ==
false)
1105 if (ip.is_v4() ==
false)
1127 ComponentNHList::const_iterator it = nh->
begin();
1128 while (it != nh->
end()) {
1131 if (tor_nh == NULL) {
1142 ComponentNHList::const_iterator tor_it = tor_nh->
begin();
1143 while (tor_it != tor_nh->
end()) {
1146 if (tun_nh == NULL) {
1150 if (*tun_nh->
GetDip() == ip4) {
1182 memcpy(addr.ether_addr_octet, pkt_info->
eth->ether_shost, ETH_ALEN);
1190 if(bridge_table == NULL) {
1196 if (vm_intf == NULL) {
1212 pkt_info->
arp = (ether_arp *) pkt;
1220 pkt_info->
data = pkt;
1271 else if (dst_ip.is_v4() && vm_intf->
primary_ip_addr().is_unspecified())
1276 const std::vector<VnIpam> &ipam = vn->
GetVnIpam();
1277 for (
unsigned int i = 0; i < ipam.size(); ++i) {
1278 if (dst_ip.is_v4()) {
1279 if (!ipam[i].IsV4()) {
1282 if (ipam[i].default_gw == dst_ip ||
1283 ipam[i].dns_server == dst_ip) {
1287 if (!ipam[i].IsV6()) {
1290 if (ipam[i].default_gw == dst_ip ||
1291 ipam[i].dns_server == dst_ip) {
1305 PKT_TRACE(Err,
"Invalid interface index <" << ifindex <<
">");
1333 q_threshold_exceeded[mod]++;
1340 pkt(buff->data()), len(buff->data_len()), max_pkt_len(buff->buffer_len()),
1342 ether_type(-1), ip_saddr(), ip_daddr(), ip_proto(), sport(), dport(),
1343 ttl(0), icmp_chksum(0), tcp_ack(false), tunnel(),
1344 l3_label(false), is_bfd_keepalive(false), is_segment_hc_pkt(false),
1345 ignore_address(
VmInterface::IGNORE_NONE), same_port_number(false),
1346 is_fat_flow_src_prefix(false), ip_ff_src_prefix(),
1347 is_fat_flow_dst_prefix(false), ip_ff_dst_prefix(),
1348 eth(), arp(), ip(), ip6(), packet_buffer_(buff) {
1353 pkt(buff->data()), len(buff->data_len()), max_pkt_len(buff->buffer_len()),
1355 agent_hdr(hdr), ether_type(-1), ip_saddr(), ip_daddr(), ip_proto(), sport(),
1356 dport(), ttl(0), icmp_chksum(0), tcp_ack(false), tunnel(),
1357 l3_label(false), is_bfd_keepalive(false), is_segment_hc_pkt(false),
1358 ignore_address(
VmInterface::IGNORE_NONE), same_port_number(false),
1359 is_fat_flow_src_prefix(false), ip_ff_src_prefix(),
1360 is_fat_flow_dst_prefix(false), ip_ff_dst_prefix(),
1361 eth(), arp(), ip(), ip6(), packet_buffer_(buff) {
1368 len(), max_pkt_len(), data(), ipc(), family(
Address::UNSPEC),
1370 ip_proto(), sport(), dport(), ttl(0), icmp_chksum(0), tcp_ack(false),
1371 tunnel(), l3_label(false), is_bfd_keepalive(false), is_segment_hc_pkt(false),
1372 ignore_address(
VmInterface::IGNORE_NONE), same_port_number(false),
1373 is_fat_flow_src_prefix(false), ip_ff_src_prefix(),
1374 is_fat_flow_dst_prefix(false), ip_ff_dst_prefix(),
1375 eth(),arp(), ip(), ip6() {
1378 (
module, buff_len, mdata);
1388 pkt(), len(), max_pkt_len(0), data(), ipc(msg), family(
Address::UNSPEC),
1389 type(
PktType::MESSAGE), agent_hdr(), ether_type(-1), ip_saddr(), ip_daddr(),
1390 ip_proto(), sport(), dport(), ttl(0), icmp_chksum(0), tcp_ack(false),
1391 tunnel(), l3_label(false), is_bfd_keepalive(false), is_segment_hc_pkt(false),
1392 ignore_address(
VmInterface::IGNORE_NONE), same_port_number(false),
1393 is_fat_flow_src_prefix(false), ip_ff_src_prefix(),
1394 is_fat_flow_dst_prefix(false), ip_ff_dst_prefix(),
1395 eth(), arp(), ip(), ip6(), packet_buffer_() {
1413 (module, len, mdata);
1425 eth = (
struct ether_header *)(
pkt);
1427 transp.tcp = (
struct tcphdr *)(
ip + 1);
1432 std::size_t seed = 0;
1449 boost::hash_combine(seed, agent->
router_id().to_ulong());
1454 boost::hash_combine(seed,
ip_saddr.to_v4().to_ulong());
1457 boost::hash_combine(seed,
ip_daddr.to_v4().to_ulong());
1462 memcpy(words,
ip_saddr.to_v6().to_bytes().data(),
sizeof(words));
1463 boost::hash_combine(seed, words[0]);
1464 boost::hash_combine(seed, words[1]);
1465 boost::hash_combine(seed, words[2]);
1466 boost::hash_combine(seed, words[3]);
1471 memcpy(words,
ip_daddr.to_v6().to_bytes().data(),
sizeof(words));
1472 boost::hash_combine(seed, words[0]);
1473 boost::hash_combine(seed, words[1]);
1474 boost::hash_combine(seed, words[2]);
1475 boost::hash_combine(seed, words[3]);
1481 boost::hash_combine(seed,
ip_proto);
1484 boost::hash_combine(seed,
sport);
1487 boost::hash_combine(seed,
dport);
1493 std::size_t
hash = 0;
1494 boost::hash_combine(hash, (seed & 0xFFFFFFFF));
1495 boost::hash_combine(hash, (seed >> 16));
1501 return ntohs(
transp.udp->uh_ulen) -
sizeof(udphdr);
1513 boost::shared_ptr<PktInfo> pkt_info) {
1514 if (!(
proto_list_.at(module)->Enqueue(pkt_info))) {
1522 std::size_t pkt_trace_size,
const AgentHdr *hdr) {
1523 uint16_t hdr_len =
sizeof(
AgentHdr);
1526 memcpy(
pkt, hdr, hdr_len);
1527 memcpy(
pkt + hdr_len, msg, std::min(l, (pkt_trace_size - hdr_len)));
boost::function< void(PktTrace::Pkt &)> PktTraceCallback
bool IsSegmentHealthCheckPacket(const PktInfo *pkt_info, const Interface *interface)
const Interface * GetInterface() const
int ParseVxlan(PktInfo *pkt_info, uint8_t *pkt)
void AllocPacketBuffer(Agent *agent, uint32_t module, uint16_t len, uint32_t mdata)
boost::shared_ptr< PacketBuffer > PacketBufferPtr
bool is_source_port_set() const
bool is_fat_flow_src_prefix
void Enqueue(PktModuleName module, boost::shared_ptr< PktInfo > pkt_info)
int ParseEthernetHeader(PktInfo *pkt_info, uint8_t *pkt)
const Interface * GetFirstLocalEcmpMemberInterface() const
void incr_pkt_invalid_ip_pkt()
void SendMessage(PktModuleName mod, InterTaskMsg *msg)
bool is_destination_ip_set() const
static Agent * GetInstance()
The TaskScheduler keeps track of what tasks are currently schedulable. When a task is enqueued it is ...
NextHop * FindNextHop(size_t index)
void Shutdown(bool delete_entries=true)
#define PKT_TRACE(obj, arg)
void SetOuterIp(PktInfo *pkt_info, uint8_t *pkt)
const uint32_t id() const
NextHopTable * nexthop_table() const
void SetType(TunnelType::Type type)
static const uint32_t kMulticastControlWord
#define DHCPV6_SERVER_PORT
void incr_pkt_exceptions()
PktHandler::PktModuleName module
const Interface * vhost_interface() const
int ParseUserPkt(PktInfo *pkt_info, Interface *intf, PktType::Type &pkt_type, uint8_t *pkt)
const NextHop * nexthop() const
boost::asio::ip::address IpAddress
static const MacAddress & vrrp_mac()
struct ether_header * eth
bool layer2_control_word() const
AgentStats * stats() const
IpAddress ip_ff_src_prefix
static const std::string kDiagData
#define IANA_MPLS_OVER_UDP_DEST_PORT
PktInfo(Agent *agent, uint32_t buff_len, PktHandler::PktModuleName module, uint32_t mdata)
void set_len(uint32_t len)
bool IsToRDevice(uint32_t vrf_id, const IpAddress &ip)
AgentDBEntry * FindActiveEntry(const DBEntry *key)
void PktSent(PktModuleName mod)
InterfaceTable * interface_table() const
const Ip4Address * GetDip() const
void PktRcvd(PktModuleName mod)
#define BFD_SINGLEHOP_CONTROL_PORT
bool layer2_control_word() const
struct ether_header * eth
ControlInterface * control_interface() const
const MacAddress & mac() const
void Register(PktModuleName type, RcvQueueFunc cb)
bool ProcessBfdDataPacket(boost::shared_ptr< PacketBufferEnqueueItem > item)
MplsTable * mpls_table() const
const VmInterface * FindVmFromDhcpBinding(const MacAddress &mac)
bool IsTunnelEnabled() const
uint64_t pkt_drop_due_to_flow_trap() const
void AddPktTrace(PktModuleName module, PktTrace::Direction dir, const PktInfo *pkt)
PacketBufferPtr packet_buffer_
PktHandlerQueue work_queue_
void AddPktTrace(Direction dir, std::size_t len, uint8_t *msg, const AgentHdr *hdr)
std::vector< Pkt > pkt_buffer_
bool flow_use_rid_in_hash() const
bool IsDHCPPacket(PktInfo *pkt_info)
std::size_t pkt_trace_size_
virtual bool Enqueue(boost::shared_ptr< PktInfo > msg)
int ParseMplsHdr(PktInfo *pkt_info, uint8_t *pkt)
void SetOuterMac(PktInfo *pkt_info)
BridgeRouteEntry * FindRoute(const MacAddress &mac)
VrfEntry * FindVrfFromId(size_t index)
#define VXLAN_UDP_DEST_PORT
bool dhcp_enabled_v6() const
bool IsManagedTORPacket(Interface *intf, PktInfo *pkt_info, PktType::Type &pkt_type, uint8_t *pkt, bool *pkt_ok)
PktHandler(Agent *, PktModule *pkt_module)
void incr_pkt_drop_due_to_decode_error()
const NextHop * GetActiveNextHop() const
IpAddress ip_ff_dst_prefix
boost::asio::ip::address_v6 Ip6Address
Ip4Address router_id() const
bool IsBFDHealthCheckPacket(const PktInfo *pkt_info, const Interface *interface)
static const uint32_t kMulticastControlWordSize
int ParseMPLSoGRE(PktInfo *pkt_info, uint8_t *pkt)
static const std::size_t kPktMaxTraceSize
bool dhcp_enabled() const
bool IsGwPacket(const Interface *intf, const IpAddress &dst_ip)
void incr_pkt_drop_due_to_disable_tnl()
static bool ComputeDirection(const Interface *intf)
AgentRouteTable * GetBridgeRouteTable() const
void set_measure_busy_time(bool val) const
bool IsValidInterface(uint32_t ifindex, Interface **interface)
void PktTraceIterate(PktModuleName mod, PktTraceCallback cb)
#define BFD_MULTIHOP_CONTROL_PORT
bool IsDiagPacket(PktInfo *pkt_info)
const std::vector< VnIpam > & GetVnIpam() const
static const MacAddress & BroadcastMac()
const VnEntry * vn() const
bool is_source_ip_set() const
void Send(const AgentHdr &hdr, const PacketBufferPtr &buff)
bool ProcessPacket(boost::shared_ptr< PacketBufferEnqueueItem > item)
PktModuleName ParsePacket(const AgentHdr &hdr, PktInfo *pkt_info, uint8_t *pkt)
COMPOSITETYPE composite_nh_type() const
AgentParam * params() const
bool ExcludeFromFatFlow(Address::Family family, const IpAddress &sip, const IpAddress &dip) const
boost::asio::ip::address_v4 Ip4Address
bool ValidateIpPacket(PktInfo *pkt_info)
static const uint32_t kInvalidLabel
void incr_pkt_fragments_dropped()
const FatFlowList & fat_flow_list() const
VrfTable * vrf_table() const
std::string AgentBackTrace(int skip=1)
ComponentNHList::const_iterator begin() const
const Ip4Address & primary_ip_addr() const
uint32_t GetUdpPayloadLength() const
const AgentHdr & GetAgentHdr() const
virtual int Send(const AgentHdr &hdr, const PacketBufferPtr &pkt)=0
int ParseMPLSoUDP(PktInfo *pkt_info, uint8_t *pkt)
void incr_pkt_invalid_frm_tor()
void incr_pkt_invalid_interface()
void reset_packet_buffer()
bool IgnoreFragmentedPacket(PktInfo *pkt_info)
PacketBufferManager * packet_buffer_manager() const
VmInterface::VmiType vmi_type() const
void CalculatePortIP(PktInfo *pkt_info)
const Ip6Address & primary_ip6_addr() const
PacketBufferPtr Allocate(uint32_t module, uint16_t len, uint32_t mdata)
virtual uint32_t EncapsulationLength() const =0
bool IsFabricMulticastReservedLabel() const
const Interface * FindInterface(size_t index) const
#define LOG(_Level, _Msg)
PktModuleName ParseBfdDataPacket(const AgentHdr &hdr, PktInfo *pkt_info, uint8_t *pkt)
bool layer2_control_word() const
bool IsFatFlowPrefixAggregation(bool ingress, uint8_t protocol, uint16_t *sport, uint16_t *dport, bool *same_port_num, IpAddress *SrcIP, IpAddress *DstIP, bool *is_src_prefix, bool *is_dst_prefix, FatFlowIgnoreAddressType *ignore_addr) const
void PktQThresholdExceeded(PktModuleName mod)
Proto * bfd_keepalive_proto_
bool IsFatFlowPortBased(uint8_t protocol, uint16_t port, FatFlowIgnoreAddressType *ignore_addr) const
boost::array< Proto *, MAX_MODULES > proto_list_
void incr_pkt_drop_due_to_invalid_ethertype()
uint8_t pkt[kPktMaxTraceSize]
boost::array< PktTrace, MAX_MODULES > pkt_trace_
bool is_fat_flow_dst_prefix
uint32_t EncapHeaderLen() const
ComponentNHList::const_iterator end() const
int ParseControlWord(PktInfo *pkt_info, uint8_t *pkt, const MplsLabel *mpls)
VmInterface::FatFlowIgnoreAddressType ignore_address
void PktModuleEnqueue(PktModuleName mod, const AgentHdr &hdr, boost::shared_ptr< PktInfo > pkt_info, uint8_t *pkt)
PktHandlerQueue work_queue_bfd_ka_
bool is_destination_port_set() const
bool ComputeForwardingMode(PktInfo *pkt_info, const Interface *intf) const
const Interface * GetInterface() const
bool Enqueue(QueueEntryT entry)
void Copy(Direction d, std::size_t l, uint8_t *msg, std::size_t pkt_trace_size, const AgentHdr *hdr)
std::size_t hash(const Agent *agent, const EcmpLoadBalance &ecmp_has_fields_to_use) const
bool IsFlowPacket(PktInfo *pkt_info)
#define MPLS_OVER_UDP_DEST_PORT
int ParseUDPTunnels(PktInfo *pkt_info, uint8_t *pkt)
void set_name(const std::string &name)
bool is_ip_protocol_set() const
void HandleRcvPkt(const AgentHdr &hdr, const PacketBufferPtr &buff)
int ParseIpPacket(PktInfo *pkt_info, PktType::Type &pkt_type, uint8_t *ptr)
uint32_t received[MAX_MODULES]
#define DHCPV6_CLIENT_PORT