summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorsurlyjake <surlyjake@gmail.com>2017-03-28 13:03:02 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-03-28 13:03:02 +0900
commit468f471f87bfd4ebcb89696efbcefa6349896d1c (patch)
tree0c9e89c9a1297c9fab5e2a336452db52a89e20d8
parente1741b7d77d4e57ea96cefe4535c46c83522a677 (diff)
nicira_ext: Constants for IP fragment matching
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/ofproto/nicira_ext.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ryu/ofproto/nicira_ext.py b/ryu/ofproto/nicira_ext.py
index 64b570fc..411ed48a 100644
--- a/ryu/ofproto/nicira_ext.py
+++ b/ryu/ofproto/nicira_ext.py
@@ -277,6 +277,18 @@ NX_NAT_RANGE_IPV6_MAX = 1 << 3
NX_NAT_RANGE_PROTO_MIN = 1 << 4
NX_NAT_RANGE_PROTO_MAX = 1 << 5
+# nx ip_frag constants
+FLOW_NW_FRAG_ANY = 1 << 0 # Set for any IP frag.
+FLOW_NW_FRAG_LATER = 1 << 1 # Set for IP frag with nonzero offset.
+FLOW_NW_FRAG_MASK = FLOW_NW_FRAG_ANY | FLOW_NW_FRAG_LATER
+
+# nx ip_frag match values
+NXM_IP_FRAG_NO = (0, FLOW_NW_FRAG_MASK)
+NXM_IP_FRAG_YES = (FLOW_NW_FRAG_ANY, FLOW_NW_FRAG_ANY)
+NXM_IP_FRAG_FIRST = (FLOW_NW_FRAG_ANY, FLOW_NW_FRAG_MASK)
+NXM_IP_FRAG_LATER = (FLOW_NW_FRAG_LATER, FLOW_NW_FRAG_LATER)
+NXM_IP_FRAG_NOT_LATER = (0, FLOW_NW_FRAG_LATER)
+
def ofs_nbits(start, end):
"""