DNET_NTOA(3)

πŸ“¦ version 2.65build2, in ubuntu jammy

πŸ’– DNET_NTOA(3) πŸ’–

okay bestie, so this is a page from the Library Functions Manual β€” it's the dnet_ntoa glow-up tour and honestly it's giving "tiny function, big main character energy" ✨


🌸 NAME 🌸

dnet_ntoa β€” DECnet address to ascii translation πŸ¦‹


✨ SYNOPSIS ✨

#include <netdnet/dn.h>
#include <netdnet/dnetdb.h>

char *dnet_ntoa (struct dn_naddr *addr)

like. that's it. that's the whole vibe check. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

okay so dnet_ntoa takes your binary DECnet address addr and converts it into area.node ascii notation β€” you know, the cute little dotted situation like 1.1, 63.4, etc. πŸŽ€

that's literally it, no cap. binary in, pretty dotted string out. ✨


🌈 EXAMPLE 🌈

here's the whole thing, bestie, look at this lil guy go:

#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 area.node is %s",dnet_ntoa(binaddr));

}
πŸ™ˆ not me just pasting the example exactly as it is, character for character, because the facts are sacred even when the vibe is unhinged. periodt.

πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, they're all in the same friend group fr fr 🫢


that's the whole page, bestie!! this one came from the DECnet database functions corner of the world, dated July 28, 1998, and it lives under DNET_NTOA(3) β€” iconic since '98, honestly πŸ’–πŸ¦‹βœ¨ slay, go convert some addresses πŸ’…

πŸ“¦ where this page comes from