ipproto
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package ipproto contains IP Protocol constants.
Index¶
Constants¶
const (Version4 = 4Version6 = 6)
Valid Version values.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeProto¶
type Protouint8
Proto is an IP subprotocol as defined by the IANA protocolnumbers list(https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml),or the special values Unknown or Fragment.
const (// Unknown represents an unknown or unsupported protocol; it's// deliberately the zero value. Strictly speaking the zero// value is IPv6 hop-by-hop extensions, but we don't support// those, so this is still technically correct.UnknownProto = 0x00// Values from the IANA registry.ICMPv4Proto = 0x01IGMPProto = 0x02ICMPv6Proto = 0x3aTCPProto = 0x06UDPProto = 0x11DCCPProto = 0x21GREProto = 0x2fSCTPProto = 0x84// TSMP is the Tailscale Message Protocol (our ICMP-ish// thing), an IP protocol used only between Tailscale nodes// (still encrypted by WireGuard) that communicates why things// failed, etc.//// Proto number 99 is reserved for "any private encryption// scheme". We never accept these from the host OS stack nor// send them to the host network stack. It's only used between// nodes.TSMPProto = 99// Fragment represents any non-first IP fragment, for which we// don't have the sub-protocol header (and therefore can't// figure out what the sub-protocol is).//// 0xFF is reserved in the IANA registry, so we steal it for// internal use.FragmentProto = 0xFF)
func (Proto)MarshalJSON¶added inv1.52.0
MarshalJSON implements json.Marshaler.
func (Proto)MarshalText¶added inv1.52.0
MarshalText implements encoding.TextMarshaler.
func (*Proto)UnmarshalJSON¶added inv1.52.0
UnmarshalJSON implements json.Unmarshaler. If the input is empty, p is set to0. If an error occurs, p is unchanged. The input must be a JSON number or anaccepted string name.
func (*Proto)UnmarshalText¶added inv1.52.0
UnmarshalText implements encoding.TextUnmarshaler. If the input is empty, pis set to 0. If an error occurs, p is unchanged.