summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'vnet/vnet/interface.h')
-rw-r--r--vnet/vnet/interface.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/vnet/vnet/interface.h b/vnet/vnet/interface.h
index c5a79472bba..1f5dcf1600a 100644
--- a/vnet/vnet/interface.h
+++ b/vnet/vnet/interface.h
@@ -216,6 +216,20 @@ typedef enum vnet_link_t_
VNET_LINK_ARP,
} __attribute__ ((packed)) vnet_link_t;
+#define VNET_LINKS { \
+ [VNET_LINK_ETHERNET] = "ethernet", \
+ [VNET_LINK_IP4] = "ipv4", \
+ [VNET_LINK_IP6] = "ipv6", \
+ [VNET_LINK_MPLS] = "mpls", \
+ [VNET_LINK_ARP] = "arp", \
+}
+
+/**
+ * @brief Number of link types. Not part of the enum so it does not have to be included in
+ * switch statements
+ */
+#define VNET_LINK_NUM (VNET_LINK_ARP+1)
+
/**
* @brief Convert a link to to an Ethertype
*/