mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Clarify comment on NetworkProtocolNumber.
The actual values used for this field in Netstack are actually EtherType values of the protocol in an Ethernet frame. Eg. header.IPv4ProtocolNumber is 0x0800 and not the number of the IPv4 Protocol Number itself which is 4. Similarly header.IPv6ProtocolNumber is set to 0x86DD whereas the IPv6 protocol number is 41. See: - https://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xhtml (For EtherType) - https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml (For ProtocolNumbers) PiperOrigin-RevId: 328407293
This commit is contained in:
committed by
gVisor bot
parent
e650890299
commit
1f0d23c7ad
+4
-1
@@ -1029,7 +1029,10 @@ func (r Route) String() string {
|
||||
// TransportProtocolNumber is the number of a transport protocol.
|
||||
type TransportProtocolNumber uint32
|
||||
|
||||
// NetworkProtocolNumber is the number of a network protocol.
|
||||
// NetworkProtocolNumber is the EtherType of a network protocol in an Ethernet
|
||||
// frame.
|
||||
//
|
||||
// See: https://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xhtml
|
||||
type NetworkProtocolNumber uint32
|
||||
|
||||
// A StatCounter keeps track of a statistic.
|
||||
|
||||
Reference in New Issue
Block a user