google / google/gopacket

Q: how to access IPv6 ext headers?

Open
#900 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

Hi,
since gopacket doesn't provide any IP fragmentation support, I want to write one, however after reading the layers.IPv6 doc, I can't figure out how gopacket handle the IPv6 ext headers, there is only a HopByHop field in the struct, how does user access other v6 ext header like routing header after using gopacket.NewPacket() ?

```
type IPv6 struct {
// http://www.networksorcery.com/enp/protocol/ipv6.htm
BaseLayer
Version uint8
TrafficClass uint8
FlowLabel uint32
Length uint16
NextHeader IPProtocol
HopLimit uint8
SrcIP net.IP
DstIP net.IP
HopByHop *IPv6HopByHop
// contains filtered or unexported fields
}
```

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.