trema 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -1
- data/Doxyfile +1 -1
- data/Gemfile +18 -6
- data/README.md +112 -5
- data/Rakefile +3 -1
- data/Rantfile +88 -1
- data/bin/trema +248 -0
- data/bin/trema-config +59 -0
- data/cruise.rb +1 -1
- data/features/example.dumper.feature +45 -65
- data/features/example.hello_trema.feature +21 -0
- data/features/example.learning_switch.feature +26 -28
- data/features/example.list_switches.feature +19 -33
- data/features/example.message.echo_reply.feature +10 -10
- data/features/example.message.echo_request.feature +2 -2
- data/features/example.message.features_request.feature +6 -5
- data/features/example.message.hello.feature +47 -13
- data/features/example.message.set_config.feature +4 -4
- data/features/example.message.vendor-action.feature +23 -0
- data/features/example.multi_learning_switch.feature +14 -42
- data/features/example.packet_in.feature +31 -0
- data/features/example.packetin_filter_config.feature +11 -7
- data/features/example.patch_panel.feature +29 -0
- data/features/example.repeater_hub.feature +43 -40
- data/features/example.switch_info.feature +51 -0
- data/features/example.switch_monitor.feature +24 -42
- data/features/packetin_filter.feature +28 -22
- data/features/step_definitions/misc_steps.rb +19 -8
- data/features/step_definitions/send_packets_steps.rb +1 -10
- data/features/step_definitions/stats_steps.rb +4 -4
- data/features/support/env.rb +2 -1
- data/features/support/hooks.rb +35 -2
- data/features/switch_manager.feature +18 -12
- data/features/trema-config.feature +26 -39
- data/features/trema.dump_flows.feature +26 -12
- data/features/trema.help.feature +26 -0
- data/features/trema.kill.feature +39 -41
- data/features/trema.killall.feature +23 -23
- data/features/trema.reset_stats.feature +50 -10
- data/features/trema.run.feature +28 -39
- data/features/trema.send_packets.feature +29 -40
- data/features/trema.show_stats.feature +30 -33
- data/features/trema.up.feature +33 -0
- data/features/trema.version.feature +9 -0
- data/ruby/extconf.rb +7 -0
- data/ruby/trema/aggregate-stats-reply.rb +3 -3
- data/ruby/trema/app.rb +5 -1
- data/ruby/trema/barrier-request.c +55 -30
- data/ruby/trema/cli.rb +8 -8
- data/ruby/trema/command.rb +1 -3
- data/ruby/trema/command/dump_flows.rb +5 -24
- data/ruby/trema/command/kill.rb +31 -36
- data/ruby/trema/command/killall.rb +1 -19
- data/{features/step_definitions/kill_steps.rb → ruby/trema/command/netns.rb} +13 -5
- data/ruby/trema/command/reset_stats.rb +3 -23
- data/ruby/trema/command/ruby.rb +2 -19
- data/ruby/trema/command/run.rb +6 -27
- data/ruby/trema/command/send_packets.rb +6 -90
- data/ruby/trema/command/show_stats.rb +21 -40
- data/ruby/trema/command/up.rb +5 -26
- data/ruby/trema/command/version.rb +1 -5
- data/ruby/trema/controller.c +14 -16
- data/ruby/trema/custom-switch.rb +56 -0
- data/ruby/trema/desc-stats-reply.rb +5 -5
- data/ruby/trema/dsl/configuration.rb +4 -0
- data/{features/step_definitions/up_steps.rb → ruby/trema/dsl/custom-switch.rb} +18 -4
- data/ruby/trema/dsl/netns.rb +78 -0
- data/ruby/trema/dsl/parser.rb +2 -0
- data/ruby/trema/dsl/runner.rb +8 -0
- data/ruby/trema/dsl/syntax.rb +18 -0
- data/ruby/trema/echo-reply.h +2 -2
- data/ruby/trema/echo-request.c +3 -5
- data/ruby/trema/enqueue.rb +2 -2
- data/ruby/trema/error.c +3 -3
- data/ruby/trema/executables.rb +26 -2
- data/ruby/trema/features-request.c +3 -5
- data/ruby/trema/flow-removed.c +6 -6
- data/ruby/trema/flow-stats-reply.rb +6 -8
- data/ruby/trema/flow.rb +12 -1
- data/ruby/trema/get-config-request.c +55 -28
- data/ruby/trema/hello.c +3 -5
- data/ruby/trema/host.rb +8 -0
- data/ruby/trema/list-switches-reply.c +1 -1
- data/ruby/trema/mac.rb +1 -1
- data/ruby/trema/match.c +15 -14
- data/ruby/trema/monkey-patch/module/deprecation.rb +0 -2
- data/ruby/trema/netns.rb +127 -0
- data/ruby/trema/ordered-hash.rb +5 -4
- data/ruby/trema/packet-in.c +136 -113
- data/ruby/trema/packet-queue.rb +9 -9
- data/ruby/trema/packetin-filter.rb +1 -1
- data/ruby/trema/phost.rb +16 -7
- data/ruby/trema/port-mod.c +6 -5
- data/ruby/trema/port-stats-reply.rb +2 -2
- data/ruby/trema/process.rb +29 -0
- data/ruby/trema/queue-stats-reply.rb +2 -4
- data/ruby/trema/send-out-port.rb +5 -3
- data/ruby/trema/set-eth-addr.rb +4 -0
- data/ruby/trema/set-ip-addr.rb +4 -2
- data/ruby/trema/set-ip-dst-addr.rb +2 -1
- data/ruby/trema/set-ip-src-addr.rb +2 -1
- data/ruby/trema/set-ip-tos.rb +3 -2
- data/ruby/trema/set-transport-port.rb +3 -2
- data/ruby/trema/set-vlan-priority.rb +3 -2
- data/ruby/trema/set-vlan-vid.rb +5 -4
- data/ruby/trema/shell/reset_stats.rb +2 -1
- data/ruby/trema/shell/run.rb +1 -1
- data/ruby/trema/shell/send_packets.rb +1 -1
- data/ruby/trema/shell/show_stats.rb +1 -1
- data/ruby/trema/stats-helper.rb +3 -3
- data/ruby/trema/stats-reply.c +26 -17
- data/ruby/trema/stats-request.c +39 -41
- data/ruby/trema/switch-daemon.rb +36 -31
- data/ruby/trema/switch.c +1 -1
- data/ruby/trema/table-stats-reply.rb +1 -1
- data/ruby/trema/timers.rb +13 -13
- data/ruby/trema/trema.c +3 -3
- data/ruby/trema/tremashark.rb +9 -2
- data/ruby/trema/util.rb +39 -15
- data/ruby/trema/vendor-action.rb +8 -3
- data/ruby/trema/vendor-stats-reply.rb +4 -6
- data/ruby/trema/vendor.c +1 -1
- data/ruby/trema/version.rb +1 -1
- data/spec/trema/barrier-request_spec.rb +47 -37
- data/spec/trema/controller_spec.rb +1 -0
- data/spec/trema/dsl/runner_spec.rb +8 -3
- data/spec/trema/dsl/vhost_spec.rb +8 -8
- data/spec/trema/echo-request_spec.rb +1 -0
- data/spec/trema/features-request_spec.rb +1 -0
- data/spec/trema/flow-removed_spec.rb +9 -9
- data/spec/trema/get-config-request_spec.rb +51 -39
- data/spec/trema/match_spec.rb +1 -1
- data/spec/trema/openflow-error_spec.rb +11 -11
- data/spec/trema/packet-out_spec.rb +5 -5
- data/spec/trema/queue-get-config-reply_spec.rb +1 -1
- data/spec/trema/queue-get-config-request_spec.rb +1 -1
- data/spec/trema/set-eth-dst-addr_spec.rb +1 -1
- data/spec/trema/set-eth-src-addr_spec.rb +1 -1
- data/spec/trema/set-ip-dst-addr_spec.rb +1 -0
- data/spec/trema/set-ip-src-addr_spec.rb +1 -0
- data/spec/trema/set-ip-tos_spec.rb +1 -0
- data/spec/trema/set-transport-dst-port_spec.rb +1 -0
- data/spec/trema/set-transport-src-port_spec.rb +1 -0
- data/spec/trema/set-vlan-priority_spec.rb +1 -0
- data/spec/trema/set-vlan-vid_spec.rb +2 -1
- data/spec/trema/stats-reply_spec.rb +38 -36
- data/spec/trema/stats-request_spec.rb +6 -6
- data/spec/trema/strip-vlan-header_spec.rb +1 -0
- data/spec/trema/util_spec.rb +3 -2
- data/spec/trema/vendor-action_spec.rb +9 -8
- data/src/examples/dumper/dumper.c +8 -6
- data/src/examples/dumper/dumper.rb +1 -1
- data/{features/step_definitions/killall_steps.rb → src/examples/hello_trema/hello-trema.rb} +6 -5
- data/src/examples/hello_trema/hello_trema.c +4 -4
- data/src/examples/learning_switch/learning_switch.c +1 -1
- data/src/examples/list_switches/list_switches.c +2 -2
- data/src/examples/match_compare/match-compare.rb +2 -2
- data/src/examples/multi_learning_switch/multi-learning-switch.rb +1 -1
- data/src/examples/multi_learning_switch/multi_learning_switch.c +3 -3
- data/src/examples/openflow_message/README +1 -1
- data/src/examples/openflow_message/echo-request.rb +1 -1
- data/src/examples/openflow_message/features_request.c +21 -21
- data/src/examples/openflow_message/hello.c +1 -3
- data/src/examples/openflow_message/hello.rb +9 -24
- data/src/examples/{hello_trema/hello_trema.rb → openflow_message/vendor-action.rb} +17 -7
- data/src/examples/openflow_message/vendor_action.c +105 -0
- data/src/examples/openflow_switch/hello_switch.c +81 -0
- data/src/examples/packet_in/packet-in.rb +9 -13
- data/src/examples/packetin_filter_config/packetin_filter_config.c +2 -2
- data/src/examples/patch_panel/network.conf +14 -0
- data/src/examples/patch_panel/patch-panel.conf +1 -0
- data/{features/step_definitions/show_stats_steps.rb → src/examples/patch_panel/patch-panel.rb} +29 -13
- data/src/examples/switch_info/{switch_info.rb → switch-info.rb} +2 -2
- data/src/examples/switch_info/switch_info.c +4 -4
- data/src/examples/switch_monitor/switch_monitor.c +3 -3
- data/src/examples/traffic_monitor/counter.c +9 -9
- data/src/examples/traffic_monitor/fdb.c +9 -9
- data/src/lib/arp.h +1 -1
- data/src/lib/buffer.c +4 -3
- data/src/lib/byteorder.c +31 -5
- data/src/lib/byteorder.h +2 -2
- data/src/lib/chibach.c +8 -6
- data/src/lib/daemon.c +29 -3
- data/src/lib/doubly_linked_list.c +6 -1
- data/src/lib/ether.c +1 -1
- data/src/lib/ether.h +1 -1
- data/src/lib/event_handler.c +3 -3
- data/src/lib/hash_table.c +1 -1
- data/src/lib/linked_list.c +50 -2
- data/src/lib/linked_list.h +2 -2
- data/src/lib/log.c +122 -22
- data/src/lib/log.h +13 -9
- data/src/lib/management_interface.c +361 -0
- data/src/lib/management_interface.h +42 -0
- data/src/lib/management_service_interface.c +104 -0
- data/src/lib/management_service_interface.h +136 -0
- data/src/lib/match_table.c +5 -5
- data/src/lib/message_queue.c +5 -3
- data/src/lib/message_queue.h +1 -1
- data/src/lib/messenger.c +73 -39
- data/src/lib/messenger.h +3 -2
- data/src/lib/openflow_application_interface.c +17 -17
- data/src/lib/openflow_message.c +175 -23
- data/src/lib/openflow_message.h +2 -1
- data/src/lib/openflow_switch_interface.c +12 -12
- data/src/lib/packet_parser.c +11 -32
- data/src/lib/packetin_filter_interface.c +5 -5
- data/src/lib/persistent_storage.c +7 -7
- data/src/lib/secure_channel.c +6 -6
- data/src/lib/secure_channel.h +1 -1
- data/src/lib/stat.c +54 -17
- data/src/lib/stat.h +9 -0
- data/src/lib/timer.c +11 -10
- data/src/lib/trema.c +38 -9
- data/src/lib/trema.h +1 -0
- data/src/lib/trema_private.h +6 -0
- data/src/lib/trema_wrapper.c +4 -4
- data/src/lib/trema_wrapper.h +10 -10
- data/src/lib/utility.c +6 -6
- data/src/management/application.c +224 -0
- data/src/management/echo.c +185 -0
- data/src/management/set_logging_level.c +153 -0
- data/src/management/show_stats.c +150 -0
- data/src/management/trema_manager +184 -0
- data/src/packetin_filter/packetin_filter.c +31 -29
- data/src/switch_manager/cookie_table.c +7 -7
- data/src/switch_manager/dpid_table.c +3 -3
- data/src/switch_manager/dpid_table.h +0 -1
- data/src/switch_manager/management_interface.h +0 -1
- data/src/switch_manager/ofpmsg_recv.c +3 -3
- data/src/switch_manager/ofpmsg_recv.h +0 -1
- data/src/switch_manager/ofpmsg_send.c +2 -2
- data/src/switch_manager/ofpmsg_send.h +0 -1
- data/src/switch_manager/secure_channel_listener.c +2 -2
- data/src/switch_manager/secure_channel_receiver.c +2 -2
- data/src/switch_manager/secure_channel_receiver.h +0 -1
- data/src/switch_manager/secure_channel_sender.c +8 -1
- data/src/switch_manager/service_interface.c +5 -4
- data/src/switch_manager/switch.c +79 -53
- data/src/switch_manager/switch_manager.c +24 -22
- data/src/switch_manager/xid_table.c +6 -6
- data/src/switch_manager/xid_table.h +0 -1
- data/src/tremashark/README +4 -3
- data/src/tremashark/packet_capture.c +11 -9
- data/src/tremashark/pcap_queue.c +2 -2
- data/src/tremashark/pcap_queue.h +2 -2
- data/src/tremashark/plugin/packet-trema/Makefile +1 -1
- data/src/tremashark/plugin/packet-trema/Makefile.common +1 -1
- data/src/tremashark/plugin/packet-trema/packet-trema.c +50 -37
- data/src/tremashark/queue.c +5 -4
- data/src/tremashark/queue.h +1 -1
- data/src/tremashark/stdin_relay.c +10 -8
- data/src/tremashark/syslog_relay.c +14 -12
- data/src/tremashark/tremashark.c +15 -18
- data/trema +2 -96
- data/trema-config +2 -52
- data/trema.gemspec +12 -1
- data/unittests/cmockery_trema.h +14 -13
- data/unittests/lib/buffer_test.c +1 -1
- data/unittests/lib/byteorder_test.c +108 -25
- data/unittests/lib/daemon_test.c +141 -5
- data/unittests/lib/doubly_linked_list_test.c +5 -1
- data/unittests/lib/ether_test.c +4 -4
- data/unittests/lib/hash_table_test.c +5 -3
- data/unittests/lib/linked_list_test.c +82 -4
- data/unittests/lib/log_test.c +96 -5
- data/unittests/lib/management_interface_test.c +240 -0
- data/unittests/lib/management_service_interface_test.c +319 -0
- data/unittests/lib/message_queue_test.c +6 -2
- data/unittests/lib/messenger_test.c +167 -2
- data/unittests/lib/openflow_application_interface_test.c +16 -22
- data/unittests/lib/openflow_message_test.c +721 -24
- data/unittests/lib/packet_info_test.c +2 -2
- data/unittests/lib/packet_parser_test.c +15 -16
- data/unittests/lib/packetin_filter_interface_test.c +6 -6
- data/unittests/lib/persistent_storage_test.c +11 -11
- data/unittests/lib/stat_test.c +151 -7
- data/unittests/lib/timer_test.c +1 -1
- data/unittests/lib/trema_private_test.c +2 -2
- data/unittests/lib/trema_test.c +40 -12
- data/unittests/lib/utility_test.c +3 -3
- data/unittests/lib/wrapper_test.c +3 -3
- data/unittests/packetin_filter/packetin_filter_test.c +12 -11
- data/unittests/switch_manager/switch_manager_test.c +29 -22
- metadata +99 -20
- data/features/step_definitions/log_steps.rb +0 -90
- data/features/step_definitions/run_steps.rb +0 -91
- data/features/trema.feature +0 -27
- data/features/tutorial.hello_trema.feature +0 -27
- data/features/tutorial.packet_in.feature +0 -47
- data/features/tutorial.switch_info.feature +0 -55
- data/ruby/trema/command/usage.rb +0 -63
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 6
|
10
|
+
version: 0.2.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Yasuhito Takamiya
|
@@ -15,12 +15,12 @@ autorequire:
|
|
15
15
|
bindir: .
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-12-26 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
name: rake
|
22
21
|
prerelease: false
|
23
|
-
|
22
|
+
name: rake
|
23
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
@@ -29,8 +29,66 @@ dependencies:
|
|
29
29
|
segments:
|
30
30
|
- 0
|
31
31
|
version: "0"
|
32
|
+
requirement: *id001
|
33
|
+
type: :runtime
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
prerelease: false
|
36
|
+
name: gli
|
37
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ~>
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 31
|
43
|
+
segments:
|
44
|
+
- 2
|
45
|
+
- 5
|
46
|
+
- 2
|
47
|
+
version: 2.5.2
|
48
|
+
requirement: *id002
|
32
49
|
type: :runtime
|
33
|
-
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
prerelease: false
|
52
|
+
name: rake
|
53
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 3
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
62
|
+
requirement: *id003
|
63
|
+
type: :development
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
prerelease: false
|
66
|
+
name: rdoc
|
67
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
hash: 3
|
73
|
+
segments:
|
74
|
+
- 0
|
75
|
+
version: "0"
|
76
|
+
requirement: *id004
|
77
|
+
type: :development
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
prerelease: false
|
80
|
+
name: aruba
|
81
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 3
|
87
|
+
segments:
|
88
|
+
- 0
|
89
|
+
version: "0"
|
90
|
+
requirement: *id005
|
91
|
+
type: :development
|
34
92
|
description: Trema is a full-stack, easy-to-use framework for developing OpenFlow controllers in Ruby and C
|
35
93
|
email:
|
36
94
|
- yasuhito@gmail.com
|
@@ -52,9 +110,12 @@ files:
|
|
52
110
|
- README.md
|
53
111
|
- Rakefile
|
54
112
|
- Rantfile
|
113
|
+
- bin/trema
|
114
|
+
- bin/trema-config
|
55
115
|
- build.rb
|
56
116
|
- cruise.rb
|
57
117
|
- features/example.dumper.feature
|
118
|
+
- features/example.hello_trema.feature
|
58
119
|
- features/example.learning_switch.feature
|
59
120
|
- features/example.list_switches.feature
|
60
121
|
- features/example.message.echo_reply.feature
|
@@ -62,35 +123,32 @@ files:
|
|
62
123
|
- features/example.message.features_request.feature
|
63
124
|
- features/example.message.hello.feature
|
64
125
|
- features/example.message.set_config.feature
|
126
|
+
- features/example.message.vendor-action.feature
|
65
127
|
- features/example.multi_learning_switch.feature
|
128
|
+
- features/example.packet_in.feature
|
66
129
|
- features/example.packetin_filter_config.feature
|
130
|
+
- features/example.patch_panel.feature
|
67
131
|
- features/example.repeater_hub.feature
|
132
|
+
- features/example.switch_info.feature
|
68
133
|
- features/example.switch_monitor.feature
|
69
134
|
- features/packetin_filter.feature
|
70
|
-
- features/step_definitions/kill_steps.rb
|
71
|
-
- features/step_definitions/killall_steps.rb
|
72
|
-
- features/step_definitions/log_steps.rb
|
73
135
|
- features/step_definitions/misc_steps.rb
|
74
|
-
- features/step_definitions/run_steps.rb
|
75
136
|
- features/step_definitions/send_packets_steps.rb
|
76
|
-
- features/step_definitions/show_stats_steps.rb
|
77
137
|
- features/step_definitions/stats_steps.rb
|
78
|
-
- features/step_definitions/up_steps.rb
|
79
138
|
- features/support/env.rb
|
80
139
|
- features/support/hooks.rb
|
81
140
|
- features/switch_manager.feature
|
82
141
|
- features/trema-config.feature
|
83
142
|
- features/trema.dump_flows.feature
|
84
|
-
- features/trema.feature
|
143
|
+
- features/trema.help.feature
|
85
144
|
- features/trema.kill.feature
|
86
145
|
- features/trema.killall.feature
|
87
146
|
- features/trema.reset_stats.feature
|
88
147
|
- features/trema.run.feature
|
89
148
|
- features/trema.send_packets.feature
|
90
149
|
- features/trema.show_stats.feature
|
91
|
-
- features/
|
92
|
-
- features/
|
93
|
-
- features/tutorial.switch_info.feature
|
150
|
+
- features/trema.up.feature
|
151
|
+
- features/trema.version.feature
|
94
152
|
- locale/README.ja.md
|
95
153
|
- locale/ja/yard.po
|
96
154
|
- locale/yard.pot
|
@@ -112,6 +170,7 @@ files:
|
|
112
170
|
- ruby/trema/command/dump_flows.rb
|
113
171
|
- ruby/trema/command/kill.rb
|
114
172
|
- ruby/trema/command/killall.rb
|
173
|
+
- ruby/trema/command/netns.rb
|
115
174
|
- ruby/trema/command/reset_stats.rb
|
116
175
|
- ruby/trema/command/ruby.rb
|
117
176
|
- ruby/trema/command/run.rb
|
@@ -119,17 +178,19 @@ files:
|
|
119
178
|
- ruby/trema/command/shell.rb
|
120
179
|
- ruby/trema/command/show_stats.rb
|
121
180
|
- ruby/trema/command/up.rb
|
122
|
-
- ruby/trema/command/usage.rb
|
123
181
|
- ruby/trema/command/version.rb
|
124
182
|
- ruby/trema/controller.c
|
125
183
|
- ruby/trema/controller.h
|
126
184
|
- ruby/trema/controller.rb
|
185
|
+
- ruby/trema/custom-switch.rb
|
127
186
|
- ruby/trema/daemon.rb
|
128
187
|
- ruby/trema/desc-stats-reply.rb
|
129
188
|
- ruby/trema/dsl.rb
|
130
189
|
- ruby/trema/dsl/configuration.rb
|
131
190
|
- ruby/trema/dsl/context.rb
|
191
|
+
- ruby/trema/dsl/custom-switch.rb
|
132
192
|
- ruby/trema/dsl/link.rb
|
193
|
+
- ruby/trema/dsl/netns.rb
|
133
194
|
- ruby/trema/dsl/parser.rb
|
134
195
|
- ruby/trema/dsl/rswitch.rb
|
135
196
|
- ruby/trema/dsl/run.rb
|
@@ -187,6 +248,7 @@ files:
|
|
187
248
|
- ruby/trema/monkey-patch/module/deprecation.rb
|
188
249
|
- ruby/trema/monkey-patch/string.rb
|
189
250
|
- ruby/trema/monkey-patch/string/inflectors.rb
|
251
|
+
- ruby/trema/netns.rb
|
190
252
|
- ruby/trema/network-component.rb
|
191
253
|
- ruby/trema/ofctl.rb
|
192
254
|
- ruby/trema/open-vswitch.rb
|
@@ -351,9 +413,9 @@ files:
|
|
351
413
|
- src/examples/dumper/dumper.conf
|
352
414
|
- src/examples/dumper/dumper.rb
|
353
415
|
- src/examples/hello_trema/README
|
416
|
+
- src/examples/hello_trema/hello-trema.rb
|
354
417
|
- src/examples/hello_trema/hello_trema.c
|
355
418
|
- src/examples/hello_trema/hello_trema.conf
|
356
|
-
- src/examples/hello_trema/hello_trema.rb
|
357
419
|
- src/examples/learning_switch/README
|
358
420
|
- src/examples/learning_switch/fdb.rb
|
359
421
|
- src/examples/learning_switch/learning-switch.rb
|
@@ -381,6 +443,9 @@ files:
|
|
381
443
|
- src/examples/openflow_message/hello.rb
|
382
444
|
- src/examples/openflow_message/set-config.rb
|
383
445
|
- src/examples/openflow_message/set_config.c
|
446
|
+
- src/examples/openflow_message/vendor-action.rb
|
447
|
+
- src/examples/openflow_message/vendor_action.c
|
448
|
+
- src/examples/openflow_switch/hello_switch.c
|
384
449
|
- src/examples/packet_in/README
|
385
450
|
- src/examples/packet_in/packet-in.rb
|
386
451
|
- src/examples/packet_in/packet_in.c
|
@@ -395,15 +460,18 @@ files:
|
|
395
460
|
- src/examples/packetin_filter_config/packetin_filter_config.conf
|
396
461
|
- src/examples/packetin_filter_config/utils.c
|
397
462
|
- src/examples/packetin_filter_config/utils.h
|
463
|
+
- src/examples/patch_panel/network.conf
|
464
|
+
- src/examples/patch_panel/patch-panel.conf
|
465
|
+
- src/examples/patch_panel/patch-panel.rb
|
398
466
|
- src/examples/repeater_hub/README
|
399
467
|
- src/examples/repeater_hub/repeater-hub.rb
|
400
468
|
- src/examples/repeater_hub/repeater-hub_spec.rb
|
401
469
|
- src/examples/repeater_hub/repeater_hub.c
|
402
470
|
- src/examples/repeater_hub/repeater_hub.conf
|
403
471
|
- src/examples/switch_info/README
|
472
|
+
- src/examples/switch_info/switch-info.rb
|
404
473
|
- src/examples/switch_info/switch_info.c
|
405
474
|
- src/examples/switch_info/switch_info.conf
|
406
|
-
- src/examples/switch_info/switch_info.rb
|
407
475
|
- src/examples/switch_monitor/switch-monitor.conf
|
408
476
|
- src/examples/switch_monitor/switch-monitor.rb
|
409
477
|
- src/examples/switch_monitor/switch_monitor.c
|
@@ -446,6 +514,10 @@ files:
|
|
446
514
|
- src/lib/linked_list.h
|
447
515
|
- src/lib/log.c
|
448
516
|
- src/lib/log.h
|
517
|
+
- src/lib/management_interface.c
|
518
|
+
- src/lib/management_interface.h
|
519
|
+
- src/lib/management_service_interface.c
|
520
|
+
- src/lib/management_service_interface.h
|
449
521
|
- src/lib/match.h
|
450
522
|
- src/lib/match_table.c
|
451
523
|
- src/lib/match_table.h
|
@@ -486,6 +558,11 @@ files:
|
|
486
558
|
- src/lib/utility.h
|
487
559
|
- src/lib/wrapper.c
|
488
560
|
- src/lib/wrapper.h
|
561
|
+
- src/management/application.c
|
562
|
+
- src/management/echo.c
|
563
|
+
- src/management/set_logging_level.c
|
564
|
+
- src/management/show_stats.c
|
565
|
+
- src/management/trema_manager
|
489
566
|
- src/packetin_filter/README
|
490
567
|
- src/packetin_filter/packetin_filter.c
|
491
568
|
- src/switch_manager/README
|
@@ -546,6 +623,8 @@ files:
|
|
546
623
|
- unittests/lib/hash_table_test.c
|
547
624
|
- unittests/lib/linked_list_test.c
|
548
625
|
- unittests/lib/log_test.c
|
626
|
+
- unittests/lib/management_interface_test.c
|
627
|
+
- unittests/lib/management_service_interface_test.c
|
549
628
|
- unittests/lib/match_table_test.c
|
550
629
|
- unittests/lib/message_queue_test.c
|
551
630
|
- unittests/lib/messenger_test.c
|
@@ -1,90 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author: Yasuhito Takamiya <yasuhito@gmail.com>
|
3
|
-
#
|
4
|
-
# Copyright (C) 2008-2012 NEC Corporation
|
5
|
-
#
|
6
|
-
# This program is free software; you can redistribute it and/or modify
|
7
|
-
# it under the terms of the GNU General Public License, version 2, as
|
8
|
-
# published by the Free Software Foundation.
|
9
|
-
#
|
10
|
-
# This program is distributed in the hope that it will be useful,
|
11
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
-
# GNU General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU General Public License along
|
16
|
-
# with this program; if not, write to the Free Software Foundation, Inc.,
|
17
|
-
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
18
|
-
#
|
19
|
-
|
20
|
-
|
21
|
-
Then /^the output should be:$/ do | string |
|
22
|
-
IO.read( @log ).chomp.should == string.chomp
|
23
|
-
end
|
24
|
-
|
25
|
-
|
26
|
-
Then /^I should not get errors$/ do
|
27
|
-
step "the output should be:", ""
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
Then /^the output should include:$/ do | string |
|
32
|
-
string.chomp.split( "\n" ).each do | each |
|
33
|
-
IO.read( @log ).split( "\n" ).should include( each )
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
|
38
|
-
Then /^"([^"]*)" should be executed with option = "([^"]*)"$/ do | executable, options |
|
39
|
-
IO.read( @log ).should match( Regexp.new "#{ executable } #{ options }" )
|
40
|
-
end
|
41
|
-
|
42
|
-
|
43
|
-
Then /^the log file "([^"]*)" should be:$/ do | log_name, string |
|
44
|
-
IO.read( cucumber_log log_name ).chomp.should == string.chomp
|
45
|
-
end
|
46
|
-
|
47
|
-
|
48
|
-
Then /^the log file "([^"]*)" should include:$/ do | log_name, string |
|
49
|
-
IO.read( cucumber_log log_name ).split( "\n" ).should include( string )
|
50
|
-
end
|
51
|
-
|
52
|
-
|
53
|
-
Then /^the log file "([^"]*)" should match:$/ do | log_name, string |
|
54
|
-
IO.read( cucumber_log log_name ).should match( Regexp.new string )
|
55
|
-
end
|
56
|
-
|
57
|
-
|
58
|
-
Then /^the log file "([^"]*)" should include "([^"]*)" x (\d+)$/ do | log, message, n |
|
59
|
-
IO.read( cucumber_log log ).split( "\n" ).inject( 0 ) do | matched, each |
|
60
|
-
matched += 1 if each.include?( message )
|
61
|
-
matched
|
62
|
-
end.should == n.to_i
|
63
|
-
end
|
64
|
-
|
65
|
-
|
66
|
-
Then /^the content of "([^"]*)" should be:$/ do | log_name, string |
|
67
|
-
IO.read( cucumber_log log_name ).chomp( "" ).should == string.chomp
|
68
|
-
end
|
69
|
-
|
70
|
-
|
71
|
-
Then /^the content of "([^"]*)" and "([^"]*)" should be identical$/ do | log1, log2 |
|
72
|
-
IO.read( cucumber_log log1 ).size.should > 0
|
73
|
-
IO.read( cucumber_log log2 ).size.should > 0
|
74
|
-
IO.read( cucumber_log log1 ).chomp.should == IO.read( cucumber_log log2 ).chomp
|
75
|
-
end
|
76
|
-
|
77
|
-
|
78
|
-
Then /^"([^"]*)" should contain some flow entries$/ do | log |
|
79
|
-
IO.read( cucumber_log log ).size.should > 0
|
80
|
-
IO.read( cucumber_log log ).split( "\n" )[ 2..-1 ].each do | each |
|
81
|
-
each.should match( /actions=FLOOD/ )
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
|
86
|
-
### Local variables:
|
87
|
-
### mode: Ruby
|
88
|
-
### coding: utf-8-unix
|
89
|
-
### indent-tabs-mode: nil
|
90
|
-
### End:
|
@@ -1,91 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author: Yasuhito Takamiya <yasuhito@gmail.com>
|
3
|
-
#
|
4
|
-
# Copyright (C) 2008-2012 NEC Corporation
|
5
|
-
#
|
6
|
-
# This program is free software; you can redistribute it and/or modify
|
7
|
-
# it under the terms of the GNU General Public License, version 2, as
|
8
|
-
# published by the Free Software Foundation.
|
9
|
-
#
|
10
|
-
# This program is distributed in the hope that it will be useful,
|
11
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
-
# GNU General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU General Public License along
|
16
|
-
# with this program; if not, write to the Free Software Foundation, Inc.,
|
17
|
-
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
18
|
-
#
|
19
|
-
|
20
|
-
|
21
|
-
When /^I try to run "([^"]*)"$/ do | command |
|
22
|
-
@log ||= new_tmp_log
|
23
|
-
run "#{ command } >> #{ @log }"
|
24
|
-
end
|
25
|
-
|
26
|
-
|
27
|
-
When /^I try to run "([^"]*)" \(log = "([^"]*)"\)$/ do | command, log_name |
|
28
|
-
run "#{ command } > #{ cucumber_log log_name } 2>&1"
|
29
|
-
end
|
30
|
-
|
31
|
-
|
32
|
-
When /^I try trema run "([^"]*)" with following configuration \((.*)\):$/ do | args, options, config |
|
33
|
-
verbose = if /verbose/=~ options
|
34
|
-
"--verbose"
|
35
|
-
else
|
36
|
-
""
|
37
|
-
end
|
38
|
-
@log ||= new_tmp_log
|
39
|
-
|
40
|
-
trema_run = Proc.new do
|
41
|
-
Tempfile.open( "trema.conf" ) do | f |
|
42
|
-
f.puts config
|
43
|
-
f.flush
|
44
|
-
run "./trema run \"#{ args }\" -c #{ f.path } #{ verbose } >> #{ @log } 2>&1"
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
if /background/=~ options
|
49
|
-
pid = Process.fork do
|
50
|
-
trema_run.call
|
51
|
-
end
|
52
|
-
Process.detach pid
|
53
|
-
else
|
54
|
-
trema_run.call
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
|
59
|
-
Given /^I try trema run "([^"]*)" example with following configuration \(backgrounded\):$/ do | example, config |
|
60
|
-
controller = nil
|
61
|
-
name = nil
|
62
|
-
if /\.rb\Z/=~ example
|
63
|
-
controller = "./src/examples/#{ File.basename( example, ".rb" ).tr( "-", "_" ) }/#{ example }"
|
64
|
-
name = File.basename( example, ".rb" ).camelize
|
65
|
-
else
|
66
|
-
controller = "./objects/examples/#{ example }/#{ example }"
|
67
|
-
name = example
|
68
|
-
end
|
69
|
-
step %{I try trema run "#{ controller }" with following configuration (backgrounded):}, config
|
70
|
-
step %{wait until "#{ name }" is up}
|
71
|
-
end
|
72
|
-
|
73
|
-
|
74
|
-
When /^I try trema run "([^"]*)" with following configuration:$/ do | args, config |
|
75
|
-
step "I try trema run \"#{ args }\" with following configuration (no options):", config
|
76
|
-
end
|
77
|
-
|
78
|
-
|
79
|
-
Then /^"([^"]*)" exits abnormally with an error message:$/ do | command, message |
|
80
|
-
log = "error.log"
|
81
|
-
step %{I try to run "#{ command }" (log = "#{ log }")} rescue error_occured = true
|
82
|
-
error_occured.should be_true
|
83
|
-
step %{the content of "#{ log }" should be:}, message
|
84
|
-
end
|
85
|
-
|
86
|
-
|
87
|
-
### Local variables:
|
88
|
-
### mode: Ruby
|
89
|
-
### coding: utf-8-unix
|
90
|
-
### indent-tabs-mode: nil
|
91
|
-
### End:
|
data/features/trema.feature
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
Feature: trema help
|
2
|
-
|
3
|
-
As a Trema user
|
4
|
-
I want to see the help message of trema command
|
5
|
-
So that I can learn how to use trema
|
6
|
-
|
7
|
-
Scenario: trema help
|
8
|
-
When I try to run "./trema help"
|
9
|
-
Then the output should be:
|
10
|
-
"""
|
11
|
-
usage: trema <COMMAND> [OPTIONS ...]
|
12
|
-
|
13
|
-
Trema command-line tool
|
14
|
-
Type 'trema help <COMMAND>' for help on a specific command.
|
15
|
-
|
16
|
-
Available commands:
|
17
|
-
run - runs a trema application.
|
18
|
-
kill - terminates a trema process.
|
19
|
-
up - starts a killed trema process again.
|
20
|
-
killall - terminates all trema processes.
|
21
|
-
send_packets - sends UDP packets to destination host.
|
22
|
-
show_stats - shows stats of packets.
|
23
|
-
reset_stats - resets stats of packets.
|
24
|
-
dump_flows - print all flow entries.
|
25
|
-
ruby - opens in your browser Trema's Ruby API documentation.
|
26
|
-
version - displays the current runtime version.
|
27
|
-
"""
|