event: Add sync flag and event src for request/reply

- To distinguish synchronous request or not.
- Event src is needed for asynchronous request too.

Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
topology: switch discovering module

This is an alternative of dpset, which supports event passing.

event.py: event class
switches.py: switch(datapath) discovery app using ofp_event
dumper.py: test and example app using switch discovery event

Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
topology: support link discovery

event.py: add link events.
switches.py: add link discovery (only of1.0).
dumper.py: add handler for link events.

TODO: support other OpenFlow version.

Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
nx_match: add vlan and vlan_pop

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu-manager: use try-finally statement

This fixes a problem that app_mgr.close() is not called when
KeyboardInterrupt exception occurs.

Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
app_manager: fix close dict handling bug

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

This application operates a switch as a firewall.

Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
update ofctl_v1_0 library

This patch contains the update for ofctl_v1_0 library.

Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
add ofctl_v1_2 library

This is a openflow v1.2 control library.

Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib ofctl_v1_2: fix file modes

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