summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ryu/lib/packet/bfd.py84
-rw-r--r--ryu/lib/packet/dhcp6.py93
-rw-r--r--ryu/lib/packet/igmp.py13
-rw-r--r--ryu/lib/packet/llc.py30
-rw-r--r--ryu/lib/packet/lldp.py34
-rw-r--r--ryu/lib/packet/sctp.py184
-rw-r--r--ryu/lib/packet/vrrp.py9
7 files changed, 262 insertions, 185 deletions
diff --git a/ryu/lib/packet/bfd.py b/ryu/lib/packet/bfd.py
index 61c7943c..1082f9c0 100644
--- a/ryu/lib/packet/bfd.py
+++ b/ryu/lib/packet/bfd.py
@@ -16,8 +16,7 @@
"""
BFD Control packet parser/serializer
-RFC 5880
-BFD Control packet format
+[RFC 5880] BFD Control packet format::
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
@@ -35,47 +34,46 @@ BFD Control packet format
| Required Min Echo RX Interval |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- An optional Authentication Section MAY be present in the following
- format of types:
-
- 1. Format of Simple Password Authentication Section
-
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Auth Type | Auth Len | Auth Key ID | Password... |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | ... |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
- 2. Format of Keyed MD5 and Meticulous Keyed MD5 Authentication Section
-
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Auth Type | Auth Len | Auth Key ID | Reserved |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Sequence Number |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Auth Key/Digest... |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | ... |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
- 3. Format of Keyed SHA1 and Meticulous Keyed SHA1 Authentication Section
-
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Auth Type | Auth Len | Auth Key ID | Reserved |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Sequence Number |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Auth Key/Hash... |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | ... |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
+An optional Authentication Section MAY be present in the following
+format of types:
+
+1. Format of Simple Password Authentication Section::
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Auth Type | Auth Len | Auth Key ID | Password... |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | ... |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+2. Format of Keyed MD5 and Meticulous Keyed MD5 Authentication Section::
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Auth Type | Auth Len | Auth Key ID | Reserved |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Sequence Number |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Auth Key/Digest... |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | ... |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+3. Format of Keyed SHA1 and Meticulous Keyed SHA1 Authentication Section::
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Auth Type | Auth Len | Auth Key ID | Reserved |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Sequence Number |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Auth Key/Hash... |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | ... |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
"""
import binascii
import hashlib
diff --git a/ryu/lib/packet/dhcp6.py b/ryu/lib/packet/dhcp6.py
index 1e0505fd..b3753dc1 100644
--- a/ryu/lib/packet/dhcp6.py
+++ b/ryu/lib/packet/dhcp6.py
@@ -16,47 +16,45 @@
"""
DHCPv6 packet parser/serializer
-RFC 3315
-DHCP packet format
+[RFC 3315] DHCPv6 packet format:
The following diagram illustrates the format of DHCP messages sent
-between clients and servers:
-
-\ 0 1 2 3
-\ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| msg_type | transaction_id |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| |
-. options .
-. (variable) .
-| |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-There are two relay agent messages, which share the following format:
-
-\ 0 1 2 3
-\ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| msg_type | hop_count | |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
-| |
-| link_address |
-| |
-| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
-| | |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
-| |
-| peer_address |
-| |
-| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
-| | |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
-. .
-. options (variable number and length) .... .
-| |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+between clients and servers::
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | msg_type | transaction_id |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | |
+ . options .
+ . (variable) .
+ | |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+There are two relay agent messages, which share the following format::
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | msg_type | hop_count | |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
+ | |
+ | link_address |
+ | |
+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
+ | | |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
+ | |
+ | peer_address |
+ | |
+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
+ | | |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
+ . .
+ . options (variable number and length) .... .
+ | |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
"""
import random
import struct
@@ -202,7 +200,6 @@ class options(stringify.StringifyMixin):
"""DHCP (RFC 3315) options encoder/decoder class.
This is used with ryu.lib.packet.dhcp6.dhcp6.
-
"""
def __init__(self, option_list=None, options_len=0):
@@ -242,16 +239,16 @@ class option(stringify.StringifyMixin):
Most of them are same to the on-wire counterparts but in host byte order.
__init__ takes the corresponding args in this order.
- The format of DHCP options is:
+ The format of DHCP options is::
- \ 0 1 2 3
- \ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | option-code | option-len |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | option-data |
- | (option-len octets) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | option-code | option-len |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | option-data |
+ | (option-len octets) |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
============== ====================
Attribute Description
diff --git a/ryu/lib/packet/igmp.py b/ryu/lib/packet/igmp.py
index cd8f59c7..909decba 100644
--- a/ryu/lib/packet/igmp.py
+++ b/ryu/lib/packet/igmp.py
@@ -16,8 +16,7 @@
"""
Internet Group Management Protocol(IGMP) packet parser/serializer
-RFC 1112
-IGMP v1 format
+[RFC 1112] IGMP v1 format::
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
@@ -27,8 +26,7 @@ IGMP v1 format
| Group Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-RFC 2236
-IGMP v2 format
+[RFC 2236] IGMP v2 format::
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
@@ -38,8 +36,7 @@ IGMP v2 format
| Group Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-RFC 3376
-IGMP v3 Membership Query format
+[RFC 3376] IGMP v3 Membership Query format::
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
@@ -60,7 +57,7 @@ IGMP v3 Membership Query format
| Source Address [N] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-IGMP v3 Membership Report format
+IGMP v3 Membership Report format::
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
@@ -92,7 +89,7 @@ IGMP v3 Membership Report format
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-where each Group Record has the following internal format:
+Where each Group Record has the following internal format::
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Record Type | Aux Data Len | Number of Sources (N) |
diff --git a/ryu/lib/packet/llc.py b/ryu/lib/packet/llc.py
index a807ab21..abdbe568 100644
--- a/ryu/lib/packet/llc.py
+++ b/ryu/lib/packet/llc.py
@@ -19,7 +19,7 @@ Logical Link Control(LLC, IEEE 802.2) parser/serializer
http://standards.ieee.org/getieee802/download/802.2-1998.pdf
-LLC format
+LLC format::
+-----------------+--------------+
| DSAP address | 8 bits |
@@ -30,7 +30,7 @@ LLC format
+-----------------+--------------+
-DSAP address field
+DSAP address field::
LSB
+-----+---+---+---+---+---+---+---+
@@ -40,7 +40,7 @@ DSAP address field
I/G bit = 1 : Group DSA
D : DSAP address
-SSAP address field
+SSAP address field::
LSB
+-----+---+---+---+---+---+---+---+
@@ -51,27 +51,30 @@ SSAP address field
S : SSAP address
-Control field
+Control field:
+
+Information transfer
+command/response
+(I-format PDU)::
- Information transfer
- command/response
- (I-format PDU)
1 2 3 4 5 6 7 8 9 10-16
+---+---+---+---+---+---+---+---+-----+------+
| 0 | N(S) | P/F | N(R) |
+---+---+---+---+---+---+---+---+-----+------+
- Supervisory
- commands/responses
- (S-format PDUs)
+Supervisory
+commands/responses
+(S-format PDUs)::
+
1 2 3 4 5 6 7 8 9 10-16
+---+---+---+---+---+---+---+---+-----+------+
| 1 0 | S S | 0 0 0 0 | P/F | N(R) |
+---+---+---+---+---+---+---+---+-----+------+
- Unnumbered
- commands/responses
- (U-format PDUs)
+Unnumbered
+commands/responses
+(U-format PDUs)::
+
1 2 3 4 5 6 7 8
+---+---+----+---+-----+---+----+---+
| 1 1 | M1 M1 | P/F | M2 M2 M2 |
@@ -83,7 +86,6 @@ Control field
M1/M2: modifier function bit
P/F : poll bit - command LLC PDUs
final bit - response LLC PDUs
-
"""
diff --git a/ryu/lib/packet/lldp.py b/ryu/lib/packet/lldp.py
index 9430ddf5..87ddadae 100644
--- a/ryu/lib/packet/lldp.py
+++ b/ryu/lib/packet/lldp.py
@@ -19,22 +19,32 @@ Link Layer Discovery Protocol(LLDP, IEEE 802.1AB)
http://standards.ieee.org/getieee802/download/802.1AB-2009.pdf
-basic TLV format
+basic TLV format::
-octets | 1 | 2 | 3 ... n + 2 |
- --------------------------------------------------------
- | TLV type | TLV information | TLV information string |
- | (7bits) | string length | ( 0 <= n <= 511 octets) |
- | | (9bits) | |
- --------------------------------------------------------
-bits |8 2|1|8 1|
+ octets | 1 | 2 | 3 ... n + 2 |
+ --------------------------------------------------------
+ | TLV type | TLV information | TLV information string |
+ | (7bits) | string length | (0-507 octets) |
+ | | (9bits) | |
+ --------------------------------------------------------
+ bits |8 2|1|8 1|
-LLDPDU format
+Organizationally specific TLV format::
- ------------------------------------------------------------------------
- | Chassis ID | Port ID | TTL | optional TLV | ... | optional TLV | End |
- ------------------------------------------------------------------------
+ octets | 1 | 2 | 3 ... 5 | 6 | 7 ... n + 6 |
+ ---------------------------------------------------------------
+ | TLV type | Length | OUI | Subtype | Infomation |
+ | (7bits) | (9bits) | (24bits) | (8bits) | (0-507 octets) |
+ ---------------------------------------------------------------
+ bits |8 2|1|8 1|
+
+
+LLDPDU format::
+
+ ------------------------------------------------------------------------
+ | Chassis ID | Port ID | TTL | optional TLV | ... | optional TLV | End |
+ ------------------------------------------------------------------------
Chasis ID, Port ID, TTL, End are mandatory
optional TLV may be inserted in any order
diff --git a/ryu/lib/packet/sctp.py b/ryu/lib/packet/sctp.py
index ff2c46b9..7c041f1f 100644
--- a/ryu/lib/packet/sctp.py
+++ b/ryu/lib/packet/sctp.py
@@ -385,7 +385,9 @@ class chunk_data(chunk):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Payload Data (DATA) chunk (RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -465,7 +467,9 @@ class chunk_init(chunk_init_base):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Initiation (INIT) chunk (RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -515,7 +519,9 @@ class chunk_init_ack(chunk_init_base):
sub encoder/decoder class for Initiation Acknowledgement (INIT ACK)
chunk (RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -565,7 +571,9 @@ class chunk_sack(chunk):
sub encoder/decoder class for Selective Acknowledgement (SACK) chunk
(RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -660,7 +668,9 @@ class chunk_heartbeat(chunk_heartbeat_base):
sub encoder/decoder class for Heartbeat Request (HEARTBEAT) chunk
(RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -703,7 +713,9 @@ class chunk_heartbeat_ack(chunk_heartbeat_base):
sub encoder/decoder class for Heartbeat Acknowledgement
(HEARTBEAT ACK) chunk (RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -745,7 +757,9 @@ class chunk_abort(chunk):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Abort Association (ABORT) chunk (RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -822,7 +836,9 @@ class chunk_shutdown(chunk):
sub encoder/decoder class for Shutdown Association (SHUTDOWN) chunk
(RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -875,7 +891,9 @@ class chunk_shutdown_ack(chunk_ack_base):
sub encoder/decoder class for Shutdown Acknowledgement (SHUTDOWN ACK)
chunk (RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -902,7 +920,9 @@ class chunk_error(chunk):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Operation Error (ERROR) chunk (RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -974,7 +994,9 @@ class chunk_cookie_echo(chunk):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Cookie Echo (COOKIE ECHO) chunk (RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1035,7 +1057,9 @@ class chunk_cookie_ack(chunk_ack_base):
sub encoder/decoder class for Cookie Acknowledgement (COOKIE ACK)
chunk (RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1062,7 +1086,9 @@ class chunk_ecn_echo(chunk_ecn_base):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for ECN-Echo chunk (RFC 4960 Appendix A.).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1090,7 +1116,9 @@ class chunk_cwr(chunk_ecn_base):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for CWR chunk (RFC 4960 Appendix A.).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1119,7 +1147,9 @@ class chunk_shutdown_complete(chunk):
sub encoder/decoder class for Shutdown Complete (SHUTDOWN COMPLETE)
chunk (RFC 4960).
- This is used with ryu.lib.packet.sctp.sctp.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.sctp
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1239,8 +1269,10 @@ class cause_invalid_stream_id(cause_with_value):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Invalid Stream Identifier (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1286,8 +1318,10 @@ class cause_missing_param(cause):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Missing Mandatory Parameter (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1356,8 +1390,10 @@ class cause_stale_cookie(cause_with_value):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Stale Cookie Error (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1385,8 +1421,10 @@ class cause_out_of_resource(cause):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Out of Resource (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1418,8 +1456,10 @@ class cause_unresolvable_addr(cause_with_value):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Unresolvable Address (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1483,8 +1523,10 @@ class cause_unrecognized_chunk(cause_with_value):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Unrecognized Chunk Type (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1512,8 +1554,10 @@ class cause_invalid_param(cause):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Invalid Mandatory Parameter (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1545,8 +1589,10 @@ class cause_unrecognized_param(cause_with_value):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Unrecognized Parameters (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1574,8 +1620,10 @@ class cause_no_userdata(cause_with_value):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for No User Data (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1605,8 +1653,10 @@ class cause_cookie_while_shutdown(cause):
sub encoder/decoder class for Cookie Received While Shutting Down
(RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1639,8 +1689,10 @@ class cause_restart_with_new_addr(cause_with_value):
sub encoder/decoder class for Restart of an Association with New
Addresses (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1712,8 +1764,10 @@ class cause_user_initiated_abort(cause_with_value):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for User-Initiated Abort (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1741,8 +1795,10 @@ class cause_protocol_violation(cause_with_value):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Protocol Violation (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_abort and
- ryu.lib.packet.sctp.chunk_error.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_abort
+ - ryu.lib.packet.sctp.chunk_error
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1819,8 +1875,10 @@ class param_heartbeat(param):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Heartbeat Info Parameter (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_heartbeat and
- ryu.lib.packet.sctp.chunk_heartbeat_ack.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_heartbeat
+ - ryu.lib.packet.sctp.chunk_heartbeat_ack
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1847,7 +1905,9 @@ class param_state_cookie(param):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for State Cookie Parameter (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_init_ack.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_init_ack
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1874,7 +1934,9 @@ class param_unrecognized_param(param):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Unrecognized Parameter (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_init_ack.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_init_ack
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1901,7 +1963,9 @@ class param_cookie_preserve(param):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Cookie Preservative Parameter (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_init.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_init
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1947,8 +2011,10 @@ class param_ecn(param):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for ECN Parameter (RFC 4960 Appendix A.).
- This is used with ryu.lib.packet.sctp.chunk_init and
- ryu.lib.packet.sctp.chunk_init_ack.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_init
+ - ryu.lib.packet.sctp.chunk_init_ack
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -1983,8 +2049,10 @@ class param_host_addr(param):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Host Name Address Parameter (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_init and
- ryu.lib.packet.sctp.chunk_init_ack.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_init
+ - ryu.lib.packet.sctp.chunk_init_ack
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -2011,7 +2079,9 @@ class param_supported_addr(param):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for Supported Address Types Parameter (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_init.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_init
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -2075,8 +2145,10 @@ class param_ipv4(param):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for IPv4 Address Parameter (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_init and
- ryu.lib.packet.sctp.chunk_init_ack.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_init
+ - ryu.lib.packet.sctp.chunk_init_ack
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
@@ -2130,8 +2202,10 @@ class param_ipv6(param):
"""Stream Control Transmission Protocol (SCTP)
sub encoder/decoder class for IPv6 Address Parameter (RFC 4960).
- This is used with ryu.lib.packet.sctp.chunk_init and
- ryu.lib.packet.sctp.chunk_init_ack.
+ This class is used with the following.
+
+ - ryu.lib.packet.sctp.chunk_init
+ - ryu.lib.packet.sctp.chunk_init_ack
An instance has the following attributes at least.
Most of them are same to the on-wire counterparts but in host byte order.
diff --git a/ryu/lib/packet/vrrp.py b/ryu/lib/packet/vrrp.py
index cc58ebb3..857e1ac0 100644
--- a/ryu/lib/packet/vrrp.py
+++ b/ryu/lib/packet/vrrp.py
@@ -17,8 +17,8 @@
"""
VRRP packet parser/serializer
-RFC 3768
-VRRP v2 packet format
+[RFC 3768] VRRP v2 packet format::
+
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -40,8 +40,8 @@ VRRP v2 packet format
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-RFC 5798
-VRRP v3 packet format
+[RFC 5798] VRRP v3 packet format::
+
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -64,7 +64,6 @@ VRRP v3 packet format
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
"""
import struct