DNET_HTOA(3)
π DNET_HTOA β ok bestie, let's talk π
soooo this is dnet_htoa(3), a lil library function from the Library Functions Manual, and honestly? it's giving translator energy. it takes a DECnet address and goes "oh hey, that's a node, and its name isβ¦" π¦
β¨ NAME β¨
dnet_htoa β DECnet address to host name translation. that's it, that's the job, no cap π
β¨ SYNOPSIS β¨
#include <netdnet/dn.h>
#include <netdnet/dnetdb.h>
char *dnet_htoa (struct dn_naddr *addr)
β¨ DESCRIPTION β¨
ok so dnet_htoa goes and searches the decnet hosts file for addr, and then hands you back the DECnet node name. iconic behaviour fr fr πΈ
and if it doesn't find an entry? no drama, no crash β it just returns the ascii DECnet address in the format area.node (like 1.1, 1.2, etc). lowkey a fallback queen π
β¨ EXAMPLE β¨
here's the whole thing in action, verbatim, don't touch it π
#include <netdnet/dn.h>
#include <netdnet/dnetdb.h>
#include <sys/socket.h>
main(void)
{
struct dn_naddr binaddr;
binaddr.a_len = 2;
binaddr.a_addr[0] = 0x02;
binaddr.a_addr[1] = 0x04;
printf ("DECnet node name is %s",dnet_htoa(binaddr));
}
like. she's setting up a struct dn_naddr, a_len is 2, a_addr[0] is 0x02, a_addr[1] is 0x04, and then boom β printf prints the node name. main character energy tbh β
β¨ SEE ALSO β¨
go read these next, they're all in the same friend group π«Ά
dnet_addr(3)dnet_ntoa(3)dnet_conn(3)getnodeadd(3)getnodebyname(3)getnodebyaddr(3)setnodeent(3)
and that's the whole page bestie!! this one's from the DECnet database functions era, version dated July 28, 1998 β yes she's vintage, yes she still slays πβ¨ππ¦πΈπ ππ
π¦ where this page comes from
- ubuntu jammy: libdnet-dev 2.65build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms