ax25

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UnnumberedTypeName = map[UnnumberedType]string{
		SABME: "SABME",
		SABM:  "SABM",
		DISC:  "DISC",
		DM:    "DM",
		UA:    "UA",
		FRMR:  "FRMR",
		UI:    "UI",
		XID:   "XID",
		TEST:  "TEST",
	}
)

Functions

This section is empty.

Types

type AX25

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

func NewDecoder

func NewDecoder() *AX25

func (*AX25) Feed

func (ax *AX25) Feed(bit int) *Frame

Return a frame when a full one has been received. Otherwise return nil.

type Address

type Address struct {
	Callsign string
	SSID     int // Secondary Station ID
}

func (Address) String

func (a Address) String() string

type Frame

type Frame struct {
	Source           Address
	Destination      Address
	Repeaters        []Address
	V1               bool
	Command          bool // command=true, response=false
	Type             FrameType
	SendSeq, RecvSeq int
	PollFinal        bool // P/F of 1 is true, 0 is false
	UnnumberedType   UnnumberedType
	SupervisoryType  SupervisoryType
	PID              PID // Protocol Identifier
	Info             []byte
}

type FrameType

type FrameType byte
const (
	IFrame FrameType = 0 // Information frame
	SFrame FrameType = 1 // Supervisory frame
	UFrame FrameType = 2 // Unnumbered frame
)

func (FrameType) String

func (t FrameType) String() string

type PID

type PID byte
const (
	ISO8208CCITTX25PLP     PID = 0x01 // ISO 8208/CCITT X.25 PLP
	CompressedTCPIP        PID = 0x06 // Compressed TCP/IP. RFC 1144
	UncompressedTCPIP      PID = 0x07 // Uncompressed TCP/IP
	SegmentationFragment   PID = 0x08 // Segmentation fragment
	TEXNETDatagramProtocol PID = 0xc3 // TEXNET database protocol
	LinkQualityProtocol    PID = 0xc4 // Link Quality Protocol
	AppleTalk              PID = 0xca // Appletalk
	AppletalkARP           PID = 0xcb // Appletalk ARP
	ARPAInternetProtocol   PID = 0xcc // ARPA Internet Protocol
	ARPAAddressResolution  PID = 0xcd // ARPA Address Resolution
	FlexNet                PID = 0xce // FlexNet
	NETROM                 PID = 0xcf // NET/ROM
	NoLayer3Protocol       PID = 0xf0 // No Layer 3 Protocol Implemented
)

func (PID) String

func (pid PID) String() string

type SupervisoryType

type SupervisoryType byte
const (
	RR   SupervisoryType = 0x1 // Receive Ready
	RNR  SupervisoryType = 0x5 // Receive Not Ready
	REJ  SupervisoryType = 0x9 // Reject
	SREJ SupervisoryType = 0xd // Selective Reject
)

func (SupervisoryType) String

func (t SupervisoryType) String() string

type UnnumberedType

type UnnumberedType byte
const (
	SABME UnnumberedType = 0x6f // Set Async Balanced Mode
	SABM  UnnumberedType = 0x2f // Set Async Balanced Mode
	DISC  UnnumberedType = 0x43 // Disconnect
	DM    UnnumberedType = 0x0f // Disconnect Mode
	UA    UnnumberedType = 0x63 // Unnumbered Acknowledge
	FRMR  UnnumberedType = 0x87 // Frame Reject
	UI    UnnumberedType = 0x03 // Unnumbered Information
	XID   UnnumberedType = 0xaf // Exchange Identification
	TEST  UnnumberedType = 0xe3 // Test
)

func (UnnumberedType) String

func (t UnnumberedType) String() string

Jump to

Keyboard shortcuts

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