ofctl_v1_2/3: IPv4 dotted decimal subnet mask support

This enables to_match_ip() to accept IPv4 address with dotted decimal
subnet mask or ACL hybrid CIDR.

Given 3 match field values below:

    '192.168.1.0/24'
    '192.168.1.0/255.255.255.0'
    '192.168.1.0/0.0.0.255'

These addresses are logically equivalent.

Signed-off-by: Wei-Li Tang <alextwl@xinguard.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu.conf: obsoleted argument used in sample configuration

ofp_listen_port was obsoleted and users should use ofp_tcp_listen_port
(or ofp_ssl_listen_port if ssl enabled) instead.

Signed-off-by: Wei-Li Tang <alextwl@xinguard.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
add ryu.cfg

also, make CONF accessible via RyuApp.CONF.
add a comment to explain the intention.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu.cfg: re-export some frequently used stuff for convenience

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
reduce direct uses of oslo.config.cfg.CONF

no functional changes are intended.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
fix NX_EXPERIMENTER_ID

also, comment registry url.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
pyang plugin to generate of_config.generated_classes

the current version of generated_classes was written by hand.
this plugin allows it to be auto-generated from the yang module
of OF-Config if/when it's available.

unfortunately, there seems to be no yang modules usable for this
purpose publically available yet, though.
the yang module of OF-Config 1.1.1 is embedded in pdf.  besides that
it's hard to extract from the pdf, its license is unclear.
OF-Config 1.2 says that its yang module is distributed as a separate
file.  but i couldn't find it on ONF site.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
library_packet.rst: fix an example code

Reported by Sebastian Gebhard on ryu-devel@.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofctl_v1_3: Fix unsuitable log

ofproto_v1_3.OFPGT_ALL is 0 and 0 is False on Python. When using type 'ALL', the following is set to True.

if not type_:
    LOG.debug('Unknown type: %s', group.get('type'))

Therefore, the log unsuitable is outputted:
Unknown type: ALL

Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofctl_v1_2: Fix unsuitable log

When using type 'ALL', the log unsuitable is outputted:
Unknown type: ALL

Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sw test tool: avoid test termination in initialization

The initialization error of the flow tables causes forced termination of the test,
 and has become the hindrance of execution of other tests.
This patch changes operation of the flow tables initialization error
 to avoid forced termination of the test.

Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka1@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofctl_v1_2/3: Convert IP fields to string with dotted decimal mask

This enables match_ip*_to_str() functions to output IP address with
dotted decimal subnet mask if the mask cannot be represented in CIDR
format.

Reported-by: Yi-Ching Lee <potatoching11@gmail.com>
Reported-by: Li-Der Chou <cld@csie.ncu.edu.tw>
Signed-off-by: Wei-Li Tang <alextwl@xinguard.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
dpset: absorb *args, **kwargs passed to __init__

dpset might be initialied implicitly like OFPHandler.
In that case, _CONTEXTS are passed to dpset. so we should ignore them.

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of14: Add OFPFlowUpdate

This will be used by flow monitor reply messages

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of14: Add flow monitor request support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of14: Add flow monitor reply support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
packet_data_generator: New ofproto dependency for v5 updates

Update ofproto dependency to include a merge of the mainline
v5 branch which includes:
* Bundle messages
* Flow monitor messages
* Request Forward message
* Table Status message
* Fix for length of Flow Update Full entry of Flow Monitor reply message

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of14: Add flow monitor request unit test

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of14: Add flow monitor reply message unit test

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of14: Add table status support

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>