L2 over LISP and GRE (VPP-457)
[vpp.git] / vnet / vnet / dpo / dpo.h
index 8c22f00..452a07e 100644 (file)
@@ -65,6 +65,7 @@ typedef enum dpo_proto_t_
     DPO_PROTO_IP4 = 0,
 #endif
     DPO_PROTO_IP6,
+    DPO_PROTO_ETHERNET,
     DPO_PROTO_MPLS,
 } __attribute__((packed)) dpo_proto_t;
 
@@ -74,9 +75,15 @@ typedef enum dpo_proto_t_
 #define DPO_PROTOS {           \
     [DPO_PROTO_IP4]  = "ip4",  \
     [DPO_PROTO_IP6]  = "ip6",  \
+    [DPO_PROTO_ETHERNET]  = "ethernet", \
     [DPO_PROTO_MPLS] = "mpls", \
 }
 
+#define FOR_EACH_DPO_PROTO(_proto)    \
+    for (_proto = DPO_PROTO_IP4;      \
+        _proto <= DPO_PROTO_MPLS;    \
+        _proto++)
+
 /**
  * @brief Common types of data-path objects
  * New types can be dynamically added using dpo_register_new_type()