Movatterモバイル変換


[0]ホーム

URL:


ipproto

package
v1.92.2Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2025 License:BSD-3-ClauseImports:4Imported by:35

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package ipproto contains IP Protocol constants.

Index

Constants

View Source
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)MarshalJSONadded inv1.52.0

func (pProto) MarshalJSON() ([]byte,error)

MarshalJSON implements json.Marshaler.

func (Proto)MarshalTextadded inv1.52.0

func (pProto) MarshalText() ([]byte,error)

MarshalText implements encoding.TextMarshaler.

func (Proto)Stringdeprecated

func (pProto) String()string

Deprecated: use MarshalText instead.

func (*Proto)UnmarshalJSONadded inv1.52.0

func (p *Proto) UnmarshalJSON(b []byte)error

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)UnmarshalTextadded inv1.52.0

func (p *Proto) UnmarshalText(b []byte)error

UnmarshalText implements encoding.TextUnmarshaler. If the input is empty, pis set to 0. If an error occurs, p is unchanged.

typeVersionadded inv1.52.0

type Versionuint8

Version describes the IP address version.

func (Version)Stringadded inv1.52.0

func (pVersion) String()string

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp