lacplib: set the max priority to LACP flow entries

The measure against the default priority of OFPFlowMod of OFP1.2/1.3
being 0.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofctl_v1_3.py: Add get_desc_stats & get_port_stats from ofctl_v1_0.py.

ofctl_v1_3 lacks of get_desc_stats & get_port_stats methods which is available
in ofctl_v1_0. I copied the code from ofctl_v1_0 and it works fine. The only
change to get_port_stats in ofctl_v1_3 is using OFPP_ANY as argument to call
OFPPortStatsRequest.

Signed-off-by: Wei-Li Tang <alextwl@xinguard.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofctl_rest.py: Fix compatibily for both OF 1.0 & 1.3 datapaths.

dp.ofproto.OFP_VERSION is a single value which represents only one version,
so determining OFP_VERSION by two 'if's breaks compatibility for both OF 1.0 &
1.3 datapaths. The patch fixes get_flow_stats & mod_flow_entry broken in OF1.0
dp and get_desc_stats, get_port_stats & delete_flow_entry broken in OF1.3 dp.

It makes delete_flow_entry as a flow mod wrapper with empty flow entry for 1.3
instead of adding more methods into ofctl_v1_3.py.

This is based on my last patch to ofctl_v1_3.py.

Signed-off-by: Wei-Li Tang <alextwl@xinguard.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: icmpv6: correct typos

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: icmpv6: change the timing of bit shift

As well as the automatic calculation, do bit shift when encoding.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: icmpv6: move ND_OPTION_* constants from classes to the module

the purpose is to avoid keeping the same constant values at several places.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: icmpv6: include type and length in nd_option object

the purpose is to simplify the creation of the nd_router_advert object.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: icmpv6: omit type of nd_option object

because the kind of a nd_option object and type express the same thing.
with such changes, nd_option_la was inherited by nd_option_sla and nd_option_tla.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: icmpv6: support len(icmpv6.*)

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: icmpv6: support default parameters and the auto calculation of lengths

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: icmp: support len(icmp.*)

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: icmp: support default parameters

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet lib: add unittests that use default parameters of IPv4/IPv6 and ICMP/ICMPv6

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>