Poster of Linux kernelThe best gift for a Linux geek
DNET_GETNODE

DNET_GETNODE

Section: C Library Functions (3) Updated: April 3, 1999
Local index Up
 

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\n", 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)


 

Index

NAME
SYNOPSIS
DESCRIPTION
EXAMPLE
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 21:45:09 GMT, April 16, 2011