NETROM(4)

πŸ“¦
version 1.1.0 Β· 2 versions
  • 1.1.0 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.4 Β· fedora 43, fedora 44
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 πŸ“š:


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 πŸ’…βœ¨πŸŽ€