VOL-3854: Changes in openolt agent to support trapping PPPoED_ETH_TYPE (0x8863) packets

Signed-off-by: Marcos Aurelio Carrero (Furukawa) <mcarrero@furukawalatam.com>
Change-Id: Iedbcd7fa18db69562f5bae12f8f56ebe524aba92
diff --git a/agent/src/core_data.h b/agent/src/core_data.h
index 7d76555..214b8fd 100644
--- a/agent/src/core_data.h
+++ b/agent/src/core_data.h
@@ -269,14 +269,16 @@
     lldp = 1,
     eap = 2,
     igmpv4 = 3,
+    pppoed = 4,
     unsupported_trap_to_host_pkt_type = 0xff
 };
 
 // Constants useful during trap-to-host packet header field classification
-#define EAP_ETH_TYPE  0x888e
-#define LLDP_ETH_TYPE 0x88cc
-#define IPV4_ETH_TYPE 0x0800
-#define VLAN_ETH_TYPE 0x8100
+#define EAP_ETH_TYPE    0x888e
+#define LLDP_ETH_TYPE   0x88cc
+#define IPV4_ETH_TYPE   0x0800
+#define VLAN_ETH_TYPE   0x8100
+#define PPPoED_ETH_TYPE 0x8863
 
 #define IGMPv4_PROTOCOL 2
 #define UDP_PROTOCOL    17
diff --git a/agent/src/core_utils.cc b/agent/src/core_utils.cc
index 554e88d..0c092a6 100644
--- a/agent/src/core_utils.cc
+++ b/agent/src/core_utils.cc
@@ -1503,6 +1503,8 @@
         type = lldp;
     } else if (classifier.ip_proto() == IGMPv4_PROTOCOL) {
         type = igmpv4;
+    } else if (classifier.ip_proto() == PPPoED_ETH_TYPE) {
+        type = pppoed;
     }
 
     return type;
@@ -1547,6 +1549,9 @@
         if (ethType == EAP_ETH_TYPE) { // single tagged packet with EAPoL payload
             vlan_id = vlanLayer->getVlanID();
             pkt_type = eap;
+        } else if (ethType == PPPoED_ETH_TYPE) { // single tagged packet with PPPOeD payload
+            vlan_id = vlanLayer->getVlanID();
+            pkt_type = pppoed;
         } else if (ethType == IPV4_ETH_TYPE) { // single tagged packet with IPv4 payload
             vlan_id = vlanLayer->getVlanID();
             vlanLayer->parseNextLayer();