google / google/gopacket

How to decode InformationElement in Dot11MgmtProbeReq

Open
#749 0 comments 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

For 802.11 Beacon frames, I can use ```layer.(*layers.Dot11InformationElement)``` to get the IE, like this:

```
for _, layer := range packet.Layers() {
if layer.LayerType() == layers.LayerTypeDot11InformationElement {
dot11info, ok := layer.(*layers.Dot11InformationElement)
}
}
```

but for ProbeReq frames, ```layer.(*layers.Dot11InformationElement)```doesn't exist, I can only use ```
packet.Layer(layers.LayerTypeDot11MgmtProbeReq).(*layers.Dot11MgmtProbeReq)```
to get the Contents and Payload. It seems that the Information elements are in the Contents.

I'm new to golang, could you please give me an example of how to decode information elements in DOt11MgmtProbeReq, Thanks

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.