ax25

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ax25 looks at, and sets up, the Linux kernel's AX.25 stack: the kernel module, the /etc/ax25/axports file, and the network interface (ax0) that kissattach creates for a KISS TNC.

It is optional. hamstack's own packet tools talk to Direwolf directly (package agw) and need none of this; the kernel stack is for the classic tools (axcall, axlisten, ax25d, listen) and for anything that wants an AX.25 socket. Most of it needs root, so this package only reads and plans: the commands that change the system are shown to the user and run by the install steps.

Index

Constants

View Source
const PortsFile = "/etc/ax25/axports"

PortsFile is the system's axports file.

View Source
const PtyPath = "/tmp/kisstnc"

PtyPath is where Direwolf (started with -p) offers its KISS pseudo-terminal. Direwolf fixes the name, so only one Direwolf can offer it.

Variables

This section is empty.

Functions

func Upsert

func Upsert(text string, p Port) (out string, changed bool)

Upsert returns the file with p's line added, or replacing the line of the same name. Everything else, comments included, is kept. changed is false when the file already says exactly this.

func ValidPortName

func ValidPortName(s string) bool

ValidPortName reports whether s can name an axports port: short, no spaces.

Types

type Iface

type Iface struct{ Name, Addr string }

Iface is an AX.25 network interface (ax0, ax1, ...) the kernel has.

func Interfaces

func Interfaces(root string) []Iface

Interfaces lists the AX.25 interfaces under root: network devices of ARPHRD_AX25 type (3).

type KernelState

type KernelState int

KernelState says whether the running kernel can do AX.25.

const (
	KernelMissing   KernelState = iota // the kernel has no AX.25 module (recent kernels dropped it)
	KernelAvailable                    // there is a module, not loaded yet
	KernelLoaded                       // loaded or built in
)

func Kernel

func Kernel(root string) (KernelState, string)

Kernel checks the kernel under root ("/" on a real system; tests pass a fake tree).

func (KernelState) String

func (k KernelState) String() string

type Port

type Port struct {
	Name   string // the name the tools use (axcall PORT ...)
	Call   string // the callsign of this port, usually with an SSID
	Speed  int    // bits per second on the air
	Paclen int    // largest packet
	Window int    // frames in flight
	Desc   string
}

Port is one line of /etc/ax25/axports: a name for a radio port, and how to use it.

func DefaultPort

func DefaultPort(call string) Port

DefaultPort returns the port hamstack proposes for a station: one name, the station's callsign, and settings that suit Direwolf at 1200 baud.

func ParsePorts

func ParsePorts(text string) []Port

ParsePorts reads an axports file; comments and blank lines are skipped.

func (Port) Line

func (p Port) Line() string

Line is the axports line for p.

Jump to

Keyboard shortcuts

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