deb-ryu/ryu/lib/packet
Isaku Yamahata 3837a84eec lib/packet: teach packet library to truncate padding octet
The patch teaches packet library to truncate padding octets.
Change packet_base.parser() to return (header, next_type, rest_of_packet)
The protocol class that knows its payload length should rest_of_packet
where padding octets at the last of packet is truncated.

As bonus,
- fix ipv6 parser as ipv6 header doesn't have options.
  It seems copy-and-paste from ipv4
- improve ipv4, tcp a bit

Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Cc: Shaun Crampton <Shaun.Crampton@metaswitch.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-07-02 01:19:27 +09:00
..
__init__.py packet lib: make test_packet work stand-alone 2013-06-01 21:11:51 +09:00
arp.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
dhcp.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
ethernet.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
icmp.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
icmpv6.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
ipv4.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
ipv6.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
lldp.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
mpls.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
packet_base.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
packet_utils.py lib/packet/packet_utils: optimize checksum 2013-04-02 12:00:12 +09:00
packet.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
tcp.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
udp.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
vlan.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00
vrrp.py lib/packet: teach packet library to truncate padding octet 2013-07-02 01:19:27 +09:00