Add enum of q-in-q
Update translation to transparently return the original identifier
if no translation occurred.
diff --git a/loxi_front_end/translation.py b/loxi_front_end/translation.py
index 5f62a0a..b1b3864 100644
--- a/loxi_front_end/translation.py
+++ b/loxi_front_end/translation.py
@@ -124,5 +124,5 @@
for id_from, id_to in entry.items():
if re.match(id_from, ident):
return re.sub(id_from, id_to, ident)
- return None
+ return ident
diff --git a/openflow_input/bsn_vport b/openflow_input/bsn_vport
index 8e02794..af0b579 100644
--- a/openflow_input/bsn_vport
+++ b/openflow_input/bsn_vport
@@ -30,6 +30,13 @@
#version any
+// When the ingress or egress VID has this value, no outer tag should be used.
+// In this case, the corresponding TPID is ignored.
+
+enum ofp_bsn_vport_q_in_q_untagged {
+ OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 0xffff,
+};
+
// BSN Virtual port object header
// FIXME For now, inheritance is not exercised. See below.
struct ofp_bsn_vport {
@@ -39,10 +46,6 @@
};
-// When the ingress or egress VID has this value, no outer tag should be used.
-// In this case, the corresponding TPID is ignored.
-// #define OF_BSN_VPORT_Q_IN_Q_UNTAGGED 0xffff
-
// Q-in-Q virtual port specification
struct of_bsn_vport_q_in_q {