ipx

package
v0.0.0-...-56ea410 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2020 License: ISC Imports: 4 Imported by: 0

Documentation

Overview

Package ipx implements common types for IPX header encoding and decoding.

Index

Constants

This section is empty.

Variables

View Source
var (
	AddrNull      = Addr([6]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00})
	AddrBroadcast = Addr([6]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff})
)

Functions

This section is empty.

Types

type Addr

type Addr [6]byte

Addr represents an IPX address (MAC address).

func (Addr) Network

func (a Addr) Network() string

func (Addr) String

func (a Addr) String() string
type Header struct {
	Checksum     uint16
	Length       uint16
	TransControl byte
	PacketType   byte
	Dest, Src    HeaderAddr
}

Header represents an IPX header.

func (*Header) IsBroadcast

func (h *Header) IsBroadcast() bool

func (*Header) IsRegistrationPacket

func (h *Header) IsRegistrationPacket() bool

func (*Header) MarshalBinary

func (h *Header) MarshalBinary() ([]byte, error)

MarshalBinary populates a slice of bytes from an IPX header.

func (*Header) UnmarshalBinary

func (h *Header) UnmarshalBinary(packet []byte) error

UnmarshalBinary decodes an IPX header from a slice of bytes.

type HeaderAddr

type HeaderAddr struct {
	Network [4]byte
	Addr    Addr
	Socket  uint16
}

HeaderAddr represents a full IPX address and socket number.

func (*HeaderAddr) MarshalBinary

func (a *HeaderAddr) MarshalBinary() ([]byte, error)

MarshalBinary populates a slice of bytes from an IPX header address.

func (*HeaderAddr) UnmarshalBinary

func (a *HeaderAddr) UnmarshalBinary(data []byte) error

UnmarshalBinary decodes an IPX header address from a slice of bytes.

Jump to

Keyboard shortcuts

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