pio 0.19.0 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +20 -18
- data/features/{packet_data/arp-storm.pcap → arp-storm.pcap} +0 -0
- data/features/arp.feature +1 -1
- data/features/{packet_data/arp.pcap → arp.pcap} +0 -0
- data/features/dhcp.feature +210 -3
- data/features/{packet_data/dhcp.pcap → dhcp.pcap} +0 -0
- data/features/icmp.feature +1 -1
- data/features/{packet_data/icmp.pcap → icmp.pcap} +0 -0
- data/features/{packet_data/lldp.detailed.pcap → lldp.detailed.pcap} +0 -0
- data/features/lldp.feature +5 -5
- data/features/{packet_data/lldp.minimal.pcap → lldp.minimal.pcap} +0 -0
- data/features/{packet_data → open_flow10}/aggregate_stats_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/aggregate_stats_request.raw +0 -0
- data/features/{packet_data → open_flow10}/barrier_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/barrier_request.raw +0 -0
- data/features/{packet_data → open_flow10}/desc_stats_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/desc_stats_request.raw +0 -0
- data/features/open_flow10/echo_reply.feature +10 -10
- data/features/{packet_data → open_flow10}/echo_reply.raw +0 -0
- data/features/open_flow10/echo_request.feature +10 -10
- data/features/{packet_data → open_flow10}/echo_request.raw +0 -0
- data/features/{packet_data → open_flow10}/error.raw +0 -0
- data/features/open_flow10/exact_match.feature +33 -33
- data/features/open_flow10/features_reply.feature +71 -71
- data/features/{packet_data → open_flow10}/features_reply.raw +0 -0
- data/features/open_flow10/features_request.feature +9 -9
- data/features/{packet_data → open_flow10}/features_request.raw +0 -0
- data/features/open_flow10/flow_mod.feature +167 -167
- data/features/{packet_data → open_flow10}/flow_mod_add.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_mod_delete.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_mod_delete_strict.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_mod_modify.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_mod_modify_strict.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_removed.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_stats_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_stats_request.raw +0 -0
- data/features/{packet_data → open_flow10}/get_config_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/get_config_request.raw +0 -0
- data/features/open_flow10/hello.feature +9 -9
- data/features/{packet_data → open_flow10}/hello.raw +0 -0
- data/features/open_flow10/packet_in.feature +4 -4
- data/features/{packet_data → open_flow10}/packet_in_arp_request.raw +0 -0
- data/features/{packet_data → open_flow10}/packet_in_cbench.raw +0 -0
- data/features/open_flow10/packet_out.feature +3 -3
- data/features/{packet_data → open_flow10}/packet_out.raw +0 -0
- data/features/{packet_data → open_flow10}/port_mod.raw +0 -0
- data/features/{packet_data → open_flow10}/port_stats_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/port_stats_request.raw +0 -0
- data/features/open_flow10/port_status.feature +3 -3
- data/features/{packet_data → open_flow10}/port_status.raw +0 -0
- data/features/{packet_data → open_flow10}/queue_get_config_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/queue_get_config_request.raw +0 -0
- data/features/{packet_data → open_flow10}/set_config.raw +0 -0
- data/features/{packet_data → open_flow10}/table_stats_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/table_stats_request.raw +0 -0
- data/features/{packet_data → open_flow10}/vendor.raw +0 -0
- data/features/{packet_data → open_flow10}/vendor_stats_request.raw +0 -0
- data/features/open_flow13/echo_reply.feature +64 -61
- data/features/{packet_data/echo13_reply_body.raw → open_flow13/echo_reply_body.raw} +0 -0
- data/features/{packet_data/echo13_reply_no_body.raw → open_flow13/echo_reply_no_body.raw} +0 -0
- data/features/open_flow13/echo_request.feature +64 -61
- data/features/{packet_data/echo13_request_body.raw → open_flow13/echo_request_body.raw} +0 -0
- data/features/{packet_data/echo13_request_no_body.raw → open_flow13/echo_request_no_body.raw} +0 -0
- data/features/open_flow13/features_reply.feature +53 -0
- data/features/open_flow13/features_reply.raw +0 -0
- data/features/open_flow13/features_request.feature +89 -0
- data/features/open_flow13/features_request.raw +0 -0
- data/features/open_flow13/hello.feature +26 -23
- data/features/{packet_data/hello13_no_version_bitmap.raw → open_flow13/hello_no_version_bitmap.raw} +0 -0
- data/features/{packet_data/hello13_version_bitmap.raw → open_flow13/hello_version_bitmap.raw} +0 -0
- data/features/step_definitions/open_flow_steps.rb +3 -0
- data/features/step_definitions/packet_data_steps.rb +9 -9
- data/features/udp.feature +3 -3
- data/features/{packet_data/udp_no_payload.raw → udp_no_payload.raw} +0 -0
- data/features/{packet_data/udp_with_payload.raw → udp_with_payload.raw} +0 -0
- data/lib/pio.rb +1 -9
- data/lib/pio/open_flow/actions.rb +8 -8
- data/lib/pio/open_flow/open_flow_header.rb +10 -0
- data/lib/pio/open_flow10.rb +15 -0
- data/lib/pio/open_flow10/echo.rb +15 -0
- data/lib/pio/open_flow10/exact_match.rb +51 -0
- data/lib/pio/{features.rb → open_flow10/features.rb} +8 -7
- data/lib/pio/{flow_mod.rb → open_flow10/flow_mod.rb} +1 -1
- data/lib/pio/{hello.rb → open_flow10/hello.rb} +0 -0
- data/lib/pio/{match.rb → open_flow10/match.rb} +46 -43
- data/lib/pio/{packet_in.rb → open_flow10/packet_in.rb} +0 -0
- data/lib/pio/{packet_out.rb → open_flow10/packet_out.rb} +0 -0
- data/lib/pio/{port_status.rb → open_flow10/port_status.rb} +0 -0
- data/lib/pio/open_flow13.rb +12 -0
- data/lib/pio/{echo.rb → open_flow13/echo.rb} +9 -13
- data/lib/pio/open_flow13/features_reply.rb +91 -0
- data/lib/pio/open_flow13/features_request.rb +54 -0
- data/lib/pio/{hello13.rb → open_flow13/hello.rb} +4 -1
- data/lib/pio/{set_eth_addr.rb → set_ether_address.rb} +7 -7
- data/lib/pio/{set_ip_addr.rb → set_ip_address.rb} +7 -7
- data/lib/pio/set_ip_tos.rb +1 -1
- data/lib/pio/set_transport_port.rb +2 -2
- data/lib/pio/version.rb +1 -1
- data/pio.gemspec +2 -2
- data/spec/pio/flow_mod_spec.rb +45 -45
- data/spec/pio/match_spec.rb +122 -120
- data/spec/pio/{hello13_spec.rb → open_flow13/hello_spec.rb} +11 -11
- data/spec/pio/packet_out_spec.rb +19 -19
- data/spec/pio/set_ether_destination_address_spec.rb +28 -0
- data/spec/pio/set_ether_source_address_spec.rb +28 -0
- data/spec/pio/set_ip_destination_address_spec.rb +27 -0
- data/spec/pio/set_ip_source_address_spec.rb +25 -0
- data/spec/pio/set_transport_destination_port_spec.rb +44 -0
- data/spec/pio/set_transport_source_port_spec.rb +44 -0
- data/spec/pio/wildcards_spec.rb +23 -21
- metadata +179 -165
- data/bin/byebug +0 -16
- data/lib/pio/exact_match.rb +0 -51
- data/spec/pio/set_eth_dst_addr_spec.rb +0 -28
- data/spec/pio/set_eth_src_addr_spec.rb +0 -28
- data/spec/pio/set_ip_dst_addr_spec.rb +0 -25
- data/spec/pio/set_ip_src_addr_spec.rb +0 -25
- data/spec/pio/set_transport_dst_port_spec.rb +0 -42
- data/spec/pio/set_transport_src_port_spec.rb +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15195571fe7c141395cd1572b998234034efa9bc
|
4
|
+
data.tar.gz: 4ba2b471920192bf57fab208e55bd1d478e43396
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2c6f163e175af2b1606101f7d2e7eab097d5c4ad2c120791f6ef64ea3dd36c11ff62814b4de7a24c2e6d416d5040b83c3d5bfb388e09c9dbcfa3f9853f42225
|
7
|
+
data.tar.gz: 397513caef878bfb1480b17f90f10e62f04c7b6932af1d23c78308f70059f4427ee6410169f929cbe0fac94515407f30979e603343bf5b096a807a2f70d3be8f
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
3
|
## develop (unreleased)
|
4
|
+
|
5
|
+
|
6
|
+
## 0.20.0 (4/22/2015)
|
7
|
+
### New features
|
8
|
+
* [#138](https://github.com/trema/pio/pull/138): Add new class `Pio::Features::Request`.
|
9
|
+
* [#153](https://github.com/trema/pio/pull/153): Add new class `Pio::Features::Reply`.
|
10
|
+
|
11
|
+
|
12
|
+
## 0.19.0 (4/9/2015)
|
4
13
|
### New features
|
5
14
|
* [#132](https://github.com/trema/pio/pull/132): Add new class `Pio::Hello13`.
|
6
15
|
* [#136](https://github.com/trema/pio/pull/136): Add new class `Pio::Echo13::Request` and `Pio::Echo13::Reply`.
|
data/README.md
CHANGED
@@ -13,26 +13,28 @@
|
|
13
13
|
Pio is a ruby gem to easily parse and generate network packets. It
|
14
14
|
supports the following packet formats:
|
15
15
|
|
16
|
-
- [ICMP](https://relishapp.com/trema/pio/docs/
|
17
|
-
- [ARP](https://relishapp.com/trema/pio/docs/
|
18
|
-
- [LLDP](https://relishapp.com/trema/pio/docs/
|
19
|
-
- [DHCP](https://relishapp.com/trema/pio/docs/
|
20
|
-
- [UDP](https://relishapp.com/trema/pio/docs/
|
16
|
+
- [ICMP](https://relishapp.com/trema/pio/docs/pio-icmp)
|
17
|
+
- [ARP](https://relishapp.com/trema/pio/docs/pio-arp)
|
18
|
+
- [LLDP](https://relishapp.com/trema/pio/docs/pio-lldp)
|
19
|
+
- [DHCP](https://relishapp.com/trema/pio/docs/pio-dhcp)
|
20
|
+
- [UDP](https://relishapp.com/trema/pio/docs/pio-udp)
|
21
21
|
- OpenFlow 1.0
|
22
|
-
- [Hello](https://relishapp.com/trema/pio/docs/open-flow10/hello)
|
23
|
-
- [Echo Request](https://relishapp.com/trema/pio/docs/open-flow10/echo-request)
|
24
|
-
- [Echo Reply](https://relishapp.com/trema/pio/docs/open-flow10/echo-reply)
|
25
|
-
- [Features Request](https://relishapp.com/trema/pio/docs/open-flow10/features-request)
|
26
|
-
- [Features Reply](https://relishapp.com/trema/pio/docs/open-flow10/features-reply)
|
27
|
-
- [Packet In](https://relishapp.com/trema/pio/docs/open-flow10/
|
28
|
-
- [Packet Out](https://relishapp.com/trema/pio/docs/open-flow10/
|
29
|
-
- [Flow Mod](https://relishapp.com/trema/pio/docs/open-flow10/
|
30
|
-
- [Port Status](https://relishapp.com/trema/pio/docs/open-flow10/
|
31
|
-
- [Exact Match](https://relishapp.com/trema/pio/docs/open-flow10/
|
22
|
+
- [Hello](https://relishapp.com/trema/pio/docs/open-flow10/pio-hello)
|
23
|
+
- [Echo Request](https://relishapp.com/trema/pio/docs/open-flow10/pio-echo-request)
|
24
|
+
- [Echo Reply](https://relishapp.com/trema/pio/docs/open-flow10/pio-echo-reply)
|
25
|
+
- [Features Request](https://relishapp.com/trema/pio/docs/open-flow10/pio-features-request)
|
26
|
+
- [Features Reply](https://relishapp.com/trema/pio/docs/open-flow10/pio-features-reply)
|
27
|
+
- [Packet In](https://relishapp.com/trema/pio/docs/open-flow10/pio-packetin)
|
28
|
+
- [Packet Out](https://relishapp.com/trema/pio/docs/open-flow10/pio-packetout)
|
29
|
+
- [Flow Mod](https://relishapp.com/trema/pio/docs/open-flow10/pio-flowmod)
|
30
|
+
- [Port Status](https://relishapp.com/trema/pio/docs/open-flow10/pio-portstatus)
|
31
|
+
- [Exact Match](https://relishapp.com/trema/pio/docs/open-flow10/pio-exactmatch)
|
32
32
|
- OpenFlow 1.3
|
33
|
-
- [Hello](https://relishapp.com/trema/pio/docs/open-flow13/hello)
|
34
|
-
- [Echo Request](https://relishapp.com/trema/pio/docs/open-flow13/echo-request)
|
35
|
-
- [Echo Reply](https://relishapp.com/trema/pio/docs/open-flow13/echo-reply)
|
33
|
+
- [Hello](https://relishapp.com/trema/pio/docs/open-flow13/pio-hello)
|
34
|
+
- [Echo Request](https://relishapp.com/trema/pio/docs/open-flow13/pio-echo-request)
|
35
|
+
- [Echo Reply](https://relishapp.com/trema/pio/docs/open-flow13/pio-echo-reply)
|
36
|
+
- [Features Request](https://relishapp.com/trema/pio/docs/open-flow13/pio-features-request)
|
37
|
+
- [Features Reply](https://relishapp.com/trema/pio/docs/open-flow13/pio-features-reply)
|
36
38
|
|
37
39
|
## Features Overview
|
38
40
|
|
File without changes
|
data/features/arp.feature
CHANGED
File without changes
|
data/features/dhcp.feature
CHANGED
@@ -1,4 +1,211 @@
|
|
1
|
-
Feature:
|
2
|
-
Scenario:
|
3
|
-
When I try to
|
1
|
+
Feature: Pio::Dhcp
|
2
|
+
Scenario: create a DHCP Ack
|
3
|
+
When I try to create a packet with:
|
4
|
+
"""
|
5
|
+
Pio::Dhcp::Ack.new(
|
6
|
+
source_mac: 'aa:bb:cc:dd:ee:ff',
|
7
|
+
destination_mac: '11:22:33:44:55:66',
|
8
|
+
ip_source_address: '192.168.0.10',
|
9
|
+
ip_destination_address: '192.168.0.1',
|
10
|
+
transaction_id: 0xdeadbeef,
|
11
|
+
renewal_time_value: 0xdeadbeef,
|
12
|
+
rebinding_time_value: 0xdeadbeef,
|
13
|
+
ip_address_lease_time: 0xdeadbeef,
|
14
|
+
subnet_mask: '255.255.255.0'
|
15
|
+
)
|
16
|
+
"""
|
17
|
+
Then it should finish successfully
|
18
|
+
And the packet have the following fields and values:
|
19
|
+
| field | value |
|
20
|
+
| class | Pio::Dhcp::Ack |
|
21
|
+
| destination_mac | 11:22:33:44:55:66 |
|
22
|
+
| source_mac | aa:bb:cc:dd:ee:ff |
|
23
|
+
| ether_type | 2048 |
|
24
|
+
| ip_version | 4 |
|
25
|
+
| ip_header_length | 5 |
|
26
|
+
| ip_type_of_service | 0 |
|
27
|
+
| ip_total_length | 328 |
|
28
|
+
| ip_identifier | 0 |
|
29
|
+
| ip_flag | 0 |
|
30
|
+
| ip_fragment | 0 |
|
31
|
+
| ip_ttl | 128 |
|
32
|
+
| ip_protocol | 17 |
|
33
|
+
| ip_header_checksum | 47177 |
|
34
|
+
| ip_source_address | 192.168.0.10 |
|
35
|
+
| ip_destination_address | 192.168.0.1 |
|
36
|
+
| udp_source_port | 67 |
|
37
|
+
| udp_destination_port | 68 |
|
38
|
+
| udp_length | 308 |
|
39
|
+
| udp_checksum | 7012 |
|
40
|
+
| message_type | 5 |
|
41
|
+
| hw_addr_type | 1 |
|
42
|
+
| hw_addr_len | 6 |
|
43
|
+
| hops | 0 |
|
44
|
+
| transaction_id | 3735928559 |
|
45
|
+
| seconds | 0 |
|
46
|
+
| bootp_flags | 0 |
|
47
|
+
| client_ip_address | 0.0.0.0 |
|
48
|
+
| your_ip_address | 192.168.0.1 |
|
49
|
+
| next_server_ip_address | 0.0.0.0 |
|
50
|
+
| relay_agent_ip_address | 0.0.0.0 |
|
51
|
+
| client_mac_address | aa:bb:cc:dd:ee:ff |
|
52
|
+
| subnet_mask | 255.255.255.0 |
|
53
|
+
| server_identifier | 192.168.0.10 |
|
54
|
+
| renewal_time_value | 3735928559 |
|
55
|
+
| rebinding_time_value | 3735928559 |
|
56
|
+
| ip_address_lease_time | 3735928559 |
|
57
|
+
|
58
|
+
Scenario: create a DHCP Discover
|
59
|
+
When I try to create a packet with:
|
60
|
+
"""
|
61
|
+
Pio::Dhcp::Discover.new(
|
62
|
+
source_mac: '24:db:ac:41:e5:5b',
|
63
|
+
transaction_id: 0xdeadbeef
|
64
|
+
)
|
65
|
+
"""
|
66
|
+
Then it should finish successfully
|
67
|
+
And the packet have the following fields and values:
|
68
|
+
| field | value |
|
69
|
+
| class | Pio::Dhcp::Discover |
|
70
|
+
| destination_mac | ff:ff:ff:ff:ff:ff |
|
71
|
+
| source_mac | 24:db:ac:41:e5:5b |
|
72
|
+
| ether_type | 2048 |
|
73
|
+
| ip_version | 4 |
|
74
|
+
| ip_header_length | 5 |
|
75
|
+
| ip_type_of_service | 0 |
|
76
|
+
| ip_total_length | 328 |
|
77
|
+
| ip_identifier | 0 |
|
78
|
+
| ip_flag | 0 |
|
79
|
+
| ip_fragment | 0 |
|
80
|
+
| ip_ttl | 128 |
|
81
|
+
| ip_protocol | 17 |
|
82
|
+
| ip_header_checksum | 14758 |
|
83
|
+
| ip_source_address | 0.0.0.0 |
|
84
|
+
| ip_destination_address | 255.255.255.255 |
|
85
|
+
| udp_source_port | 68 |
|
86
|
+
| udp_destination_port | 67 |
|
87
|
+
| udp_length | 308 |
|
88
|
+
| udp_checksum | 34836 |
|
89
|
+
| message_type | 1 |
|
90
|
+
| hw_addr_type | 1 |
|
91
|
+
| hw_addr_len | 6 |
|
92
|
+
| hops | 0 |
|
93
|
+
| transaction_id | 3735928559 |
|
94
|
+
| seconds | 0 |
|
95
|
+
| bootp_flags | 0 |
|
96
|
+
| client_ip_address | 0.0.0.0 |
|
97
|
+
| your_ip_address | 0.0.0.0 |
|
98
|
+
| next_server_ip_address | 0.0.0.0 |
|
99
|
+
| relay_agent_ip_address | 0.0.0.0 |
|
100
|
+
| client_mac_address | 24:db:ac:41:e5:5b |
|
101
|
+
| parameters_list | [1, 3, 6, 42] |
|
102
|
+
| client_identifier | 24:db:ac:41:e5:5b |
|
103
|
+
|
104
|
+
Scenario: create a DHCP Request
|
105
|
+
When I try to create a packet with:
|
106
|
+
"""
|
107
|
+
Pio::Dhcp::Request.new(
|
108
|
+
source_mac: '24:db:ac:41:e5:5b',
|
109
|
+
transaction_id: 0xdeadbeef,
|
110
|
+
server_identifier: '192.168.0.1',
|
111
|
+
requested_ip_address: '192.168.0.10'
|
112
|
+
)
|
113
|
+
"""
|
114
|
+
Then it should finish successfully
|
115
|
+
And the packet have the following fields and values:
|
116
|
+
| field | value |
|
117
|
+
| class | Pio::Dhcp::Request |
|
118
|
+
| destination_mac | ff:ff:ff:ff:ff:ff |
|
119
|
+
| source_mac | 24:db:ac:41:e5:5b |
|
120
|
+
| ether_type | 2048 |
|
121
|
+
| ip_version | 4 |
|
122
|
+
| ip_header_length | 5 |
|
123
|
+
| ip_type_of_service | 0 |
|
124
|
+
| ip_total_length | 328 |
|
125
|
+
| ip_identifier | 0 |
|
126
|
+
| ip_flag | 0 |
|
127
|
+
| ip_fragment | 0 |
|
128
|
+
| ip_ttl | 128 |
|
129
|
+
| ip_protocol | 17 |
|
130
|
+
| ip_header_checksum | 14758 |
|
131
|
+
| ip_source_address | 0.0.0.0 |
|
132
|
+
| ip_destination_address | 255.255.255.255 |
|
133
|
+
| udp_source_port | 68 |
|
134
|
+
| udp_destination_port | 67 |
|
135
|
+
| udp_length | 308 |
|
136
|
+
| udp_checksum | 52915 |
|
137
|
+
| message_type | 3 |
|
138
|
+
| hw_addr_type | 1 |
|
139
|
+
| hw_addr_len | 6 |
|
140
|
+
| hops | 0 |
|
141
|
+
| transaction_id | 3735928559 |
|
142
|
+
| seconds | 0 |
|
143
|
+
| bootp_flags | 0 |
|
144
|
+
| client_ip_address | 0.0.0.0 |
|
145
|
+
| your_ip_address | 0.0.0.0 |
|
146
|
+
| next_server_ip_address | 0.0.0.0 |
|
147
|
+
| relay_agent_ip_address | 0.0.0.0 |
|
148
|
+
| client_mac_address | 24:db:ac:41:e5:5b |
|
149
|
+
| parameters_list | [1, 3, 6, 42] |
|
150
|
+
| client_identifier | 24:db:ac:41:e5:5b |
|
151
|
+
| requested_ip_address | 192.168.0.10 |
|
152
|
+
|
153
|
+
Scenario: create a DHCP Offer
|
154
|
+
When I try to create a packet with:
|
155
|
+
"""
|
156
|
+
Pio::Dhcp::Offer.new(
|
157
|
+
source_mac: 'aa:bb:cc:dd:ee:ff',
|
158
|
+
destination_mac: '11:22:33:44:55:66',
|
159
|
+
ip_source_address: '192.168.0.10',
|
160
|
+
ip_destination_address: '192.168.0.1',
|
161
|
+
transaction_id: 0xdeadbeef,
|
162
|
+
renewal_time_value: 0xdeadbeef,
|
163
|
+
rebinding_time_value: 0xdeadbeef,
|
164
|
+
ip_address_lease_time: 0xdeadbeef,
|
165
|
+
subnet_mask: '255.255.255.0'
|
166
|
+
)
|
167
|
+
"""
|
168
|
+
Then it should finish successfully
|
169
|
+
And the packet have the following fields and values:
|
170
|
+
| field | value |
|
171
|
+
| class | Pio::Dhcp::Offer |
|
172
|
+
| destination_mac | 11:22:33:44:55:66 |
|
173
|
+
| source_mac | aa:bb:cc:dd:ee:ff |
|
174
|
+
| ether_type | 2048 |
|
175
|
+
| ip_version | 4 |
|
176
|
+
| ip_header_length | 5 |
|
177
|
+
| ip_type_of_service | 0 |
|
178
|
+
| ip_total_length | 328 |
|
179
|
+
| ip_identifier | 0 |
|
180
|
+
| ip_flag | 0 |
|
181
|
+
| ip_fragment | 0 |
|
182
|
+
| ip_ttl | 128 |
|
183
|
+
| ip_protocol | 17 |
|
184
|
+
| ip_header_checksum | 47177 |
|
185
|
+
| ip_source_address | 192.168.0.10 |
|
186
|
+
| ip_destination_address | 192.168.0.1 |
|
187
|
+
| udp_source_port | 67 |
|
188
|
+
| udp_destination_port | 68 |
|
189
|
+
| udp_length | 308 |
|
190
|
+
| udp_checksum | 7780 |
|
191
|
+
| message_type | 2 |
|
192
|
+
| hw_addr_type | 1 |
|
193
|
+
| hw_addr_len | 6 |
|
194
|
+
| hops | 0 |
|
195
|
+
| transaction_id | 3735928559 |
|
196
|
+
| seconds | 0 |
|
197
|
+
| bootp_flags | 0 |
|
198
|
+
| client_ip_address | 0.0.0.0 |
|
199
|
+
| your_ip_address | 192.168.0.1 |
|
200
|
+
| next_server_ip_address | 0.0.0.0 |
|
201
|
+
| relay_agent_ip_address | 0.0.0.0 |
|
202
|
+
| client_mac_address | aa:bb:cc:dd:ee:ff |
|
203
|
+
| subnet_mask | 255.255.255.0 |
|
204
|
+
| server_identifier | 192.168.0.10 |
|
205
|
+
| renewal_time_value | 3735928559 |
|
206
|
+
| rebinding_time_value | 3735928559 |
|
207
|
+
| ip_address_lease_time | 3735928559 |
|
208
|
+
|
209
|
+
Scenario: parse dhcp.pcap
|
210
|
+
When I try to parse a file named "dhcp.pcap" with "Pio::Dhcp" class
|
4
211
|
Then it should finish successfully
|
File without changes
|
data/features/icmp.feature
CHANGED
File without changes
|
File without changes
|
data/features/lldp.feature
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Feature:
|
1
|
+
Feature: Pio::Lldp
|
2
2
|
Scenario: create
|
3
3
|
When I try to create an OpenFlow message with:
|
4
4
|
"""
|
@@ -22,8 +22,8 @@ Feature: LLDP
|
|
22
22
|
| management_address | |
|
23
23
|
| organizationally_specific | |
|
24
24
|
|
25
|
-
Scenario: parse
|
26
|
-
When I try to parse a file named "lldp.minimal.pcap" with "Lldp" class
|
25
|
+
Scenario: parse lldp.minimal.pcap
|
26
|
+
When I try to parse a file named "lldp.minimal.pcap" with "Pio::Lldp" class
|
27
27
|
Then it should finish successfully
|
28
28
|
Then the message #1 have the following fields and values:
|
29
29
|
| field | value |
|
@@ -42,6 +42,6 @@ Feature: LLDP
|
|
42
42
|
| management_address | |
|
43
43
|
| organizationally_specific | |
|
44
44
|
|
45
|
-
Scenario: parse
|
46
|
-
When I try to parse a file named "lldp.detailed.pcap" with "Lldp" class
|
45
|
+
Scenario: parse lldp.detailed.pcap
|
46
|
+
When I try to parse a file named "lldp.detailed.pcap" with "Pio::Lldp" class
|
47
47
|
Then it should finish successfully
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
|
-
Feature: Echo
|
2
|
-
Scenario:
|
1
|
+
Feature: Pio::Echo::Reply
|
2
|
+
Scenario: new
|
3
3
|
When I try to create an OpenFlow message with:
|
4
4
|
"""
|
5
5
|
Pio::Echo::Reply.new
|
@@ -15,7 +15,7 @@ Feature: Echo Reply
|
|
15
15
|
| xid | 0 |
|
16
16
|
| user_data | |
|
17
17
|
|
18
|
-
Scenario:
|
18
|
+
Scenario: new(transaction_id: 123)
|
19
19
|
When I try to create an OpenFlow message with:
|
20
20
|
"""
|
21
21
|
Pio::Echo::Reply.new(transaction_id: 123)
|
@@ -31,7 +31,7 @@ Feature: Echo Reply
|
|
31
31
|
| xid | 123 |
|
32
32
|
| user_data | |
|
33
33
|
|
34
|
-
Scenario:
|
34
|
+
Scenario: new(xid: 123)
|
35
35
|
When I try to create an OpenFlow message with:
|
36
36
|
"""
|
37
37
|
Pio::Echo::Reply.new(xid: 123)
|
@@ -47,21 +47,21 @@ Feature: Echo Reply
|
|
47
47
|
| xid | 123 |
|
48
48
|
| user_data | |
|
49
49
|
|
50
|
-
Scenario:
|
50
|
+
Scenario: new(xid: -1) and error
|
51
51
|
When I try to create an OpenFlow message with:
|
52
52
|
"""
|
53
53
|
Pio::Echo::Reply.new(xid: -1)
|
54
54
|
"""
|
55
55
|
Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
|
56
56
|
|
57
|
-
Scenario:
|
57
|
+
Scenario: new(xid: 2**32) and error
|
58
58
|
When I try to create an OpenFlow message with:
|
59
59
|
"""
|
60
60
|
Pio::Echo::Reply.new(xid: 2**32)
|
61
61
|
"""
|
62
62
|
Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
|
63
63
|
|
64
|
-
Scenario:
|
64
|
+
Scenario: new(user_data: 'echo reply body')
|
65
65
|
When I try to create an OpenFlow message with:
|
66
66
|
"""
|
67
67
|
Pio::Echo::Reply.new(user_data: 'echo reply body')
|
@@ -77,8 +77,8 @@ Feature: Echo Reply
|
|
77
77
|
| xid | 0 |
|
78
78
|
| user_data | echo reply body |
|
79
79
|
|
80
|
-
Scenario:
|
81
|
-
When I try to parse a file named "echo_reply.raw" with "Pio::Echo::Reply" class
|
80
|
+
Scenario: read (no message body)
|
81
|
+
When I try to parse a file named "open_flow10/echo_reply.raw" with "Pio::Echo::Reply" class
|
82
82
|
Then it should finish successfully
|
83
83
|
And the message have the following fields and values:
|
84
84
|
| field | value |
|
@@ -91,5 +91,5 @@ Feature: Echo Reply
|
|
91
91
|
| user_data | |
|
92
92
|
|
93
93
|
Scenario: parse error
|
94
|
-
When I try to parse a file named "features_reply.raw" with "Pio::Echo::Reply" class
|
94
|
+
When I try to parse a file named "open_flow10/features_reply.raw" with "Pio::Echo::Reply" class
|
95
95
|
Then it should fail with "Pio::ParseError", "Invalid Echo Reply message."
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
|
-
Feature: Echo
|
2
|
-
Scenario:
|
1
|
+
Feature: Pio::Echo::Request
|
2
|
+
Scenario: new
|
3
3
|
When I try to create an OpenFlow message with:
|
4
4
|
"""
|
5
5
|
Pio::Echo::Request.new
|
@@ -15,7 +15,7 @@ Feature: Echo Request
|
|
15
15
|
| xid | 0 |
|
16
16
|
| user_data | |
|
17
17
|
|
18
|
-
Scenario:
|
18
|
+
Scenario: new(transaction_id: 123)
|
19
19
|
When I try to create an OpenFlow message with:
|
20
20
|
"""
|
21
21
|
Pio::Echo::Request.new(transaction_id: 123)
|
@@ -31,7 +31,7 @@ Feature: Echo Request
|
|
31
31
|
| xid | 123 |
|
32
32
|
| user_data | |
|
33
33
|
|
34
|
-
Scenario:
|
34
|
+
Scenario: new(xid: 123)
|
35
35
|
When I try to create an OpenFlow message with:
|
36
36
|
"""
|
37
37
|
Pio::Echo::Request.new(xid: 123)
|
@@ -47,21 +47,21 @@ Feature: Echo Request
|
|
47
47
|
| xid | 123 |
|
48
48
|
| user_data | |
|
49
49
|
|
50
|
-
Scenario:
|
50
|
+
Scenario: new(xid: -1) and error
|
51
51
|
When I try to create an OpenFlow message with:
|
52
52
|
"""
|
53
53
|
Pio::Echo::Request.new(xid: -1)
|
54
54
|
"""
|
55
55
|
Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
|
56
56
|
|
57
|
-
Scenario:
|
57
|
+
Scenario: new(xid: 2**32) and error
|
58
58
|
When I try to create an OpenFlow message with:
|
59
59
|
"""
|
60
60
|
Pio::Echo::Request.new(xid: 2**32)
|
61
61
|
"""
|
62
62
|
Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
|
63
63
|
|
64
|
-
Scenario:
|
64
|
+
Scenario: new(user_data: 'echo request body')
|
65
65
|
When I try to create an OpenFlow message with:
|
66
66
|
"""
|
67
67
|
Pio::Echo::Request.new(user_data: 'echo request body')
|
@@ -77,8 +77,8 @@ Feature: Echo Request
|
|
77
77
|
| xid | 0 |
|
78
78
|
| user_data | echo request body |
|
79
79
|
|
80
|
-
Scenario:
|
81
|
-
When I try to parse a file named "echo_request.raw" with "Pio::Echo::Request" class
|
80
|
+
Scenario: read (no message body)
|
81
|
+
When I try to parse a file named "open_flow10/echo_request.raw" with "Pio::Echo::Request" class
|
82
82
|
Then it should finish successfully
|
83
83
|
And the message have the following fields and values:
|
84
84
|
| field | value |
|
@@ -91,5 +91,5 @@ Feature: Echo Request
|
|
91
91
|
| user_data | |
|
92
92
|
|
93
93
|
Scenario: parse error
|
94
|
-
When I try to parse a file named "features_request.raw" with "Pio::Echo::Request" class
|
94
|
+
When I try to parse a file named "open_flow10/features_request.raw" with "Pio::Echo::Request" class
|
95
95
|
Then it should fail with "Pio::ParseError", "Invalid Echo Request message."
|