icmp6

package
v0.0.0-...-58bec74 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseMessage

func ParseMessage(proto int, b []byte) (*icmp.Message, error)

Types

type MulticastAddressRecord

type MulticastAddressRecord struct {
	Type             MulticastAddressRecordType
	MulticastAddress netip.Addr
	SourceAddresses  []netip.Addr
	AuxialiaryData   []byte
}

type MulticastAddressRecordType

type MulticastAddressRecordType int
const (
	MulticastAddressRecordTypeModeIsInclude       MulticastAddressRecordType = 1
	MulticastAddressRecordTypeModeIsExclude       MulticastAddressRecordType = 2
	MulticastAddressRecordTypeChangeToIncludeMode MulticastAddressRecordType = 3
	MulticastAddressRecordTypeChangeToExcludeMode MulticastAddressRecordType = 4
	MulticastAddressRecordTypeAllowNewSources     MulticastAddressRecordType = 5
	MulticastAddressRecordTypeBlockOldSources     MulticastAddressRecordType = 6
)

func (MulticastAddressRecordType) String

func (typ MulticastAddressRecordType) String() string

type MulticastListenerDone

type MulticastListenerDone struct {
	// contains filtered or unexported fields
}

func (*MulticastListenerDone) Len

func (mldm *MulticastListenerDone) Len(proto int) int

func (*MulticastListenerDone) Marshal

func (mldm *MulticastListenerDone) Marshal(proto int) ([]byte, error)

type MulticastListenerQuery

type MulticastListenerQuery struct {
	// contains filtered or unexported fields
}

func (*MulticastListenerQuery) Len

func (mldm *MulticastListenerQuery) Len(proto int) int

func (*MulticastListenerQuery) Marshal

func (mldm *MulticastListenerQuery) Marshal(proto int) ([]byte, error)

type MulticastListenerQueryVersion2

type MulticastListenerQueryVersion2 struct {
	MaximumResponseDelay        uint
	MulticastAddr               netip.Addr
	SupressRouterSideProcessing bool
	Robustness                  uint // Querier's Robustness Variable
	QueryInterval               uint // Quewier's Query Interval
	SourceAddrs                 []netip.Addr
}

func (*MulticastListenerQueryVersion2) Len

func (m *MulticastListenerQueryVersion2) Len(proto int) int

func (*MulticastListenerQueryVersion2) Marshal

func (m *MulticastListenerQueryVersion2) Marshal(proto int) ([]byte, error)

type MulticastListenerReport

type MulticastListenerReport struct {
	// contains filtered or unexported fields
}

func (*MulticastListenerReport) Len

func (mldm *MulticastListenerReport) Len(proto int) int

func (*MulticastListenerReport) Marshal

func (mldm *MulticastListenerReport) Marshal(proto int) ([]byte, error)

type MulticastListenerReportVersion2

type MulticastListenerReportVersion2 struct {
	Records []MulticastAddressRecord
}

func (*MulticastListenerReportVersion2) Len

func (r *MulticastListenerReportVersion2) Len(proto int) int

func (*MulticastListenerReportVersion2) Marshal

func (r *MulticastListenerReportVersion2) Marshal(proto int) ([]byte, error)

type NDPOption

type NDPOption struct {
	Type NDPOptionType
	Body NDPOptionBody
}

func (*NDPOption) Len

func (o *NDPOption) Len() int

func (*NDPOption) Marshal

func (o *NDPOption) Marshal() ([]byte, error)

type NDPOptionBody

type NDPOptionBody interface {
	Len() int
	Marshal() ([]byte, error)
}

type NDPOptionType

type NDPOptionType int
const (
	NDPOptionSourceLinkLayerAddress NDPOptionType = 1
	NDPOptionTargetLinkLayerAddress NDPOptionType = 2
)

func (NDPOptionType) String

func (typ NDPOptionType) String() string

type NDPOptions

type NDPOptions = []NDPOption

type NeighborAdvertisement

type NeighborAdvertisement struct {
	RouterFlag    bool
	SolicitedFlag bool
	OverrideFlag  bool
	TargetAddr    netip.Addr
	Options       NDPOptions
}

func (*NeighborAdvertisement) Len

func (na *NeighborAdvertisement) Len(proto int) int

func (*NeighborAdvertisement) Marshal

func (na *NeighborAdvertisement) Marshal(proto int) ([]byte, error)

type NeighborSolicitation

type NeighborSolicitation struct {
	TargetAddr netip.Addr
	Options    NDPOptions
}

func (*NeighborSolicitation) Len

func (ns *NeighborSolicitation) Len(proto int) int

func (*NeighborSolicitation) Marshal

func (ns *NeighborSolicitation) Marshal(proto int) ([]byte, error)

type RawNDPOptionBody

type RawNDPOptionBody struct {
	Data []byte
}

Raw option body

func (*RawNDPOptionBody) Len

func (p *RawNDPOptionBody) Len() int

func (*RawNDPOptionBody) Marshal

func (p *RawNDPOptionBody) Marshal() ([]byte, error)

type SourceLinkLayerAddress

type SourceLinkLayerAddress struct {
	HardwareAddr net.HardwareAddr
}

Source Link-layer Address

func (*SourceLinkLayerAddress) Len

func (p *SourceLinkLayerAddress) Len() int

func (*SourceLinkLayerAddress) Marshal

func (p *SourceLinkLayerAddress) Marshal() ([]byte, error)

type TargetLinkLayerAddress

type TargetLinkLayerAddress struct {
	HardwareAddr net.HardwareAddr
}

Target Link-layer Address

func (*TargetLinkLayerAddress) Len

func (p *TargetLinkLayerAddress) Len() int

func (*TargetLinkLayerAddress) Marshal

func (p *TargetLinkLayerAddress) Marshal() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL