getnetbyname(3z)
π getnetbyname β z88dk Programmer's Manual π
okay bestie, welcome to the z88dk manual, this one's all about network entries and honestly it's short and sweet, we love a low-effort slay β¨
πΈ NAME πΈ
getnetbyname, getnetbynumber β get network entry
like, that's the whole job. you want a network entry? girl, these two got you π«Ά
β¨ SYNOPSIS β¨
#include <net/resolv.h>
int getnetbyname(char *name);
char *getnetbynumber(int network, char * buf);
π¦ DESCRIPTION π¦
okay so first up, getnetbyname() β you hand it a network name, and it hands you back the standard number for that network. cute, right? but bestie, listen: if no network is known, you get NULL back. not a number, not a sad little zero, just NULL. so check it. π
then there's getnetbynumber() β this one takes network and copies the matching network into buf, and yes it also returns buf because it's generous like that π
. but plot twist: if no network is known, then network itself gets returned, in ASCII form. so like, you asked for a thing and you got the number you typed back as text. it's giving "we don't know her" energy fr fr.
π RETURN VALUE π
detailed above, bestie. scroll up, it's all there, no cap π
π NOTES π
these functions use a lookup table compiled into the ZSock kernel, and ngl it is not likely that method will change in the near future. so like, the vibe is stable, iykyk π§
π AUTHOR π
Dominic Morris <dom@jb.man.ac.uk>
and that's the whole page, periodt π go forth and resolve those networks bestie, you're literally the main character of this codebase βπ¦π
z88dk Programmer's Manual, dated 18 February 2000 β yeah it's vintage, and vintage is iconic, we don't question it πΈ
π¦ where this page comes from
- fedora 43: z88dk 1.10.1-33.20150709cvs.fc43 Β· ClArtistic
- fedora 44: z88dk 1.10.1-33.20150709cvs.fc43 Β· ClArtistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms