Signed-off-by: IWASE Yusuke <[email protected]>
---
doc/source/app/ofctl_rest.rst | 41 +++++++++++++++++----------------
ryu/lib/packet/tcp.py | 8 +++----
ryu/ofproto/nx_match.py | 53 +++++++++++++++++++++++--------------------
3 files changed, 53 insertions(+), 49 deletions(-)
diff --git a/doc/source/app/ofctl_rest.rst b/doc/source/app/ofctl_rest.rst
index cda76cf..1cba2f6 100644
--- a/doc/source/app/ofctl_rest.rst
+++ b/doc/source/app/ofctl_rest.rst
@@ -1664,7 +1664,7 @@ Get meters stats
.. _get-meter-config-stats:
Get meter config stats
-------------------------
+----------------------
Get meter description stats
---------------------------
@@ -1820,9 +1820,9 @@ Add a flow entry
Request message body(Openflow1.4 or later):
- ============= =====================================================
=============================== ===============
+ ============= =====================================================
================================ ===============
Attribute Description
Example Default
- ============= =====================================================
=============================== ===============
+ ============= =====================================================
================================ ===============
dpid Datapath ID (int) 1
(Mandatory)
cookie Opaque controller-issued identifier (int) 1
0
cookie_mask Mask used to restrict the cookie bits (int) 1
0
@@ -2555,7 +2555,7 @@ Send a experimenter message
.. _description-of-match-and-actions:
Reference: Description of Match and Actions
-============================================
+===========================================
Description of Match on request messages
----------------------------------------
@@ -2636,7 +2636,7 @@ Description of Match on request messages
tunnel_id Logical Port Metadata (int or string)
{"tunnel_id": 7} or {"tunnel_id": "0x07/0xff"}
(Openflow1.3+)
ipv6_exthdr IPv6 Extension Header pseudo-field (int or string)
{"ipv6_exthdr": 3, "eth_type": 34525} or {"ipv6_exthdr": "0x40/0x1F0",
"eth_type": 34525}
- (Openflow1.3+)
+ (Openflow1.3+)
pbb_uca PBB UCA hander field(int)
{"pbb_uca": 1, "eth_type": 35047}
(Openflow1.4+)
tcp_flags TCP flags(int)
{"tcp_flags": 2, "ip_proto": 6, "eth_type": 2048}
@@ -2826,19 +2826,20 @@ Example of set-field action
"match":{
"dl_type": "0x8000"
},
- "actions":[
- {
- "type": "PUSH_VLAN", # Push a new VLAN tag if a
input frame is non-VLAN-tagged
- "ethertype": 33024 # Ethertype 0x8100(=33024):
IEEE 802.1Q VLAN-tagged frame
- },
- {
- "type": "SET_FIELD",
- "field": "vlan_vid", # Set VLAN ID
- "value": 4102 # Describe sum of vlan_id(e.g.
6) | OFPVID_PRESENT(0x1000=4096)
- },
- {
- "type": "OUTPUT",
- "port": 2
- }
- ]
+ "actions":[
+ {
+ "type": "PUSH_VLAN", # Push a new VLAN tag if a input
frame is non-VLAN-tagged
+ "ethertype": 33024 # Ethertype 0x8100(=33024): IEEE
802.1Q VLAN-tagged frame
+ },
+ {
+ "type": "SET_FIELD",
+ "field": "vlan_vid", # Set VLAN ID
+ "value": 4102 # Describe sum of vlan_id(e.g. 6)
| OFPVID_PRESENT(0x1000=4096)
+ },
+ {
+ "type": "OUTPUT",
+ "port": 2
+ }
+ ]
}' http://localhost:8080/stats/flowentry/add
+
diff --git a/ryu/lib/packet/tcp.py b/ryu/lib/packet/tcp.py
index 80c4992..1771b9a 100644
--- a/ryu/lib/packet/tcp.py
+++ b/ryu/lib/packet/tcp.py
@@ -98,11 +98,11 @@ class tcp(packet_base.PacketBase):
returns boolean if all passed flags is set
- eg.
+ Example::
- # Check if this is a syn+ack
- if pkt.has_flags(tcp.TCP_SYN, tcp.TCP_ACK):
- ...
+ >>> pkt = tcp.tcp(bits=(tcp.TCP_SYN | tcp.TCP_ACK))
+ >>> pkt.has_flags(tcp.TCP_SYN, tcp.TCP_ACK)
+ True
"""
mask = sum(flags)
diff --git a/ryu/ofproto/nx_match.py b/ryu/ofproto/nx_match.py
index d17fc73..49a5e03 100644
--- a/ryu/ofproto/nx_match.py
+++ b/ryu/ofproto/nx_match.py
@@ -1240,9 +1240,9 @@ The API of this class is the same as ``OFPMatch``.
You can define the flow match by the keyword arguments.
The following arguments are available.
-================ =============== ==================================
+================ =============== ==============================================
Argument Value Description
-================ =============== ==================================
+================ =============== ==============================================
eth_dst_nxm MAC address Ethernet destination address.
eth_src_nxm MAC address Ethernet source address.
eth_type_nxm Integer 16bit Ethernet type. Needed to support Nicira
@@ -1256,8 +1256,8 @@ tun_ipv4_src IPv4 address Tunnel IPv4 source
address.
tun_ipv4_dst IPv4 address Tunnel IPv4 destination address.
pkt_mark Integer 32bit Packet metadata mark.
tcp_flags_nxm Integer 16bit TCP Flags. Requires setting fields:
- eth_type_nxm = |IP or IPv6| and
- ip_proto_nxm = TCP
+ eth_type_nxm = [0x0800 (IP)|0x86dd (IPv6)] and
+ ip_proto_nxm = 6 (TCP)
conj_id Integer 32bit Conjunction ID used only with
the conjunction action
ct_state Integer 32bit Conntrack state.
@@ -1267,27 +1267,30 @@ ct_label Integer 128bit Conntrack label.
_dp_hash Integer 32bit Flow hash computed in Datapath.
reg<idx> Integer 32bit Packet register.
<idx> is register number 0-7.
-================ =============== ==================================
-
-Example:: Setting the TCP flags via the nicira extensions.
- This is required when using OVS version < 2.4.
-
- When using the nxm fields, you need to use any nxm prereq
- fields as well or you will receive a OFPBMC_BAD_PREREQ error
-
- # WILL NOT work
- flag = tcp.TCP_ACK
- match = parser.OFPMatch(
- tcp_flags_nxm=(flag, flag),
- ip_proto=inet.IPPROTO_TCP,
- eth_type=eth_type)
-
- # works
- flag = tcp.TCP_ACK
- match = parser.OFPMatch(
- tcp_flags_nxm=(flag, flag),
- ip_proto_nxm=inet.IPPROTO_TCP,
- eth_type_nxm=eth_type)
+================ =============== ==============================================
+
+.. Note::
+
+ Setting the TCP flags via the nicira extensions.
+ This is required when using OVS version < 2.4.
+ When using the nxm fields, you need to use any nxm prereq
+ fields as well or you will receive a OFPBMC_BAD_PREREQ error
+
+ Example::
+
+ # WILL NOT work
+ flag = tcp.TCP_ACK
+ match = parser.OFPMatch(
+ tcp_flags_nxm=(flag, flag),
+ ip_proto=inet.IPPROTO_TCP,
+ eth_type=eth_type)
+
+ # Works
+ flag = tcp.TCP_ACK
+ match = parser.OFPMatch(
+ tcp_flags_nxm=(flag, flag),
+ ip_proto_nxm=inet.IPPROTO_TCP,
+ eth_type_nxm=eth_type)
"""
oxm_types = [
--
2.7.4
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel