aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.h
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2020-12-14 16:50:33 +0000
committerOle Tr�an <otroan@employees.org>2021-02-05 12:00:56 +0000
commit6a999d67d6e41df0fb9f63f0a379ebd389617a7e (patch)
treef8f029fea972508aed622b38682196080a59c8ad /src/vnet/interface.h
parentadcc0b359605df118b69e05614740570b22c92fb (diff)
interface: RX/TX direction type in API
Type: feature Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Change-Id: I982205b48615395f19cbb36c73854fb5c3db45e8
Diffstat (limited to 'src/vnet/interface.h')
-rw-r--r--src/vnet/interface.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vnet/interface.h b/src/vnet/interface.h
index 88f7c88eff9..6b22bc327df 100644
--- a/src/vnet/interface.h
+++ b/src/vnet/interface.h
@@ -364,11 +364,17 @@ typedef enum vnet_link_t_
_link <= VNET_LINK_NSH; \
_link++)
+#define FOR_EACH_VNET_IP_LINK(_link) \
+ for (_link = VNET_LINK_IP4; \
+ _link <= VNET_LINK_IP6; \
+ _link++)
+
/**
- * @brief Number of link types. Not part of the enum so it does not have to be included in
- * switch statements
+ * @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_NSH+1)
+#define VNET_N_LINKS VNET_LINK_NUM
/**
* @brief Convert a link to to an Ethertype