icmpv6

package
v0.0.0-...-c97f47a Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Overview

Provides encoding and decoding for ICMPv6 packets.

Index

Constants

View Source
const (
	DstUnreachable Type = 1
	PacketTooBig        = 2
	TimeExceeded        = 3
	ParamProblem        = 4
	Private1            = 100
	Private2            = 101
	Reserved1           = 127
	EchoRequest         = 128
	EchoReply           = 129
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code uint8

func (Code) String

func (c Code) String() string

type Packet

type Packet struct {
	Type     Type
	Code     Code
	Checksum uint16 `string:"sum"`

	Body uint32 `cmp:"skip" string:"skip"`
	// contains filtered or unexported fields
}

func Make

func Make() *Packet

func (*Packet) Answers

func (p *Packet) Answers(other packet.Packet) bool

func (*Packet) Equals

func (p *Packet) Equals(other packet.Packet) bool

func (*Packet) GetLength

func (p *Packet) GetLength() uint16

func (*Packet) GetType

func (p *Packet) GetType() packet.Type

func (*Packet) GuessPayloadType

func (p *Packet) GuessPayloadType() packet.Type

func (*Packet) InitChecksum

func (p *Packet) InitChecksum(csum uint32)

func (*Packet) Pack

func (p *Packet) Pack(buf *packet.Buffer) error

func (*Packet) Payload

func (p *Packet) Payload() packet.Packet

func (*Packet) SetPayload

func (p *Packet) SetPayload(pl packet.Packet) error

func (*Packet) String

func (p *Packet) String() string

func (*Packet) Unpack

func (p *Packet) Unpack(buf *packet.Buffer) error

type Type

type Type uint8

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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