nx: make pack string of IPv6 address consistent with OF1.2/1.3

Changed pack string of IPv6 address in NXM from former '!4I' to
'!8H'. Registered IPv6 src/dst field header so we could parse IPv6
addresses now.

Signed-off-by: Can Zhang <can@canx.me>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
nx: match_tuple() function now handles nw src/dst

match_tuple() function now handles nw src/dst correctly. FIX:
match_tuple function now handles the nw src/dst masks correctly. If
the mask is not valid, because there is no NX, it will be ignored.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
setup.py: install xsd files

They are necessary for OF-config support.

Cc: Shivaram Mysore <shivaram.mysore@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
tests/integrated/test_of_config: disable known host check

This test can fail with unknow hosts as follows.
Since this is a OF-config test/sample, known host check is not essential.
Disable the check to avoid non-essential problem for easy test.

> ryu $ PYTHONPATH=. ./bin/ryu-manager --verbose ryu/tests/integrated/test_of_config.py
> loading app ryu/tests/integrated/test_of_config.py
> loading app ryu.controller.ofp_handler
> instantiating app ryu/tests/integrated/test_of_config.py of OFConfigClient
> <SSHSession(session, initial daemon)> created: client_capabilities=['urn:ietf:params:netconf:capability:writable-running:1.0', 'urn:ietf:params:netconf:capability:rollback-on-error:1.0', 'urn:ietf:params:netconf:capability:validate:1.0', 'urn:ietf:params:netconf:capability:confirmed-commit:1.0', 'urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file,https,sftp', 'urn:ietf:params:netconf:base:1.0', 'urn:liberouter:params:netconf:capability:power-control:1.0', 'urn:ietf:params:netconf:capability:candidate:1.0', 'urn:ietf:params:netconf:capability:xpath:1.0', 'urn:ietf:params:netconf:capability:startup:1.0', 'urn:ietf:params:netconf:capability:interleave:1.0']
> starting thread (client mode): 0x2348650L
> Connected (version 2.0, client Erlang)
> kex algos:['diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-cbc', '3des-cbc'] server encrypt:['aes128-cbc', '3des-cbc'] client mac:['hmac-sha1'] server mac:['hmac-sha1'] client compress:['none', 'zlib'] server compress:['none', 'zlib'] client lang:[''] server lang:[''] kex follows?False
> Ciphers agreed: local=aes128-cbc, remote=aes128-cbc
> using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-cbc, remote aes128-cbc; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
> Switch to new keys ...
> Traceback (most recent call last):
>   File "./bin/ryu-manager", line 87, in <module>
>     main()
>   File "./bin/ryu-manager", line 67, in main
>     app_mgr.instantiate_apps(**contexts)
>   File "/ryu/ryu/base/app_manager.py", line 289, in instantiate_apps
>     self._instantiate(app_name, cls, *args, **kwargs)
>   File "/ryu/ryu/base/app_manager.py", line 275, in _instantiate
>     app = cls(*args, **kwargs)
>   File "/ryu/ryu/tests/integrated/test_of_config.py", line 123, in __init__
>     host=HOST, port=PORT, username=USERNAME, password=PASSWORD)
>   File "/ryu/ryu/lib/of_config/capable_switch.py", line 49, in __init__
>     self.netconf = connect(*self._connect_args, **self._connect_kwargs)
>   File "/ryu/ryu/contrib/ncclient/manager.py", line 67, in connect_ssh
>     session.connect(*args, **kwds)
>   File "/ryu/ryu/contrib/ncclient/transport/ssh.py", line 193, in connect
>     raise SSHUnknownHostError(host, fingerprint)
> ncclient.transport.errors.SSHUnknownHostError: Unknown host key [63:c2:19:95:97:29:84:f6:86:41:1a:15:17:d7:90:0d] for [127.0.0.1]

Cc: Shivaram Mysore <shivaram.mysore@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
tests/integrated/test_of_config: comment on how to run

Cc: Shivaram Mysore <shivaram.mysore@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu/lib/packet/lldp.py: remove __str__ method from class LLDPBasicTLV and class lldp

Those methods are legacy when lldp.py was written for dpkt.
They don't make sense. remove them.

Cc: "can." <can@canx.me>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib/packet/lldp.py: pylint

> W: 78,0:LLDPBasicTLV.__init__: Unused argument 'args'
> W: 78,0:LLDPBasicTLV.__init__: Unused argument 'kwargs'
> W:109,4:lldp.__init__: __init__ method from base class 'PacketBase' is not called

Cc: "can." <can@canx.me>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of1.3: Add special group identifier values defined on OpenFlow 1.3.1

This patch add missing group special values of OpenFlow 1.3, added to
the 1.3.1 version.

It is useful to create a flow_mod message with an out_group with no >
group restrictions and for flow_stats messages.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
doc: fix the mailing list address

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofproto/nx_match: pep8

> $ pep8 --version
> 1.4.5
> ryu/ofproto/nx_match.py:743:20: E128 continuation line under-indented for visual indent
>                    ofproto_v1_0.NXM_NX_IPV6_SRC_W])
>                    ^
> ryu/ofproto/nx_match.py:764:20: E128 continuation line under-indented for visual indent
>                    ofproto_v1_0.NXM_NX_IPV6_DST_W])
>                    ^

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib/packet/arp.py: add convenience function to create arp for ip

Since ip case is most often used, introduce a convenience
function for that.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofproto/inet: add VRRP protocol number

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib/packet/ipv4: add constants for parse/serialize

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib/packet/ipv6: add constants for parse/serialize

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib/packet: VRRP packet parser/serializer

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
tests/unit, lib/packet/vrrp: unit test for vrrp packet parser/serializer

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: docstring

also, prefix a private method with _.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
g/c a stale reference to find_protocol

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib: ip address presentation convert helper methods

Signed-off-by: Can Zhang <can@canx.me>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of1.0: add nx_match to NXFlowStatsRequest

Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>