Conversation
|
It is based on the PR for DLT_RAW. I don't comprehend the relationship between LayerType and EnumMetadata yet. In the EnumMetadata instance one can refer a LayerType (and that is done for higher level IP protocols but not for the link layer). At the same time a generic LayerType could probably use EnumMetadata. The above seems to lead to some code duplication and difficulty to test things (E.g. DecodeFromBytes not called) |
|
@zecke Would it be possible to (also) open this upstream at https://github.com/google/gopacket ? I do hope to resync gopacket with the upstream code at some point, and the more custom code we have, the harder will be. This might also give you better reviews. |
|
I have done so and had to fix some testcases. Do you want to enable travis-ci support for your clone to see if I should fix things here as well? |
|
@zecke Thanks, I enabled travis checks in #10. Can you rebase this one to have the tests run? Thanks for submitting the patch upstream, I'll follow the discussion on google/gopacket#324. |
According to http://www.tcpdump.org/linktypes.html the value is 101 but in reality it is 12 (and on OpenBSD 14). While browsing through the list on OpenBSD the DLT_LOOP is 12 (and not 108). In the long it might make sense to back these values with cgo (and pcap/bpf.h).
Create a Raw struct and make it implement the LayerType interface. Add a testcase to decode a raw IPv4/ICMPv4 frames. Remove decodeIPv4or6 that was only used for the raw ip link type. The DecodeFromBytes method is not tested/used yet and packetbeat might be the first user.
|
Done that but looking at the build log I wonder.. shouldn't this be "tsg/gopacket"? .travis.yml change s/google/tsg/? |
No description provided.