getservprotobyname(3z)
π NAME π
getservprotobyname, getservprotobyport β get servprotoice entry π«Ά
πΈ SYNOPSIS πΈ
#include <net/resolv.h>
u8_t getservprotobyname(char *name);
u8_t getservprotobyport(tcpport_t port);
β¨ DESCRIPTION β¨
okay bestie so these two are the little matchmakers that hook you up with the right protocol for a service π
getservprotobyname()β hands you back the appropriate protocol for the service whose name isname. And if that service is justβ¦ not a thing anyone knows about? ThenNULLcomes back. ghosted, literally πgetservprotobyport()β same energy but you're coming in through the door with the standard port numberport, and it gives you the appropriate protocol for that service. Service unknown? Yeah.NULLagain. π
π RETURN VALUE π
here's the tea: if a service is known to more than one protocol, then the one that gets returned is the most frequently used one. it's giving main character protocol, periodt π
π¦ NOTES π¦
these functions use a lookup table that's compiled straight into the ZSock kernel β and ngl, it's not likely that method will change in the near future. it's iconic like that, no cap β
π AUTHOR π
Dominic Morris <dom@jb.man.ac.uk>
and that's a wrap, bestie π this whole thing came to you from the z88dk Programmer's Manual, dated 18 February 2000 β yes she's vintage, yes she still slays ππ§
π¦ 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