Skip to content

Commit

Permalink
Pio::PacketIn#source_mac and Pio::PacketIn#destination_mac returns Pi…
Browse files Browse the repository at this point in the history
…o::Mac.
  • Loading branch information
yasuhito committed Mar 9, 2015
1 parent fc2d875 commit 1066083
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,7 @@
## develop (unreleased)
### Changes
* Deprecated `Pio::Mac#== Integer`.
* `Pio::PacketIn#source_mac` and `Pio::PacketIn#destination_mac` returns `Pio::Mac`.


## 0.17.0 (3/6/2015)
Expand Down
30 changes: 16 additions & 14 deletions features/packet_in_read.feature
Expand Up @@ -4,17 +4,19 @@ Feature: Pio::PacketIn.read
When I try to parse the file with "PacketIn" class
Then it should finish successfully
And the parsed data have the following field and value:
| field | value |
| class | Pio::PacketIn |
| ofp_version | 1 |
| message_type | 10 |
| message_length | 78 |
| transaction_id | 0 |
| xid | 0 |
| buffer_id | 4294967040 |
| total_len | 60 |
| in_port | 1 |
| reason | no_match |
| raw_data.length | 60 |
| source_mac | ac:5d:10:31:37:79 |
| destination_mac | ff:ff:ff:ff:ff:ff |
| field | value |
| class | Pio::PacketIn |
| ofp_version | 1 |
| message_type | 10 |
| message_length | 78 |
| transaction_id | 0 |
| xid | 0 |
| buffer_id | 4294967040 |
| total_len | 60 |
| in_port | 1 |
| reason | no_match |
| raw_data.length | 60 |
| source_mac | ac:5d:10:31:37:79 |
| source_mac.class | Pio::Mac |
| destination_mac | ff:ff:ff:ff:ff:ff |
| destination_mac.class | Pio::Mac |
2 changes: 1 addition & 1 deletion lib/pio/packet_in.rb
Expand Up @@ -109,7 +109,7 @@ def lldp?
end

def method_missing(method, *args)
data.__send__ method, *args
data.__send__(method, *args).snapshot
end
end
end

0 comments on commit 1066083

Please sign in to comment.