NETROM(4)
β¨ NETROM(4) β the AF_NETROM glow-up β¨
okay so bestie, welcome to the Linux Programmer's Manual corner where we're talking about AF_NETROM, aka the NET/ROM amateur packet radio protocol family. it's giving "niche but iconic" and i'm obsessed. π
NAME
AF_NETROM β the NET/ROM amateur packet radio protocol family. yes, that's the whole name, and yes, it ate. π
DESCRIPTION
NET/ROM is a protocol used extensively by radio amateurs. the Linux NET/ROM protocol family lets you access these protocols via the standard networking socket metaphor β so if you know sockets, you're already lowkey home. π β¨
the NET/ROM protocol layer only supports connected mode. periodt. but plot twist: IP traffic may be stacked on top of NET/ROM frames using a non-standard extension to the NET/ROM protocol. no cap, that's a thing. π
the only mode of operation is connected mode, which is the mode used for a socket of type SOCK_SEQPACKET (stream sockets are not available in NET/ROM β rip to that vibe π). this means you (yes, you, the user) have to ensure that:
- output data is suitably packetised π¦
- input data is read a packet at a time into a buffer of suitable size
basically, it's on you to keep things tidy, bestie. main character responsibility fr fr. π«Ά
addresses, but make it cute
NET/ROM addresses consist of 6 ascii characters and a number called the SSID. these are encoded into a sockaddr_ax25 structure which is provided to the relevant system calls. iykyk. π¦
the unusual properties era
NET/ROM has some unusual properties. notably, in a multi-user system an AX.25 address is often associated with a user, and some users may not have such an association. a set of ioctl calls are provided to manage an association table. so yeah, it's giving "extra admin but we handle it". π
socket options for SOL_NETROM
NET/ROM supports the following socket options for SOL_NETROM. let's go through them one by one because we're thorough like that β¨:
NETROM_T1β the T1 timer, measured in 1/10ths of a second β±οΈNETROM_T2β the T2 timer, also in 1/10ths of a second β±οΈNETROM_N2β the retry counter, and yes it's configurable too ποΈ
β οΈ important caveat bestie: there is no 'infinite retry' option supported however. so don't come looking for it, it's not invited to the party. π
it's also possible for an application to request that the NET/ROM layer return the NET/ROM header as well as the application data β this is done via the NETROM_HDRINCL socket option. iconic behavior honestly. π
SEE ALSO
like, go read these too, they're all part of the lore π:
call(1)socket(2)setsockopt(2)getsockopt(2)nrbroadcast(5)nrports(5)netromd(8)noderest(8)nodesave(8)nrparms(8)
AUTHOR
shoutout to Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk> for writing this β absolute legend behavior, we stan π«‘π
and that's the tea, bestie π this page is from the Linux manual, version dated 15 July 2011, and it's giving vintage but still valid. now go forth and packet-radio responsibly π β¨π
π¦ where this page comes from
- alpine 3.24: ax25-tools-doc 1.1.0-r0 Β· GPL-2.0-or-later
- debian bookworm: ax25-tools 0.0.10-rc5+git20190411+3595f87-6
- debian trixie: ax25-tools 0.0.10-rc5+git20230513+d3e6d4f-3 Β· GPL-2.0-only
- nixos 26.05: ax25-tools 0.0.10-rc5
- ubuntu jammy: ax25-tools 0.0.10-rc5+git20190411+3595f87-5
- ubuntu noble: ax25-tools 0.0.10-rc5+git20230513+d3e6d4f-1build2 Β· GPL-2.0-only
- ubuntu questing: ax25-tools 0.0.10-rc5+git20230513+d3e6d4f-3
- ubuntu resolute: ax25-tools 0.0.10-rc5+git20230513+d3e6d4f-3build1 Β· GPL-2.0-only
- ubuntu stonking: ax25-tools 0.0.10-rc5+git20230513+d3e6d4f-3build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms