cosmetic: move EthernetDecoder type from types.go to ethernet_decoder.go
This commit is contained in:
1 parent
f5dc851ebe
commit
1bc27c303e
2 files changed
+7
-8
No files matched your search
@@ -8,6 +8,13 @@ import (
|
||||
"net"
|
||||
)
|
||||
|
||||
type EthernetDecoder struct {
|
||||
eth layers.Ethernet
|
||||
ip layers.IPv4
|
||||
decoded []gopacket.LayerType
|
||||
parser *gopacket.DecodingLayerParser
|
||||
}
|
||||
|
||||
func NewEthernetDecoder() *EthernetDecoder {
|
||||
dec := &EthernetDecoder{}
|
||||
dec.parser = gopacket.NewDecodingLayerParser(layers.LayerTypeEthernet, &dec.eth, &dec.ip)
|
||||
|
||||
Reference in new issue
Block a user