logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

getnodebyaddr - DECnet node entry retrieval by address

Description

getnodebyaddr searches the decnet hosts file for the DECnet node with address equal to addr of len bytes,
       belonging to protocol family family (PF_DECnet) and returns node information into the nodeent structure.
       If no entry is found, returns NULL

Example

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

       main(void)
       {
           struct dn_naddr          binaddr;
           struct nodeent      *dp;

           binaddr->a_len = 2;
           binaddr->a_addr[0] = 0x02;
           binaddr->a_addr[1] = 0x04;

           if ( (dp=getnodebyaddr(binaddr->a_addr,binaddr->len, PF_DECnet)) == NULL)
               printf("Error, cannot find node entry");
           else
               printf("Node name is %s",dp->n_name);
       }

Name

       getnodebyaddr - DECnet node entry retrieval by address

See Also

dnet_htoa(3), dnet_ntoa(3), dnet_conn(3), dnet_addr(3), getnodebyname(3), getnodeadd(3), setnodeent(3)

DECnet database functions                         July 28, 1998                                 GETNODEBYADDR(3)

Synopsis

#include<netdnet/dn.h>#include<netdnet/dnetdb.h>structnodeent*getnodebyaddr(char*addr,shortlen,constintfamily)

See Also