summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2014-01-29 12:06:02 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-01-29 12:42:56 +0900
commit7ab4ce13b55793d0e3fd4c2ca865b7be7faf59b3 (patch)
tree090ce5802a50d2ab149d934399e1d2cf9c34025e
parent2cf3a6ee4f4a6a8d0529dc7a354ce137444959b9 (diff)
Add OF1.4 PopVlan action support
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/ofproto/ofproto_v1_4_parser.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py
index 10da4f54..4f1adbed 100644
--- a/ryu/ofproto/ofproto_v1_4_parser.py
+++ b/ryu/ofproto/ofproto_v1_4_parser.py
@@ -2391,6 +2391,24 @@ class OFPActionPushMpls(OFPAction):
self.type, self.len, self.ethertype)
+@OFPAction.register_action_type(ofproto.OFPAT_POP_VLAN,
+ ofproto.OFP_ACTION_HEADER_SIZE)
+class OFPActionPopVlan(OFPAction):
+ """
+ Pop VLAN action
+
+ This action pops the outermost VLAN tag from the packet.
+ """
+ def __init__(self, type_=None, len_=None):
+ super(OFPActionPopVlan, self).__init__()
+
+ @classmethod
+ def parser(cls, buf, offset):
+ (type_, len_) = struct.unpack_from(
+ ofproto.OFP_ACTION_HEADER_PACK_STR, buf, offset)
+ return cls()
+
+
@OFPAction.register_action_type(ofproto.OFPAT_POP_MPLS,
ofproto.OFP_ACTION_POP_MPLS_SIZE)
class OFPActionPopMpls(OFPAction):