trema 0.2.2.1 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (250) hide show
  1. data/.gitmodules +3 -0
  2. data/.travis.yml +13 -0
  3. data/.yardopts +4 -0
  4. data/Gemfile +2 -3
  5. data/README.md +43 -97
  6. data/Rakefile +60 -4
  7. data/Rantfile +11 -10
  8. data/cruise.rb +4 -6
  9. data/features/example.packetin_filter_config.feature +10 -10
  10. data/features/example.switch_monitor.feature +14 -2
  11. data/features/step_definitions/kill_steps.rb +2 -2
  12. data/features/step_definitions/{off_steps.rb → killall_steps.rb} +2 -2
  13. data/features/step_definitions/misc_steps.rb +1 -1
  14. data/features/step_definitions/up_steps.rb +30 -0
  15. data/features/trema.feature +1 -0
  16. data/features/trema.run.feature +1 -0
  17. data/locale/README.ja.md +19 -0
  18. data/locale/ja/yard.po +3762 -0
  19. data/locale/yard.pot +3740 -0
  20. data/ruby/extconf.rb +4 -1
  21. data/ruby/trema/action-common.c +3 -17
  22. data/ruby/trema/action-common.h +3 -7
  23. data/ruby/trema/action.rb +33 -0
  24. data/ruby/trema/app.rb +1 -1
  25. data/ruby/trema/barrier-request.c +1 -0
  26. data/ruby/trema/command/run.rb +13 -9
  27. data/ruby/trema/command/usage.rb +1 -0
  28. data/ruby/trema/command/version.rb +1 -1
  29. data/ruby/trema/controller.c +133 -50
  30. data/ruby/trema/controller.rb +2 -2
  31. data/ruby/trema/desc-stats-reply.rb +77 -0
  32. data/ruby/trema/dsl/configuration.rb +3 -14
  33. data/ruby/trema/dsl/rswitch.rb +47 -0
  34. data/ruby/trema/dsl/runner.rb +4 -1
  35. data/ruby/trema/dsl/syntax.rb +11 -8
  36. data/ruby/trema/echo-reply.c +59 -45
  37. data/ruby/trema/echo-reply.h +1 -3
  38. data/ruby/trema/echo-request.c +49 -71
  39. data/ruby/trema/echo-request.h +0 -2
  40. data/ruby/trema/echo.c +99 -0
  41. data/ruby/trema/{action-enqueue.h → echo.h} +6 -7
  42. data/ruby/trema/enqueue.rb +87 -0
  43. data/ruby/trema/error.c +109 -104
  44. data/ruby/trema/error.h +0 -2
  45. data/ruby/trema/features-reply.c +89 -35
  46. data/ruby/trema/features-reply.h +0 -6
  47. data/ruby/trema/features-request.c +63 -37
  48. data/ruby/trema/features-request.h +0 -2
  49. data/ruby/trema/flow-mod.c +149 -0
  50. data/ruby/trema/{action-output.h → flow-mod.h} +6 -6
  51. data/ruby/trema/get-config-request.c +1 -0
  52. data/ruby/trema/hardware-switch.rb +88 -0
  53. data/ruby/trema/hello.c +55 -31
  54. data/ruby/trema/hello.h +0 -2
  55. data/ruby/trema/ip.rb +12 -2
  56. data/ruby/trema/logger.rb +29 -0
  57. data/ruby/trema/mac.rb +57 -36
  58. data/ruby/trema/match.c +7 -9
  59. data/ruby/trema/monkey-patch/integer/ranges.rb +0 -2
  60. data/ruby/trema/network-component.rb +1 -1
  61. data/ruby/trema/open-vswitch.rb +2 -2
  62. data/ruby/trema/openflow-switch.rb +3 -54
  63. data/ruby/trema/{packet_in.c → packet-in.c} +262 -175
  64. data/ruby/trema/{packet_in.h → packet-in.h} +0 -2
  65. data/ruby/trema/packet-queue.rb +4 -3
  66. data/ruby/trema/port-mod.c +8 -9
  67. data/ruby/trema/port-status-add.rb +60 -0
  68. data/ruby/trema/port-status-delete.rb +60 -0
  69. data/ruby/trema/port-status-modify.rb +60 -0
  70. data/ruby/trema/port-status.c +48 -15
  71. data/ruby/trema/port-status.h +6 -8
  72. data/ruby/trema/port.c +63 -8
  73. data/ruby/trema/queue-get-config-request.c +1 -0
  74. data/ruby/trema/ruby-switch.rb +62 -0
  75. data/ruby/trema/send-out-port.rb +97 -0
  76. data/ruby/trema/set-config.c +1 -0
  77. data/ruby/trema/set-eth-addr.rb +45 -0
  78. data/ruby/trema/set-eth-dst-addr.rb +54 -0
  79. data/ruby/trema/set-eth-src-addr.rb +54 -0
  80. data/ruby/trema/set-ip-addr.rb +47 -0
  81. data/ruby/trema/set-ip-dst-addr.rb +53 -0
  82. data/ruby/trema/set-ip-src-addr.rb +52 -0
  83. data/ruby/trema/set-ip-tos.rb +63 -0
  84. data/ruby/trema/set-transport-dst-port.rb +53 -0
  85. data/ruby/trema/set-transport-port.rb +52 -0
  86. data/ruby/trema/set-transport-src-port.rb +54 -0
  87. data/ruby/trema/set-vlan-priority.rb +65 -0
  88. data/ruby/trema/set-vlan-vid.rb +64 -0
  89. data/ruby/trema/shell/down.rb +1 -1
  90. data/ruby/trema/shell/link.rb +4 -4
  91. data/ruby/trema/shell/run.rb +8 -6
  92. data/ruby/trema/shell/up.rb +3 -3
  93. data/ruby/trema/stats-reply.c +27 -2
  94. data/ruby/trema/stats-request.c +64 -23
  95. data/ruby/trema/strip-vlan-header.rb +41 -0
  96. data/ruby/trema/switch.c +196 -0
  97. data/ruby/trema/{action-vendor.h → switch.h} +5 -7
  98. data/ruby/trema/switch.rb +28 -9
  99. data/ruby/trema/trema-ruby-utils.c +66 -0
  100. data/ruby/trema/{action-set-dl-src.h → trema-ruby-utils.h} +9 -11
  101. data/ruby/trema/trema.c +61 -61
  102. data/ruby/trema/vendor-action.rb +73 -0
  103. data/ruby/trema/vendor.c +121 -52
  104. data/ruby/trema/vendor.h +6 -10
  105. data/ruby/trema/version.rb +1 -1
  106. data/spec/spec_helper.rb +1 -1
  107. data/spec/support/action.rb +52 -0
  108. data/spec/support/mandatory-option.rb +56 -0
  109. data/spec/support/openflow-message.rb +91 -7
  110. data/spec/support/port-status.rb +38 -0
  111. data/spec/trema/controller_spec.rb +0 -26
  112. data/spec/trema/dsl/configuration_spec.rb +3 -3
  113. data/spec/trema/dsl/runner_spec.rb +12 -32
  114. data/spec/trema/dsl/syntax_spec.rb +2 -11
  115. data/spec/trema/echo-reply_spec.rb +49 -14
  116. data/spec/trema/echo-request_spec.rb +86 -34
  117. data/spec/trema/enqueue_spec.rb +76 -0
  118. data/spec/trema/error_spec.rb +43 -58
  119. data/spec/trema/features-reply_spec.rb +58 -24
  120. data/spec/trema/features-request_spec.rb +54 -28
  121. data/spec/trema/flow-mod_spec.rb +99 -0
  122. data/spec/trema/{openflow-switch_spec.rb → hardware-switch_spec.rb} +3 -3
  123. data/spec/trema/hello_spec.rb +28 -14
  124. data/spec/trema/ip_spec.rb +54 -0
  125. data/spec/trema/mac_spec.rb +49 -64
  126. data/spec/trema/match_spec.rb +1 -1
  127. data/spec/trema/open-vswitch_spec.rb +7 -7
  128. data/spec/trema/packet-in_spec.rb +73 -16
  129. data/spec/trema/port-status-add_spec.rb +32 -0
  130. data/spec/trema/port-status-delete_spec.rb +32 -0
  131. data/spec/trema/port-status-modify_spec.rb +71 -0
  132. data/spec/trema/port-status_spec.rb +5 -76
  133. data/spec/trema/{action-output_spec.rb → send-out-port_spec.rb} +20 -47
  134. data/spec/trema/set-eth-dst-addr_spec.rb +75 -0
  135. data/spec/trema/set-eth-src-addr_spec.rb +72 -0
  136. data/spec/trema/set-ip-dst-addr_spec.rb +58 -0
  137. data/spec/trema/set-ip-src-addr_spec.rb +58 -0
  138. data/spec/trema/set-ip-tos_spec.rb +65 -0
  139. data/spec/trema/set-transport-dst-port_spec.rb +65 -0
  140. data/spec/trema/set-transport-src-port_spec.rb +65 -0
  141. data/spec/trema/set-vlan-priority_spec.rb +65 -0
  142. data/spec/trema/set-vlan-vid_spec.rb +65 -0
  143. data/spec/trema/shell/vhost_spec.rb +4 -1
  144. data/spec/trema/shell/vswitch_spec.rb +11 -11
  145. data/spec/trema/stats-reply_spec.rb +59 -13
  146. data/spec/trema/stats-request_spec.rb +6 -0
  147. data/spec/trema/{action-strip-vlan_spec.rb → strip-vlan-header_spec.rb} +3 -17
  148. data/spec/trema/switch-daemon_spec.rb +39 -0
  149. data/spec/trema/vendor-action_spec.rb +81 -0
  150. data/spec/trema/vendor_spec.rb +76 -0
  151. data/spec/trema_spec.rb +56 -0
  152. data/src/examples/dumper/dumper.c +0 -8
  153. data/src/examples/dumper/dumper.rb +52 -52
  154. data/src/examples/hello_trema/hello_trema.c +0 -2
  155. data/src/examples/learning_switch/learning-switch.rb +3 -3
  156. data/src/examples/multi_learning_switch/multi-learning-switch.rb +3 -3
  157. data/src/examples/openflow_message/features-request.rb +3 -3
  158. data/src/examples/packetin_filter_config/utils.c +4 -4
  159. data/src/examples/repeater_hub/repeater-hub.rb +3 -3
  160. data/src/examples/switch_info/switch_info.rb +2 -2
  161. data/src/examples/switch_monitor/switch_monitor.c +1 -1
  162. data/src/examples/traffic_monitor/traffic-monitor.rb +3 -3
  163. data/src/lib/arp.h +4 -1
  164. data/src/lib/chibach.c +391 -0
  165. data/src/lib/chibach.h +71 -0
  166. data/src/lib/chibach_private.c +170 -0
  167. data/src/lib/chibach_private.h +52 -0
  168. data/src/lib/ether.c +2 -1
  169. data/src/lib/ether.h +0 -1
  170. data/src/lib/ipv4.h +13 -14
  171. data/{ruby/trema/action-set-nw-src.h → src/lib/ipv6.h} +13 -9
  172. data/src/lib/log.c +161 -58
  173. data/src/lib/log.h +11 -16
  174. data/src/lib/messenger.c +36 -1
  175. data/src/lib/messenger.h +1 -0
  176. data/src/lib/openflow_application_interface.c +128 -28
  177. data/src/lib/openflow_application_interface.h +31 -6
  178. data/src/lib/openflow_message.c +2 -1
  179. data/src/lib/openflow_service_interface.h +1 -0
  180. data/src/lib/openflow_switch_interface.c +1380 -0
  181. data/src/lib/openflow_switch_interface.h +264 -0
  182. data/src/lib/packet_info.c +94 -11
  183. data/src/lib/packet_info.h +22 -3
  184. data/src/lib/packet_parser.c +38 -2
  185. data/src/lib/secure_channel.c +498 -0
  186. data/{ruby/trema/vendor-request.h → src/lib/secure_channel.h} +11 -10
  187. data/src/lib/tcp.h +0 -3
  188. data/src/lib/trema.c +38 -5
  189. data/{ruby/trema/action-set-nw-dst.h → src/lib/trema.hpp} +17 -8
  190. data/src/lib/trema_wrapper.c +5 -0
  191. data/src/lib/trema_wrapper.h +4 -0
  192. data/src/lib/utility.c +93 -4
  193. data/src/lib/utility.h +1 -0
  194. data/src/lib/wrapper.c +30 -7
  195. data/src/lib/wrapper.h +2 -0
  196. data/src/switch_manager/ofpmsg_recv.c +44 -30
  197. data/src/switch_manager/ofpmsg_send.c +40 -1
  198. data/src/switch_manager/ofpmsg_send.h +2 -0
  199. data/src/switch_manager/switch.c +153 -8
  200. data/src/switch_manager/switch.h +1 -0
  201. data/src/switch_manager/switchinfo.h +5 -0
  202. data/src/tremashark/README +2 -2
  203. data/src/tremashark/plugin/packet-trema/packet-trema.c +1 -0
  204. data/trema +1 -1
  205. data/unittests/lib/log_test.c +158 -34
  206. data/unittests/lib/openflow_application_interface_test.c +252 -69
  207. data/unittests/lib/openflow_message_test.c +3 -1
  208. data/unittests/lib/packet_parser_test.c +60 -15
  209. data/unittests/lib/test_packets/icmp6_echo_rep.cap +0 -0
  210. data/unittests/lib/test_packets/icmp6_echo_req.cap +0 -0
  211. data/unittests/lib/trema_test.c +2 -0
  212. data/unittests/lib/utility_test.c +65 -2
  213. data/unittests/lib/wrapper_test.c +29 -0
  214. data/vendor/{README → README.md} +2 -12
  215. data/vendor/packet-openflow.diff +13 -0
  216. metadata +86 -53
  217. data/GPL2 +0 -339
  218. data/ruby/trema/action-enqueue.c +0 -161
  219. data/ruby/trema/action-output.c +0 -169
  220. data/ruby/trema/action-set-dl-dst.c +0 -131
  221. data/ruby/trema/action-set-dl-dst.h +0 -44
  222. data/ruby/trema/action-set-dl-src.c +0 -131
  223. data/ruby/trema/action-set-nw-dst.c +0 -135
  224. data/ruby/trema/action-set-nw-src.c +0 -140
  225. data/ruby/trema/action-set-nw-tos.c +0 -124
  226. data/ruby/trema/action-set-nw-tos.h +0 -42
  227. data/ruby/trema/action-set-tp-dst.c +0 -122
  228. data/ruby/trema/action-set-tp-dst.h +0 -42
  229. data/ruby/trema/action-set-tp-src.c +0 -124
  230. data/ruby/trema/action-set-tp-src.h +0 -42
  231. data/ruby/trema/action-set-vlan-pcp.c +0 -128
  232. data/ruby/trema/action-set-vlan-pcp.h +0 -42
  233. data/ruby/trema/action-set-vlan-vid.c +0 -125
  234. data/ruby/trema/action-set-vlan-vid.h +0 -42
  235. data/ruby/trema/action-strip-vlan.c +0 -81
  236. data/ruby/trema/action-strip-vlan.h +0 -42
  237. data/ruby/trema/action-vendor.c +0 -121
  238. data/ruby/trema/vendor-request.c +0 -193
  239. data/spec/trema/action-enqueue_spec.rb +0 -100
  240. data/spec/trema/action-set-dl-dst_spec.rb +0 -95
  241. data/spec/trema/action-set-dl-src_spec.rb +0 -92
  242. data/spec/trema/action-set-nw-dst_spec.rb +0 -96
  243. data/spec/trema/action-set-nw-src_spec.rb +0 -97
  244. data/spec/trema/action-set-nw-tos_spec.rb +0 -88
  245. data/spec/trema/action-set-tp-dst_spec.rb +0 -88
  246. data/spec/trema/action-set-tp-src_spec.rb +0 -88
  247. data/spec/trema/action-set-vlan-pcp_spec.rb +0 -91
  248. data/spec/trema/action-set-vlan-vid_spec.rb +0 -91
  249. data/spec/trema/action-vendor_spec.rb +0 -90
  250. data/spec/trema/vendor-request_spec.rb +0 -79
@@ -27,6 +27,8 @@
27
27
  #include <string.h>
28
28
  #include <sys/types.h>
29
29
  #include <unistd.h>
30
+ #include <netinet/ip.h>
31
+ #include <net/if_arp.h>
30
32
  #include "byteorder.h"
31
33
  #include "checks.h"
32
34
  #include "cmockery_trema.h"
@@ -99,7 +101,7 @@ mock_debug( char *format, ... ) {
99
101
  }
100
102
 
101
103
 
102
- static logging_level
104
+ static int
103
105
  mock_get_logging_level() {
104
106
  return LOG_DEBUG;
105
107
  }
@@ -1,8 +1,6 @@
1
1
  /*
2
2
  * Unit tests for packet_parser functions and macros.
3
3
  *
4
- * Author: Kazuya Suzuki
5
- *
6
4
  * Copyright (C) 2008-2012 NEC Corporation
7
5
  *
8
6
  * This program is free software; you can redistribute it and/or modify
@@ -46,20 +44,20 @@ store_packet_to_buffer( const char *filename ) {
46
44
  // "Can't open a file of test data."
47
45
  return NULL;
48
46
  }
49
-
50
- // Skip
47
+
48
+ // Skip
51
49
  if ( fseek( fp, sizeof( struct pcap_file_header ) + sizeof( uint32_t ) * 2,
52
50
  SEEK_CUR ) != 0 ) {
53
51
  fclose( fp );
54
52
  return NULL;
55
- }
56
-
53
+ }
54
+
57
55
  uint32_t length[ 2 ];
58
56
  size_t size = fread( &length, 1, sizeof( length ), fp );
59
57
  if ( size < sizeof( length ) ) {
60
58
  fclose( fp );
61
59
  return NULL;
62
- }
60
+ }
63
61
 
64
62
  buffer *buffer = alloc_buffer();
65
63
  if ( buffer == NULL ) {
@@ -71,7 +69,7 @@ store_packet_to_buffer( const char *filename ) {
71
69
  free_buffer( buffer );
72
70
  fclose( fp );
73
71
  return NULL;
74
- }
72
+ }
75
73
 
76
74
  fclose( fp );
77
75
  return buffer;
@@ -92,7 +90,7 @@ test_parse_packet_snap_succeeds() {
92
90
  packet_info *packet_info = buffer->user_data;
93
91
 
94
92
  assert_int_equal( packet_info->format, ETH_8023_SNAP );
95
-
93
+
96
94
  u_char macda[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
97
95
  u_char macsa[] = { 0x00, 0x19, 0xdb, 0x17, 0xb9, 0x6f };
98
96
  assert_memory_equal( packet_info->eth_macda, macda, ETH_ADDRLEN );
@@ -141,7 +139,37 @@ test_parse_packet_arp_request_succeeds() {
141
139
  assert_memory_equal( packet_info->arp_sha, macsa, ETH_ADDRLEN );
142
140
  assert_int_equal( packet_info->arp_tpa, 0xc0a8642b );
143
141
  u_char maczero[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
144
- assert_memory_equal( packet_info->arp_tha, maczero, ETH_ADDRLEN );
142
+ assert_memory_equal( packet_info->arp_tha, maczero, ETH_ADDRLEN );
143
+
144
+ assert_true( packet_type_arp_request( buffer ) );
145
+ assert_false( packet_type_arp_reply( buffer ) );
146
+
147
+ free_buffer( buffer );
148
+ }
149
+
150
+
151
+ static void
152
+ test_parse_packet_ipv6_succeeds() {
153
+ const char filename[] = "./unittests/lib/test_packets/icmp6_echo_req.cap";
154
+ buffer *buffer = store_packet_to_buffer( filename );
155
+
156
+ assert_true( parse_packet( buffer ) );
157
+
158
+ packet_info *packet_info = buffer->user_data;
159
+
160
+ assert_int_equal( packet_info->ipv6_version, 6 );
161
+ assert_int_equal( packet_info->ipv6_tc, 0 );
162
+ assert_int_equal( packet_info->ipv6_flowlabel, 0 );
163
+ assert_int_equal( packet_info->ipv6_plen, 0x40 );
164
+ assert_int_equal( packet_info->ipv6_nexthdr, 0x3a );
165
+ assert_int_equal( packet_info->ipv6_hoplimit, 0x40 );
166
+
167
+ u_char saddr[] = { 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
168
+ 0x8e, 0x89, 0xa5, 0xff, 0xfe, 0x16, 0x22, 0x09 };
169
+ u_char daddr[] = { 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
170
+ 0x8e, 0x89, 0xa5, 0xff, 0xfe, 0x15, 0x84, 0xcb };
171
+ assert_memory_equal( packet_info->ipv6_saddr, saddr, IPV6_ADDRLEN );
172
+ assert_memory_equal( packet_info->ipv6_daddr, daddr, IPV6_ADDRLEN );
145
173
 
146
174
  free_buffer( buffer );
147
175
  }
@@ -163,7 +191,7 @@ test_parse_packet_udp_succeeds() {
163
191
  assert_memory_equal( packet_info->eth_macda, macda, ETH_ADDRLEN );
164
192
  assert_memory_equal( packet_info->eth_macsa, macsa, ETH_ADDRLEN );
165
193
  assert_int_equal( packet_info->eth_type, ETH_ETHTYPE_IPV4 );
166
-
194
+
167
195
  assert_int_equal( packet_info->l2_payload_length, 76 );
168
196
 
169
197
  assert_int_equal( packet_info->ipv4_version, 4 );
@@ -212,7 +240,7 @@ test_parse_packet_udp_fragmented_head_succeeds() {
212
240
  assert_int_equal( packet_info->eth_type, ETH_ETHTYPE_IPV4 );
213
241
 
214
242
  assert_int_equal( packet_info->l2_payload_length, 1500 );
215
-
243
+
216
244
  assert_int_equal( packet_info->ipv4_version, 4 );
217
245
  assert_int_equal( packet_info->ipv4_ihl, 5 );
218
246
  assert_int_equal( packet_info->ipv4_tos, 0 );
@@ -257,7 +285,7 @@ test_parse_packet_udp_fragmented_next_succeeds() {
257
285
  assert_memory_equal( packet_info->eth_macda, macda, ETH_ADDRLEN );
258
286
  assert_memory_equal( packet_info->eth_macsa, macsa, ETH_ADDRLEN );
259
287
  assert_int_equal( packet_info->eth_type, ETH_ETHTYPE_IPV4 );
260
-
288
+
261
289
  assert_int_equal( packet_info->l2_payload_length, 1500 );
262
290
 
263
291
  assert_int_equal( packet_info->ipv4_version, 4 );
@@ -306,7 +334,7 @@ test_parse_packet_tcp_syn_succeeds() {
306
334
  assert_memory_equal( packet_info->eth_macda, macda, ETH_ADDRLEN );
307
335
  assert_memory_equal( packet_info->eth_macsa, macsa, ETH_ADDRLEN );
308
336
  assert_int_equal( packet_info->eth_type, ETH_ETHTYPE_IPV4 );
309
-
337
+
310
338
  assert_int_equal( packet_info->l2_payload_length, 60 );
311
339
 
312
340
  assert_int_equal( packet_info->ipv4_version, 4 );
@@ -356,7 +384,7 @@ test_parse_packet_tcp_succeeds() {
356
384
  assert_memory_equal( packet_info->eth_macda, macda, ETH_ADDRLEN );
357
385
  assert_memory_equal( packet_info->eth_macsa, macsa, ETH_ADDRLEN );
358
386
  assert_int_equal( packet_info->eth_type, ETH_ETHTYPE_IPV4 );
359
-
387
+
360
388
  assert_int_equal( packet_info->l2_payload_length, 82 );
361
389
 
362
390
  assert_int_equal( packet_info->ipv4_version, 4 );
@@ -435,6 +463,11 @@ test_parse_packet_icmpv4_echo_request_succeeds() {
435
463
 
436
464
  assert_int_equal( packet_info->l4_payload_length, 56 );
437
465
 
466
+ assert_true( packet_type_icmpv4_echo_request( buffer ) );
467
+ assert_false( packet_type_icmpv4_dst_unreach( buffer ) );
468
+ assert_false( packet_type_icmpv4_redirect( buffer ) );
469
+ assert_false( packet_type_icmpv4_echo_reply( buffer ) );
470
+
438
471
  free_buffer( buffer );
439
472
  }
440
473
 
@@ -488,6 +521,11 @@ test_parse_packet_vtag_icmpv4_echo_request_succeeds() {
488
521
  assert_int_equal( sample, 0x6162 );
489
522
  assert_int_equal( packet_info->l4_payload_length, 32 );
490
523
 
524
+ assert_true( packet_type_icmpv4_echo_request( buffer ) );
525
+ assert_false( packet_type_icmpv4_dst_unreach( buffer ) );
526
+ assert_false( packet_type_icmpv4_redirect( buffer ) );
527
+ assert_false( packet_type_icmpv4_echo_reply( buffer ) );
528
+
491
529
  free_buffer( buffer );
492
530
  }
493
531
 
@@ -541,6 +579,11 @@ test_parse_packet_vtag_icmpv4_echo_reply_succeeds() {
541
579
  assert_int_equal( sample, 0x6162 );
542
580
  assert_int_equal( packet_info->l4_payload_length, 32 );
543
581
 
582
+ assert_false( packet_type_icmpv4_echo_request( buffer ) );
583
+ assert_false( packet_type_icmpv4_dst_unreach( buffer ) );
584
+ assert_false( packet_type_icmpv4_redirect( buffer ) );
585
+ assert_true( packet_type_icmpv4_echo_reply( buffer ) );
586
+
544
587
  free_buffer( buffer );
545
588
  }
546
589
 
@@ -672,6 +715,8 @@ main() {
672
715
 
673
716
  unit_test( test_parse_packet_arp_request_succeeds ),
674
717
 
718
+ unit_test( test_parse_packet_ipv6_succeeds ),
719
+
675
720
  unit_test( test_parse_packet_udp_succeeds ),
676
721
  unit_test( test_parse_packet_udp_fragmented_head_succeeds ),
677
722
  unit_test( test_parse_packet_udp_fragmented_next_succeeds ),
@@ -719,6 +719,7 @@ test_parse_help_option() {
719
719
  " -n, --name=SERVICE_NAME service name\n"
720
720
  " -d, --daemonize run in the background\n"
721
721
  " -l, --logging_level=LEVEL set logging level\n"
722
+ " -g, --syslog output log messages to syslog\n"
722
723
  " -h, --help display this help and exit\n"
723
724
  );
724
725
  expect_value( mock_exit, status, EXIT_SUCCESS );
@@ -742,6 +743,7 @@ test_parse_h_option() {
742
743
  " -n, --name=SERVICE_NAME service name\n"
743
744
  " -d, --daemonize run in the background\n"
744
745
  " -l, --logging_level=LEVEL set logging level\n"
746
+ " -g, --syslog output log messages to syslog\n"
745
747
  " -h, --help display this help and exit\n"
746
748
  );
747
749
  expect_value( mock_exit, status, EXIT_SUCCESS );
@@ -27,6 +27,7 @@
27
27
  #include <stdio.h>
28
28
  #include <stdlib.h>
29
29
  #include <string.h>
30
+ #include <arpa/inet.h>
30
31
  #include "cmockery_trema.h"
31
32
  #include "log.h"
32
33
  #include "ipv4.h"
@@ -198,10 +199,66 @@ test_string_to_datapath_id() {
198
199
  }
199
200
 
200
201
 
202
+ static void
203
+ test_wildcards_to_string_with_exact_match() {
204
+ char wildcards_str[ 128 ];
205
+ char expected_wildcards_str[] = "none";
206
+ uint32_t wildcards = 0;
207
+ assert_true( wildcards_to_string( wildcards, wildcards_str, sizeof( wildcards_str ) ) );
208
+ assert_string_equal( wildcards_str, expected_wildcards_str );
209
+
210
+ wildcards = UINT32_MAX & ~( ( uint32_t ) OFPFW_ALL );
211
+ assert_true( wildcards_to_string( wildcards, wildcards_str, sizeof( wildcards_str ) ) );
212
+ assert_string_equal( wildcards_str, expected_wildcards_str );
213
+ }
214
+
215
+
216
+ static void
217
+ test_wildcards_to_string_with_all_wildcards() {
218
+ char wildcards_str[ 128 ];
219
+ char expected_wildcards_str[] = "all";
220
+ uint32_t wildcards = OFPFW_ALL;
221
+ assert_true( wildcards_to_string( wildcards, wildcards_str, sizeof( wildcards_str ) ) );
222
+ assert_string_equal( wildcards_str, expected_wildcards_str );
223
+
224
+ wildcards = UINT32_MAX;
225
+ assert_true( wildcards_to_string( wildcards, wildcards_str, sizeof( wildcards_str ) ) );
226
+ assert_string_equal( wildcards_str, expected_wildcards_str );
227
+ }
228
+
229
+
230
+ static void
231
+ test_wildcards_to_string_with_all_wildcards_except_in_port() {
232
+ char wildcards_str[ 128 ];
233
+ char expected_wildcards_str[] = "dl_src|dl_dst|dl_type|dl_vlan|dl_vlan_pcp|nw_proto|nw_tos|nw_src(63)|nw_dst(63)|tp_src|tp_dst";
234
+ uint32_t wildcards = OFPFW_ALL & ~OFPFW_IN_PORT;
235
+ assert_true( wildcards_to_string( wildcards, wildcards_str, sizeof( wildcards_str ) ) );
236
+ assert_string_equal( wildcards_str, expected_wildcards_str );
237
+ }
238
+
239
+
240
+ static void
241
+ test_wildcards_to_string_with_all_wildcards_except_dl_addrs() {
242
+ char wildcards_str[ 128 ];
243
+ char expected_wildcards_str[] = "in_port|dl_type|dl_vlan|dl_vlan_pcp|nw_proto|nw_tos|nw_src(63)|nw_dst(63)|tp_src|tp_dst";
244
+ uint32_t wildcards = OFPFW_ALL & ~OFPFW_DL_SRC & ~OFPFW_DL_DST;
245
+ assert_true( wildcards_to_string( wildcards, wildcards_str, sizeof( wildcards_str ) ) );
246
+ assert_string_equal( wildcards_str, expected_wildcards_str );
247
+ }
248
+
249
+
250
+ static void
251
+ test_wildcards_to_string_fails_with_insufficient_buffer() {
252
+ char wildcards_str[ 1 ];
253
+ uint32_t wildcards = 0;
254
+ assert_false( wildcards_to_string( wildcards, wildcards_str, sizeof( wildcards_str ) ) );
255
+ }
256
+
257
+
201
258
  static void
202
259
  test_match_to_string() {
203
260
  char match_str[ 256 ];
204
- char expected_match_str[] = "wildcards = 0, in_port = 1, dl_src = 01:02:03:04:05:07, dl_dst = 08:09:0a:0b:0c:0d, dl_vlan = 1, dl_vlan_pcp = 1, dl_type = 0x800, nw_tos = 1, nw_proto = 6, nw_src = 10.9.8.7/32, nw_dst = 6.5.4.3/32, tp_src = 1024, tp_dst = 2048";
261
+ char expected_match_str[] = "wildcards = 0(none), in_port = 1, dl_src = 01:02:03:04:05:07, dl_dst = 08:09:0a:0b:0c:0d, dl_vlan = 1, dl_vlan_pcp = 1, dl_type = 0x800, nw_tos = 1, nw_proto = 6, nw_src = 10.9.8.7/32, nw_dst = 6.5.4.3/32, tp_src = 1024, tp_dst = 2048";
205
262
  struct ofp_match match = { 0, 1,
206
263
  { 0x01, 0x02, 0x03, 0x04, 0x05, 0x07 },
207
264
  { 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d },
@@ -225,7 +282,7 @@ test_match_to_string_fails_with_insufficient_buffer() {
225
282
  static void
226
283
  test_phy_port_to_string() {
227
284
  char phy_port_str[ 256 ];
228
- char expected_phy_port_str[] = "port_no = 1, hw_addr = 01:02:03:04:05:06, name = GbE 0/1, config = 0x1, state = 0x1, curr = 0x4a0, advertised = 0x6bf, supported = 0x6bf, peer = 0x6bf";
285
+ char expected_phy_port_str[] = "port_no = 1, hw_addr = 01:02:03:04:05:06, name = GbE 0/1, config = 0x1, state = 0x1, curr = 0x4a0, advertised = 0x6bf, supported = 0x6bf, peer = 0x6bf";
229
286
  uint8_t hw_addr[ OFP_ETH_ALEN ] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
230
287
  uint32_t port_features = ( OFPPF_10MB_HD | OFPPF_10MB_FD | OFPPF_100MB_HD |
231
288
  OFPPF_100MB_FD | OFPPF_1GB_HD | OFPPF_1GB_FD |
@@ -589,6 +646,12 @@ main() {
589
646
 
590
647
  unit_test( test_string_to_datapath_id ),
591
648
 
649
+ unit_test( test_wildcards_to_string_with_exact_match ),
650
+ unit_test( test_wildcards_to_string_with_all_wildcards ),
651
+ unit_test( test_wildcards_to_string_with_all_wildcards_except_in_port ),
652
+ unit_test( test_wildcards_to_string_with_all_wildcards_except_dl_addrs ),
653
+ unit_test( test_wildcards_to_string_fails_with_insufficient_buffer ),
654
+
592
655
  unit_test( test_match_to_string ),
593
656
  unit_test( test_match_to_string_fails_with_insufficient_buffer ),
594
657
 
@@ -154,6 +154,32 @@ test_xstrdup_fail() {
154
154
  }
155
155
 
156
156
 
157
+ static char *
158
+ test_xvasprintf_helper( const char *fmt, ... ) {
159
+ va_list ap;
160
+ va_start(ap, fmt);
161
+ char *str = xvasprintf( fmt, ap );
162
+ va_end(ap);
163
+ return str;
164
+ }
165
+
166
+
167
+ static void
168
+ test_xvasprintf() {
169
+ char hello[] = "Hello";
170
+ char *printed_hello = test_xvasprintf_helper( "%s", hello );
171
+ assert_string_equal( hello, printed_hello );
172
+ xfree( printed_hello );
173
+ }
174
+
175
+
176
+ static void
177
+ test_xvasprintf_fail() {
178
+ expect_string( mock_die, output, "Out of memory, xvasprintf failed" );
179
+ expect_assert_failure( test_xvasprintf_helper( "FAIL" ) );
180
+ }
181
+
182
+
157
183
  static void
158
184
  test_xasprintf() {
159
185
  char hello[] = "Hello";
@@ -186,6 +212,9 @@ main() {
186
212
  unit_test_setup_teardown( test_xstrdup, setup, teardown ),
187
213
  unit_test_setup_teardown( test_xstrdup_fail, setup_fail_allocators, teardown ),
188
214
 
215
+ unit_test_setup_teardown( test_xvasprintf, setup, teardown ),
216
+ unit_test_setup_teardown( test_xvasprintf_fail, setup_fail_allocators, teardown ),
217
+
189
218
  unit_test_setup_teardown( test_xasprintf, setup, teardown ),
190
219
  unit_test_setup_teardown( test_xasprintf_fail, setup_fail_allocators, teardown ),
191
220
  };
@@ -1,21 +1,12 @@
1
1
  Notes on Third Party Software Packages
2
- **************************************
3
-
4
- Copyright (C) 2008-2011 NEC Corporation
5
-
6
- Copying and distribution of this file, with or without modification,
7
- are permitted in any medium without royalty provided the copyright
8
- notice and this notice are preserved.
9
-
10
- Notice
11
- ======
2
+ ======================================
12
3
 
13
4
  Software packages found in this directory are not part of Trema. Each software
14
5
  packages is distributed under the terms and conditions described in the package.
15
6
 
16
7
 
17
8
  Notes on oflops (vendor/oflops)
18
- ===============================
9
+ -------------------------------
19
10
 
20
11
  oflops is a set of tools for measuring the performance of OpenFlow switches and
21
12
  controllers. You can find detailed information about oflops on:
@@ -27,4 +18,3 @@ of this OpenFlow controller platform, we disabled the functions. In addition,
27
18
  because there are some issues on OpenFlow messages that cbench (a performance
28
19
  measurement tool for OpenFlow controllers) sends, we fixed them. Any changes
29
20
  from the repository of oflops can be found in oflops_no_snmp+1.0.0.patch.
30
-
@@ -0,0 +1,13 @@
1
+ diff --git a/utilities/wireshark_dissectors/openflow/packet-openflow.c b/utilities/wireshark_dissectors/openflow/packet-openflow.c
2
+ index aea00f8..8d98335 100644
3
+ --- a/utilities/wireshark_dissectors/openflow/packet-openflow.c
4
+ +++ b/utilities/wireshark_dissectors/openflow/packet-openflow.c
5
+ @@ -766,7 +766,7 @@ static gint ett_ofp_error_msg_data = -1;
6
+ void proto_reg_handoff_openflow()
7
+ {
8
+ openflow_handle = create_dissector_handle(dissect_openflow, proto_openflow);
9
+ - dissector_add(TCP_PORT_FILTER, global_openflow_proto, openflow_handle);
10
+ + dissector_add_uint(TCP_PORT_FILTER, global_openflow_proto, openflow_handle);
11
+ }
12
+
13
+ #define NO_STRINGS NULL
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trema
3
3
  version: !ruby/object:Gem::Version
4
- hash: 85
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- - 1
11
- version: 0.2.2.1
9
+ - 3
10
+ version: 0.2.3
12
11
  platform: ruby
13
12
  authors:
14
13
  - Yasuhito Takamiya
@@ -16,7 +15,7 @@ autorequire:
16
15
  bindir: .
17
16
  cert_chain: []
18
17
 
19
- date: 2012-03-09 00:00:00 Z
18
+ date: 2012-07-30 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: rake
@@ -44,9 +43,11 @@ extra_rdoc_files:
44
43
  - README.md
45
44
  files:
46
45
  - .gitignore
46
+ - .gitmodules
47
47
  - .mono.rant
48
+ - .travis.yml
49
+ - .yardopts
48
50
  - Doxyfile
49
- - GPL2
50
51
  - Gemfile
51
52
  - README.md
52
53
  - Rakefile
@@ -67,13 +68,14 @@ files:
67
68
  - features/example.switch_monitor.feature
68
69
  - features/packetin_filter.feature
69
70
  - features/step_definitions/kill_steps.rb
71
+ - features/step_definitions/killall_steps.rb
70
72
  - features/step_definitions/log_steps.rb
71
73
  - features/step_definitions/misc_steps.rb
72
- - features/step_definitions/off_steps.rb
73
74
  - features/step_definitions/run_steps.rb
74
75
  - features/step_definitions/send_packets_steps.rb
75
76
  - features/step_definitions/show_stats_steps.rb
76
77
  - features/step_definitions/stats_steps.rb
78
+ - features/step_definitions/up_steps.rb
77
79
  - features/support/env.rb
78
80
  - features/support/hooks.rb
79
81
  - features/switch_manager.feature
@@ -89,38 +91,16 @@ files:
89
91
  - features/tutorial.hello_trema.feature
90
92
  - features/tutorial.packet_in.feature
91
93
  - features/tutorial.switch_info.feature
94
+ - locale/README.ja.md
95
+ - locale/ja/yard.po
96
+ - locale/yard.pot
92
97
  - ruby/.gitignore
93
98
  - ruby/blocker.rb
94
99
  - ruby/extconf.rb
95
100
  - ruby/sub-process.rb
96
101
  - ruby/trema/action-common.c
97
102
  - ruby/trema/action-common.h
98
- - ruby/trema/action-enqueue.c
99
- - ruby/trema/action-enqueue.h
100
- - ruby/trema/action-output.c
101
- - ruby/trema/action-output.h
102
- - ruby/trema/action-set-dl-dst.c
103
- - ruby/trema/action-set-dl-dst.h
104
- - ruby/trema/action-set-dl-src.c
105
- - ruby/trema/action-set-dl-src.h
106
- - ruby/trema/action-set-nw-dst.c
107
- - ruby/trema/action-set-nw-dst.h
108
- - ruby/trema/action-set-nw-src.c
109
- - ruby/trema/action-set-nw-src.h
110
- - ruby/trema/action-set-nw-tos.c
111
- - ruby/trema/action-set-nw-tos.h
112
- - ruby/trema/action-set-tp-dst.c
113
- - ruby/trema/action-set-tp-dst.h
114
- - ruby/trema/action-set-tp-src.c
115
- - ruby/trema/action-set-tp-src.h
116
- - ruby/trema/action-set-vlan-pcp.c
117
- - ruby/trema/action-set-vlan-pcp.h
118
- - ruby/trema/action-set-vlan-vid.c
119
- - ruby/trema/action-set-vlan-vid.h
120
- - ruby/trema/action-strip-vlan.c
121
- - ruby/trema/action-strip-vlan.h
122
- - ruby/trema/action-vendor.c
123
- - ruby/trema/action-vendor.h
103
+ - ruby/trema/action.rb
124
104
  - ruby/trema/aggregate-stats-reply.rb
125
105
  - ruby/trema/app.rb
126
106
  - ruby/trema/barrier-reply.c
@@ -145,11 +125,13 @@ files:
145
125
  - ruby/trema/controller.h
146
126
  - ruby/trema/controller.rb
147
127
  - ruby/trema/daemon.rb
128
+ - ruby/trema/desc-stats-reply.rb
148
129
  - ruby/trema/dsl.rb
149
130
  - ruby/trema/dsl/configuration.rb
150
131
  - ruby/trema/dsl/context.rb
151
132
  - ruby/trema/dsl/link.rb
152
133
  - ruby/trema/dsl/parser.rb
134
+ - ruby/trema/dsl/rswitch.rb
153
135
  - ruby/trema/dsl/run.rb
154
136
  - ruby/trema/dsl/runner.rb
155
137
  - ruby/trema/dsl/stanza.rb
@@ -162,6 +144,9 @@ files:
162
144
  - ruby/trema/echo-reply.h
163
145
  - ruby/trema/echo-request.c
164
146
  - ruby/trema/echo-request.h
147
+ - ruby/trema/echo.c
148
+ - ruby/trema/echo.h
149
+ - ruby/trema/enqueue.rb
165
150
  - ruby/trema/error.c
166
151
  - ruby/trema/error.h
167
152
  - ruby/trema/exact-match.rb
@@ -170,6 +155,8 @@ files:
170
155
  - ruby/trema/features-reply.h
171
156
  - ruby/trema/features-request.c
172
157
  - ruby/trema/features-request.h
158
+ - ruby/trema/flow-mod.c
159
+ - ruby/trema/flow-mod.h
173
160
  - ruby/trema/flow-removed.c
174
161
  - ruby/trema/flow-removed.h
175
162
  - ruby/trema/flow-stats-reply.rb
@@ -178,6 +165,7 @@ files:
178
165
  - ruby/trema/get-config-reply.h
179
166
  - ruby/trema/get-config-request.c
180
167
  - ruby/trema/get-config-request.h
168
+ - ruby/trema/hardware-switch.rb
181
169
  - ruby/trema/hello.c
182
170
  - ruby/trema/hello.h
183
171
  - ruby/trema/host.rb
@@ -187,6 +175,7 @@ files:
187
175
  - ruby/trema/list-switches-reply.h
188
176
  - ruby/trema/logger.c
189
177
  - ruby/trema/logger.h
178
+ - ruby/trema/logger.rb
190
179
  - ruby/trema/mac.rb
191
180
  - ruby/trema/match.c
192
181
  - ruby/trema/match.h
@@ -205,15 +194,18 @@ files:
205
194
  - ruby/trema/openflow-error.h
206
195
  - ruby/trema/openflow-switch.rb
207
196
  - ruby/trema/ordered-hash.rb
197
+ - ruby/trema/packet-in.c
198
+ - ruby/trema/packet-in.h
208
199
  - ruby/trema/packet-queue.rb
209
- - ruby/trema/packet_in.c
210
- - ruby/trema/packet_in.h
211
200
  - ruby/trema/packetin-filter.rb
212
201
  - ruby/trema/path.rb
213
202
  - ruby/trema/phost.rb
214
203
  - ruby/trema/port-mod.c
215
204
  - ruby/trema/port-mod.h
216
205
  - ruby/trema/port-stats-reply.rb
206
+ - ruby/trema/port-status-add.rb
207
+ - ruby/trema/port-status-delete.rb
208
+ - ruby/trema/port-status-modify.rb
217
209
  - ruby/trema/port-status.c
218
210
  - ruby/trema/port-status.h
219
211
  - ruby/trema/port.c
@@ -224,8 +216,22 @@ files:
224
216
  - ruby/trema/queue-get-config-request.c
225
217
  - ruby/trema/queue-get-config-request.h
226
218
  - ruby/trema/queue-stats-reply.rb
219
+ - ruby/trema/ruby-switch.rb
220
+ - ruby/trema/send-out-port.rb
227
221
  - ruby/trema/set-config.c
228
222
  - ruby/trema/set-config.h
223
+ - ruby/trema/set-eth-addr.rb
224
+ - ruby/trema/set-eth-dst-addr.rb
225
+ - ruby/trema/set-eth-src-addr.rb
226
+ - ruby/trema/set-ip-addr.rb
227
+ - ruby/trema/set-ip-dst-addr.rb
228
+ - ruby/trema/set-ip-src-addr.rb
229
+ - ruby/trema/set-ip-tos.rb
230
+ - ruby/trema/set-transport-dst-port.rb
231
+ - ruby/trema/set-transport-port.rb
232
+ - ruby/trema/set-transport-src-port.rb
233
+ - ruby/trema/set-vlan-priority.rb
234
+ - ruby/trema/set-vlan-vid.rb
229
235
  - ruby/trema/shell.rb
230
236
  - ruby/trema/shell/down.rb
231
237
  - ruby/trema/shell/killall.rb
@@ -242,37 +248,31 @@ files:
242
248
  - ruby/trema/stats-reply.h
243
249
  - ruby/trema/stats-request.c
244
250
  - ruby/trema/stats-request.h
251
+ - ruby/trema/strip-vlan-header.rb
245
252
  - ruby/trema/switch-daemon.rb
246
253
  - ruby/trema/switch-disconnected.c
247
254
  - ruby/trema/switch-disconnected.h
248
255
  - ruby/trema/switch-manager.rb
256
+ - ruby/trema/switch.c
257
+ - ruby/trema/switch.h
249
258
  - ruby/trema/switch.rb
250
259
  - ruby/trema/table-stats-reply.rb
251
260
  - ruby/trema/timers.rb
261
+ - ruby/trema/trema-ruby-utils.c
262
+ - ruby/trema/trema-ruby-utils.h
252
263
  - ruby/trema/trema.c
253
264
  - ruby/trema/tremashark.rb
254
265
  - ruby/trema/util.rb
255
- - ruby/trema/vendor-request.c
256
- - ruby/trema/vendor-request.h
266
+ - ruby/trema/vendor-action.rb
257
267
  - ruby/trema/vendor-stats-reply.rb
258
268
  - ruby/trema/vendor.c
259
269
  - ruby/trema/vendor.h
260
270
  - ruby/trema/version.rb
261
271
  - spec/spec_helper.rb
272
+ - spec/support/action.rb
273
+ - spec/support/mandatory-option.rb
262
274
  - spec/support/openflow-message.rb
263
- - spec/trema/action-enqueue_spec.rb
264
- - spec/trema/action-output_spec.rb
265
- - spec/trema/action-set-dl-dst_spec.rb
266
- - spec/trema/action-set-dl-src_spec.rb
267
- - spec/trema/action-set-nw-dst_spec.rb
268
- - spec/trema/action-set-nw-src_spec.rb
269
- - spec/trema/action-set-nw-tos_spec.rb
270
- - spec/trema/action-set-tp-dst_spec.rb
271
- - spec/trema/action-set-tp-src_spec.rb
272
- - spec/trema/action-set-vlan-pcp_spec.rb
273
- - spec/trema/action-set-vlan-vid_spec.rb
274
- - spec/trema/action-strip-vlan_spec.rb
275
- - spec/trema/action-vendor_spec.rb
275
+ - spec/support/port-status.rb
276
276
  - spec/trema/app_spec.rb
277
277
  - spec/trema/barrier-reply_spec.rb
278
278
  - spec/trema/barrier-request_spec.rb
@@ -288,15 +288,19 @@ files:
288
288
  - spec/trema/dsl/vswitch_spec.rb
289
289
  - spec/trema/echo-reply_spec.rb
290
290
  - spec/trema/echo-request_spec.rb
291
+ - spec/trema/enqueue_spec.rb
291
292
  - spec/trema/error_spec.rb
292
293
  - spec/trema/executables_spec.rb
293
294
  - spec/trema/features-reply_spec.rb
294
295
  - spec/trema/features-request_spec.rb
296
+ - spec/trema/flow-mod_spec.rb
295
297
  - spec/trema/flow-removed_spec.rb
296
298
  - spec/trema/get-config-reply_spec.rb
297
299
  - spec/trema/get-config-request_spec.rb
300
+ - spec/trema/hardware-switch_spec.rb
298
301
  - spec/trema/hello_spec.rb
299
302
  - spec/trema/host_spec.rb
303
+ - spec/trema/ip_spec.rb
300
304
  - spec/trema/link_spec.rb
301
305
  - spec/trema/list-switches-reply_spec.rb
302
306
  - spec/trema/logger_spec.rb
@@ -304,26 +308,42 @@ files:
304
308
  - spec/trema/match_spec.rb
305
309
  - spec/trema/open-vswitch_spec.rb
306
310
  - spec/trema/openflow-error_spec.rb
307
- - spec/trema/openflow-switch_spec.rb
308
311
  - spec/trema/packet-in_spec.rb
309
312
  - spec/trema/packet-out_spec.rb
310
313
  - spec/trema/packetin-filter_spec.rb
311
314
  - spec/trema/port-mod_spec.rb
315
+ - spec/trema/port-status-add_spec.rb
316
+ - spec/trema/port-status-delete_spec.rb
317
+ - spec/trema/port-status-modify_spec.rb
312
318
  - spec/trema/port-status_spec.rb
313
319
  - spec/trema/port_spec.rb
314
320
  - spec/trema/process_spec.rb
315
321
  - spec/trema/queue-get-config-reply_spec.rb
316
322
  - spec/trema/queue-get-config-request_spec.rb
323
+ - spec/trema/send-out-port_spec.rb
317
324
  - spec/trema/set-config_spec.rb
325
+ - spec/trema/set-eth-dst-addr_spec.rb
326
+ - spec/trema/set-eth-src-addr_spec.rb
327
+ - spec/trema/set-ip-dst-addr_spec.rb
328
+ - spec/trema/set-ip-src-addr_spec.rb
329
+ - spec/trema/set-ip-tos_spec.rb
330
+ - spec/trema/set-transport-dst-port_spec.rb
331
+ - spec/trema/set-transport-src-port_spec.rb
332
+ - spec/trema/set-vlan-priority_spec.rb
333
+ - spec/trema/set-vlan-vid_spec.rb
318
334
  - spec/trema/shell/vhost_spec.rb
319
335
  - spec/trema/shell/vswitch_spec.rb
320
336
  - spec/trema/stats-reply_spec.rb
321
337
  - spec/trema/stats-request_spec.rb
338
+ - spec/trema/strip-vlan-header_spec.rb
339
+ - spec/trema/switch-daemon_spec.rb
322
340
  - spec/trema/switch-disconnected_spec.rb
323
341
  - spec/trema/switch-manager_spec.rb
324
342
  - spec/trema/tremashark_spec.rb
325
343
  - spec/trema/util_spec.rb
326
- - spec/trema/vendor-request_spec.rb
344
+ - spec/trema/vendor-action_spec.rb
345
+ - spec/trema/vendor_spec.rb
346
+ - spec/trema_spec.rb
327
347
  - src/examples/cbench_switch/README
328
348
  - src/examples/cbench_switch/cbench-switch.rb
329
349
  - src/examples/cbench_switch/cbench_switch.c
@@ -403,6 +423,10 @@ files:
403
423
  - src/lib/byteorder.c
404
424
  - src/lib/byteorder.h
405
425
  - src/lib/checks.h
426
+ - src/lib/chibach.c
427
+ - src/lib/chibach.h
428
+ - src/lib/chibach_private.c
429
+ - src/lib/chibach_private.h
406
430
  - src/lib/daemon.c
407
431
  - src/lib/daemon.h
408
432
  - src/lib/doubly_linked_list.c
@@ -417,6 +441,7 @@ files:
417
441
  - src/lib/icmp.h
418
442
  - src/lib/igmp.h
419
443
  - src/lib/ipv4.h
444
+ - src/lib/ipv6.h
420
445
  - src/lib/linked_list.c
421
446
  - src/lib/linked_list.h
422
447
  - src/lib/log.c
@@ -433,6 +458,8 @@ files:
433
458
  - src/lib/openflow_message.c
434
459
  - src/lib/openflow_message.h
435
460
  - src/lib/openflow_service_interface.h
461
+ - src/lib/openflow_switch_interface.c
462
+ - src/lib/openflow_switch_interface.h
436
463
  - src/lib/packet_info.c
437
464
  - src/lib/packet_info.h
438
465
  - src/lib/packet_parser.c
@@ -440,6 +467,8 @@ files:
440
467
  - src/lib/packetin_filter_interface.h
441
468
  - src/lib/persistent_storage.c
442
469
  - src/lib/persistent_storage.h
470
+ - src/lib/secure_channel.c
471
+ - src/lib/secure_channel.h
443
472
  - src/lib/stat.c
444
473
  - src/lib/stat.h
445
474
  - src/lib/tcp.h
@@ -447,6 +476,7 @@ files:
447
476
  - src/lib/timer.h
448
477
  - src/lib/trema.c
449
478
  - src/lib/trema.h
479
+ - src/lib/trema.hpp
450
480
  - src/lib/trema_private.c
451
481
  - src/lib/trema_private.h
452
482
  - src/lib/trema_wrapper.c
@@ -528,6 +558,8 @@ files:
528
558
  - unittests/lib/stat_test.c
529
559
  - unittests/lib/test_packets/arp_rep.cap
530
560
  - unittests/lib/test_packets/arp_req.cap
561
+ - unittests/lib/test_packets/icmp6_echo_rep.cap
562
+ - unittests/lib/test_packets/icmp6_echo_req.cap
531
563
  - unittests/lib/test_packets/icmp_echo_rep.cap
532
564
  - unittests/lib/test_packets/icmp_echo_req.cap
533
565
  - unittests/lib/test_packets/igmp_query_v2.cap
@@ -550,13 +582,14 @@ files:
550
582
  - unittests/switch_manager/switch_manager_test.c
551
583
  - unittests/wrapper_stubs.c
552
584
  - vendor/.gitignore
553
- - vendor/README
585
+ - vendor/README.md
554
586
  - vendor/cmockery-20110428.tar.gz
555
587
  - vendor/oflops-0.03.tar.gz
556
588
  - vendor/oflops_no_snmp+1.0.0.patch
557
589
  - vendor/openflow-1.0.0.tar.gz
558
590
  - vendor/openflow.git.tar.gz
559
591
  - vendor/openvswitch-1.2.2.tar.gz
592
+ - vendor/packet-openflow.diff
560
593
  - vendor/phost/doc/COPYING
561
594
  - vendor/phost/doc/README
562
595
  - vendor/phost/src/.gitignore