gopacket icon indicating copy to clipboard operation
gopacket copied to clipboard

Add LayerTypeRaw for LinkTypeRaw link layers

Open zecke opened this issue 8 years ago • 6 comments

zecke avatar Jun 02 '17 08:06 zecke

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 avatar Jun 02 '17 08:06 zecke

@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.

tsg avatar Jun 06 '17 11:06 tsg

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 avatar Jun 06 '17 15:06 zecke

@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 https://github.com/google/gopacket/pull/324.

tsg avatar Jun 07 '17 10:06 tsg

Done that but looking at the build log I wonder..

The command "go test github.com/google/gopacket/layers" exited with 0.
0.68s$ go test github.com/google/gopacket/tcpassembly
ok  	github.com/google/gopacket/tcpassembly	0.147s

shouldn't this be "tsg/gopacket"? .travis.yml change s/google/tsg/?

zecke avatar Jun 07 '17 11:06 zecke

@zecke ah, missed that :). Fixing it in #11.

tsg avatar Jun 07 '17 12:06 tsg