summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYoshihiro Kaneko <ykaneko0929@gmail.com>2013-08-23 19:24:15 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-08-23 20:20:09 +0900
commitc2acbc8cdfb1662b41c7ab1481ae82fbcf1e631e (patch)
treebce92a14e53b243bd0807f2776c772ff8b5cb183
parentf8da5a9c791a27b6599a40aaaee463b78cbb8be9 (diff)
lib/packet: update docstrings to fix broken tables in latex/pdf
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/lib/packet/dhcp.py4
-rw-r--r--ryu/lib/packet/icmp.py22
-rw-r--r--ryu/lib/packet/icmpv6.py11
-rw-r--r--ryu/lib/packet/ipv6.py2
-rw-r--r--ryu/lib/packet/llc.py2
-rw-r--r--ryu/lib/packet/slow.py128
6 files changed, 107 insertions, 62 deletions
diff --git a/ryu/lib/packet/dhcp.py b/ryu/lib/packet/dhcp.py
index 3907c757..471ea049 100644
--- a/ryu/lib/packet/dhcp.py
+++ b/ryu/lib/packet/dhcp.py
@@ -98,6 +98,8 @@ class dhcp(packet_base.PacketBase):
Most of them are same to the on-wire counterparts but in host byte order.
__init__ takes the correspondig args in this order.
+ .. tabularcolumns:: |l|L|
+
============== ====================
Attribute Description
============== ====================
@@ -201,6 +203,8 @@ class options(stringify.StringifyMixin):
Most of them are same to the on-wire counterparts but in host byte order.
__init__ takes the correspondig args in this order.
+ .. tabularcolumns:: |l|L|
+
============== ====================
Attribute Description
============== ====================
diff --git a/ryu/lib/packet/icmp.py b/ryu/lib/packet/icmp.py
index eefde815..6f2e9591 100644
--- a/ryu/lib/packet/icmp.py
+++ b/ryu/lib/packet/icmp.py
@@ -40,6 +40,8 @@ class icmp(packet_base.PacketBase):
Most of them are same to the on-wire counterparts but in host byte order.
__init__ takes the correspondig args in this order.
+ .. tabularcolumns:: |l|L|
+
============== ====================
Attribute Description
============== ====================
@@ -125,6 +127,8 @@ class echo(stringify.StringifyMixin):
Most of them are same to the on-wire counterparts but in host byte order.
__init__ takes the correspondig args in this order.
+ .. tabularcolumns:: |l|L|
+
============== ====================
Attribute Description
============== ====================
@@ -178,15 +182,19 @@ class dest_unreach(stringify.StringifyMixin):
[RFC1191] reserves bits for the "Next-Hop MTU" field.
[RFC4884] introduced 8-bit data length attribute.
- ============== ====================
+ .. tabularcolumns:: |l|p{35em}|
+
+ ============== =====================================================
Attribute Description
- ============== ====================
+ ============== =====================================================
data_len data length
- mtu Next-Hop MTU \
- NOTE: This field is required when icmp code is 4 \
- code 4 = fragmentation needed and DF set
+ mtu Next-Hop MTU
+
+ NOTE: This field is required when icmp code is 4
+
+ code 4 = fragmentation needed and DF set
data Internet Header + leading octets of original datagram
- ============== ====================
+ ============== =====================================================
"""
_PACK_STR = '!xBH'
@@ -233,6 +241,8 @@ class TimeExceeded(stringify.StringifyMixin):
[RFC4884] introduced 8-bit data length attribute.
+ .. tabularcolumns:: |l|L|
+
============== ====================
Attribute Description
============== ====================
diff --git a/ryu/lib/packet/icmpv6.py b/ryu/lib/packet/icmpv6.py
index 92a9f535..ac1d5349 100644
--- a/ryu/lib/packet/icmpv6.py
+++ b/ryu/lib/packet/icmpv6.py
@@ -64,14 +64,17 @@ class icmpv6(packet_base.PacketBase):
Most of them are same to the on-wire counterparts but in host byte order.
__init__ takes the correspondig args in this order.
+ .. tabularcolumns:: |l|p{35em}|
+
============== ====================
Attribute Description
============== ====================
type\_ Type
code Code
- csum CheckSum \
+ csum CheckSum
(0 means automatically-calculate when encoding)
- data Payload. \
+ data Payload.
+
ryu.lib.packet.icmpv6.echo object, or \
ryu.lib.packet.icmpv6.nd_neighbor object, or a bytearray.
============== ====================
@@ -136,6 +139,8 @@ class nd_neighbor(stringify.StringifyMixin):
Most of them are same to the on-wire counterparts but in host byte order.
__init__ takes the correspondig args in this order.
+ .. tabularcolumns:: |l|p{35em}|
+
============== ====================
Attribute Description
============== ====================
@@ -221,6 +226,8 @@ class nd_option_la(stringify.StringifyMixin):
Most of them are same to the on-wire counterparts but in host byte order.
__init__ takes the correspondig args in this order.
+ .. tabularcolumns:: |l|p{35em}|
+
============== ====================
Attribute Description
============== ====================
diff --git a/ryu/lib/packet/ipv6.py b/ryu/lib/packet/ipv6.py
index 53bc5fbc..325f8349 100644
--- a/ryu/lib/packet/ipv6.py
+++ b/ryu/lib/packet/ipv6.py
@@ -36,6 +36,8 @@ class ipv6(packet_base.PacketBase):
IPv6 addresses are represented as a string like 'ff02::1'.
__init__ takes the correspondig args in this order.
+ .. tabularcolumns:: |l|p{30em}|l|
+
============== ======================================== ==================
Attribute Description Example
============== ======================================== ==================
diff --git a/ryu/lib/packet/llc.py b/ryu/lib/packet/llc.py
index 085b2d58..2a0926cd 100644
--- a/ryu/lib/packet/llc.py
+++ b/ryu/lib/packet/llc.py
@@ -104,6 +104,8 @@ class llc(packet_base.PacketBase):
order.
__init__ takes the correspondig args in this order.
+ .. tabularcolumns:: |l|L|
+
=============== ===============================================
Attribute Description
=============== ===============================================
diff --git a/ryu/lib/packet/slow.py b/ryu/lib/packet/slow.py
index 822deead..5ace157d 100644
--- a/ryu/lib/packet/slow.py
+++ b/ryu/lib/packet/slow.py
@@ -88,53 +88,57 @@ class lacp(packet_base.PacketBase):
| Version Number | 1 |
+------------+-----------------------------------+--------+
| TLV | TLV_type = Actor Information | 1 |
- | Actor +-----------------------------------+--------+
+ | Actor | | |
+ +------------+-----------------------------------+--------+
| | Actor_Information_Length = 20 | 1 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Actor_System_Priority | 2 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Actor_System | 6 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Actor_Key | 2 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Actor_Port_Priority | 2 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Actor_Port | 2 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Actor_State | 1 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Reserved | 3 |
+------------+-----------------------------------+--------+
| TLV | TLV_type = Partner Information | 1 |
- | Partner +-----------------------------------+--------+
+ | Partner | | |
+ +------------+-----------------------------------+--------+
| | Partner_Information_Length = 20 | 1 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Partner_System_Priority | 2 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Partner_System | 6 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Partner_Key | 2 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Partner_Port_Priority | 2 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Partner_Port | 2 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Partner_State | 1 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Reserved | 3 |
+------------+-----------------------------------+--------+
| TLV | TLV_type = Collector Information | 1 |
- | Collector +-----------------------------------+--------+
+ | Collector | | |
+ +------------+-----------------------------------+--------+
| | Collector_Information_Length = 16 | 1 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Collector_Max_Delay | 2 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Reserved | 12 |
+------------+-----------------------------------+--------+
| TLV | TLV_type = Terminator | 1 |
- | Terminator +-----------------------------------+--------+
+ | Terminator | | |
+ +------------+-----------------------------------+--------+
| | Terminator_Length = 0 | 1 |
- | +-----------------------------------+--------+
+ +------------+-----------------------------------+--------+
| | Reserved | 50 |
+------------+-----------------------------------+--------+
@@ -187,6 +191,8 @@ class lacp(packet_base.PacketBase):
order.
__init__ takes the correspondig args in this order.
+ .. tabularcolumns:: |l|L|
+
=============================== ====================================
Attribute Description
=============================== ====================================
@@ -209,60 +215,74 @@ class lacp(packet_base.PacketBase):
actor_state_activity .. _lacp_activity:
- | about the activity control value
- with regard to this link.
- | LACP_STATE_ACTIVE(1)
- | LACP_STATE_PASSIVE(0)
+ about the activity control value
+ with regard to this link.
+
+ LACP_STATE_ACTIVE(1)
+
+ LACP_STATE_PASSIVE(0)
actor_state_timeout .. _lacp_timeout:
- | about the timeout control value
- with regard to this link.
- | LACP_STATE_SHORT_TIMEOUT(1)
- | LACP_STATE_LONG_TIMEOUT(0)
+ about the timeout control value
+ with regard to this link.
+
+ LACP_STATE_SHORT_TIMEOUT(1)
+
+ LACP_STATE_LONG_TIMEOUT(0)
actor_state_aggregation .. _lacp_aggregation:
- | about how the system regards this
- link from the point of view of the
- aggregation.
- | LACP_STATE_AGGREGATEABLE(1)
- | LACP_STATE_INDIVIDUAL(0)
+ about how the system regards this
+ link from the point of view of the
+ aggregation.
+
+ LACP_STATE_AGGREGATEABLE(1)
+
+ LACP_STATE_INDIVIDUAL(0)
actor_state_synchronization .. _lacp_synchronization:
- | about how the system regards this
- link from the point of view of the
- synchronization.
- | LACP_STATE_IN_SYNC(1)
- | LACP_STATE_OUT_OF_SYNC(0)
+ about how the system regards this
+ link from the point of view of the
+ synchronization.
+
+ LACP_STATE_IN_SYNC(1)
+
+ LACP_STATE_OUT_OF_SYNC(0)
actor_state_collecting .. _lacp_collecting:
- | about collecting of incoming
- frames.
- | LACP_STATE_COLLECTING_ENABLED(1)
- | LACP_STATE_COLLECTING_DISABLED(0)
+ about collecting of incoming frames.
+
+ LACP_STATE_COLLECTING_ENABLED(1)
+
+ LACP_STATE_COLLECTING_DISABLED(0)
actor_state_distributing .. _lacp_distributing:
- | about distributing of outgoing
- frames.
- | LACP_STATE_DISTRIBUTING_ENABLED(1)
- | LACP_STATE_DISTRIBUTING_DISABLED(0)
+ about distributing of outgoing frames.
+
+ LACP_STATE_DISTRIBUTING_ENABLED(1)
+
+ LACP_STATE_DISTRIBUTING_DISABLED(0)
actor_state_defaulted .. _lacp_defaulted:
- | about the Partner information
- which the the Actor use.
- | LACP_STATE_DEFAULTED_PARTNER(1)
- | LACP_STATE_OPERATIONAL_PARTNER(0)
+ about the Partner information
+ which the the Actor use.
+
+ LACP_STATE_DEFAULTED_PARTNER(1)
+
+ LACP_STATE_OPERATIONAL_PARTNER(0)
actor_state_expired .. _lacp_expired:
- | about the state of the Actor.
- | LACP_STATE_EXPIRED(1)
- | LACP_STATE_NOT_EXPIRED(0)
+ about the state of the Actor.
+
+ LACP_STATE_EXPIRED(1)
+
+ LACP_STATE_NOT_EXPIRED(0)
partner_system_priority The priority assigned to the
Partner System.