Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dnet_conn(3) [debian man page]

DNET_CONN(3)						     Library Functions Manual						      DNET_CONN(3)

NAME
dnet_conn - Connect to remote DECnet object by name. SYNOPSIS
#include <netdnet/dn.h> #include <netdnet/dnetdb.h> int dnet_conn (char *hostname, char *objname, int type, int,int,int,int) DESCRIPTION
dnet_conn connects to the remote object objname in host hostname using the protocol denoted by type usually DNPROTO_NSP. If successful, returns an integer file descriptor, else return errno. EXAMPLE
#include <netdnet/dn.h> #include <netdnet/dnetdb.h> #include <sys/socket.h> main(void) { int sockfd; sockfd=dnet_conn("mv3100","X$X0",DNPROTO_NSP,0,0,0,0); if (sockfd < 0) printf ("Error connecting to remote object X$X0 on node mv3100"); else { printf ("Succesfully connected to remote object X$X0 on node mv3100"); close (sockfd); } } SEE ALSO
dnet_addr(3), dnet_htoa(3), dnet_ntoa(3), getnodeadd(3), getnodebyname(3), getnodebyaddr(3), setnodeent(3) DECnet database functions July 28, 1998 DNET_CONN(3)

Check Out this Related Man Page

DNET_GETNODE(3) 					     Library Functions Manual						   DNET_GETNODE(3)

NAME
dnet_getnode, dnet_nextnode, dnet_endnode - Get nodes from DECnet database SYNOPSIS
#include <netdnet/dn.h> #include <netdnet/dnetdb.h> void *dnet_getnode (void) char *dnet_nextnode (void *) void dnet_endnode (void *) DESCRIPTION
dnet_getnode() Starts the search of the DECnet nodes database (/etc/decnet.conf). It returns an opaque pointer which is passed to the other two functions. dnet_nextnode() returns the next node name in the list. The pointer is private to the library and will be overwritten at the next dnet_nextnode call. dnet_endnode() ends the search. It must be called when you have finished with this group of functions or a memory leak will result. EXAMPLE
#include <netdnet/dn.h> #include <netdnet/dnetdb.h> #include <sys/socket.h> main(void) { void *nodelist; char *nodename; nodelist = dnet_getnode(); nodename = dnet_nextnode(nodelist); while(nodename) { printf("Found node %s ", nodename); nodename = dnet_nextnode(nodelist); } dnet_endnode(nodelist); } SEE ALSO
dnet_addr(3), dnet_ntoa(3), dnet_conn(3), getnodeadd(3), getnodebyname(3), getnodebyaddr(3), setnodeent(3) DECnet database functions April 3, 1999 DNET_GETNODE(3)
Man Page