Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getnodeadd(3) [debian man page]

GETNODEADD(3)						     Library Functions Manual						     GETNODEADD(3)

NAME
getnodeadd - DECnet address of executor node SYNOPSIS
#include <netdnet/dn.h> #include <netdnet/dnetdb.h> struct dn_naddr *getnodeadd (void) DESCRIPTION
getnodeadd searches the decnet hosts file for the executor node and returns the DECnet address in the dn_naddr 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; if ( (binaddr=getnodeadd()) == NULL) printf("Error, cannot find executor node address"); else printf("getnodeadd successfully got executor node address"); } SEE ALSO
dnet_htoa(3), dnet_ntoa(3), dnet_conn(3), dnet_addr(3), getnodebyname(3), getnodebyaddr(3), setnodeent(3) DECnet database functions July 28, 1998 GETNODEADD(3)

Check Out this Related Man Page

DNET_ADDR(3)						     Library Functions Manual						      DNET_ADDR(3)

NAME
dnet_addr - DECnet nodename to address translation SYNOPSIS
#include <netdnet/dn.h> #include <netdnet/dnetdb.h> struct dn_naddr *dnet_addr (char *nodename) DESCRIPTION
dnet_addr search the decnet hosts file for nodename and returns the DECnet address in the dn_naddr 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 sockaddr_dn sockaddr; int sockfd; if ( (binaddr=dnet_addr("mv3100")) == NULL) { printf("No entry in /etc/decnet.conf for mv3100 "); exit(0); } if ((sockfd=socket(AF_DECnet,SOCK_SEQPACKET,DNPROTO_NSP)) == -1) { perror("socket"); exit(-1); } sockaddr.sdn_family = AF_DECnet; sockaddr.sdn_flags = 0x00; sockaddr.sdn_objnum = 0x19; /* MIRROR */ sockaddr.sdn_objnamel = 0x00; memcpy(sockaddr.sdn_add.a_addr, binaddr->a_addr,binaddr->a_len); if (connect(sockfd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) < 0) { perror("connect"); exit(-1); } close(sockfd); } SEE ALSO
dnet_htoa(3), dnet_ntoa(3), dnet_conn(3), getnodeadd(3), getnodebyname(3), getnodebyaddr(3), setnodeent(3) DECnet database functions July 28, 1998 DNET_ADDR(3)
Man Page