google / google/gopacket

LinkType.LayerType() returns 0 for all types

Open
#1,190 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

In the following snippet, the LinkType().LayerType() method always returns a value of 0 for all layer types. It should return type=1 for example, when the link type is "Ethernet" or 113 when the linkType of the pcapgo.Reader is "Linux Cooked SLL"
```golang
pcapReader, err := pcapgo.NewReader(r)
if err != nil {
return "", err
}
layerType := pcapReader.LinkType().LayerType()
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.