INET(3)
π INET β the AX25 address glow-up zone π
okay bestie, listen. this is INET(3), straight out of the Linux Programmer's Manual, and it's literally the whole toolkit for messing with AX25 addresses. it's giving "ham radio but make it fashion." no cap. π
β¨ NAME β¨
ax25_aton, ax25_aton_entry, ax25_aton_arglist, ax25_ntoa, ax25_cmp, ax25_validate β the AX25 Address manipulation routines. that's the whole squad. π«Ά
πΈ SYNOPSIS πΈ
#include <netax25/ax25.h>
int ax25_aton(const char *cp, struct full_sockaddr_ax25 *fsap);
int ax25_aton_arglist(const char **cp, struct full_sockaddr_ax25 *fsap);
int ax25_aton_entry(const char *cp, char *axp);
char *ax25_ntoa(ax25_address *axp);
int ax25_cmp(ax25_address *ax1, ax25_address *ax2);
int ax25_validate(char *axp);
char *ax25_config_file(const char *filename);
π¦ DESCRIPTION π¦
so here's the tea on every single one of them, one by one, no skips:
ax25_aton()β takes the ASCII stringcpin the formatcallsign [[V|VIA]callsign...]and stores it infsapin network format. like, translating from human-speak to computer-speak. iconic behaviour tbh. β¨ax25_aton_entry()β takes the ASCII string of a callsigncpand stores it in network format inaxp. just one callsign, one entry, no drama. πax25_aton_arglist()β takes aNULLterminated array of stringscpand stores it infsapin network format. it's the arglist version, she does the same thing but with a whole little array. main character energy.ax25_ntoa()β takes a network format addressaxpand returns the ASCII representation. β οΈ importantβ οΈ the string comes back in a statically allocated buffer, which means subsequent calls will overwrite it. so like, copy it if you need it to stick around, bestie. don't get caught lacking. πax25_cmp()β compares the two ax25 addresses,ax1andax2, that are in network format, and figures out whether they're identical, whether they differ only by their SSIDs, or whether they're just plain different. a whole vibe check, basically. πax25_validate()β checks to see if the addressaxpin network format is a correctly formatted address. yes queen, validation. we love to see it. π
π RETURN VALUE π
okay so what do these divas hand back to you:
ax25_aton()andax25_aton_arglist()return-1if an error occurs, otherwise the length of the returned structure. error =-1, bestie, watch for it.ax25_aton_entry()returns-1if an error occurs, otherwise zero. yep,0means slay,-1means π.ax25_cmp()returns0if the two addresses are identical,1if they are different, or2if only the SSIDs are different. three whole moods. βax25_validate()returnsTRUEif the callsign is valid orFALSEif it is not. simple as that, fr fr. π
π§ SEE ALSO π§
go read those too, iykyk. π
and that's the whole page, bestie!! π this was the INET(3) page from the Linux crew, dated 2008-Feb-04, and honestly? it ate. periodt. π
β¨π¦π
π¦ where this page comes from
- alpine 3.24: libax25-doc 1.2.2-r0 Β· LGPL-2.1-or-later
- fedora 43: libax25 1.1.1-14.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: libax25 1.1.1-14.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: libax25 1.1.1-15.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: libax25 1.1.1-15.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: libax25 0.0.12-rc5
- nixpkgs unstable: libax25 0.0.12-rc5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms