1DPNS_READDIR(3)             DPNS Library Functions             DPNS_READDIR(3)
2
3
4

NAME

6       dpns_readdir  -  read DPNS directory opened by dpns_opendir in the name
7       server
8

SYNOPSIS

10       #include <sys/types.h>
11       #include <dirent.h>
12       #include "dpns_api.h"
13
14       struct dirent *dpns_readdir (dpns_DIR *dirp)
15

DESCRIPTION

17       dpns_readdir reads the DPNS directory opened  by  dpns_opendir  in  the
18       name  server.  This routine returns a pointer to a structure containing
19       the current directory entry.  dpns_readdir caches a variable number  of
20       such entries, depending on the filename size, to minimize the number of
21       requests to the name server.
22
23       dirp   specifies the pointer value returned by dpns_opendir.
24

NOTE

26       Only the fields d_name, d_reclen and on  some  platforms  d_namlen  are
27       filled.
28

RETURN VALUE

30       This  routine  returns  a pointer to a structure containing the current
31       directory entry if the operation was successful or NULL if the  end  of
32       the  directory  was reached or if the operation failed. When the end of
33       the directory is encountered, serrno is not changed. If  the  operation
34       failed, serrno is set appropriately.
35
36       As dpns_readdir returns a null pointer both at the end of the directory
37       and on error, an application wishing  to  check  for  error  situations
38       should  set  serrno to 0, then call dpns_readdir, then check serrno and
39       if it is non-zero, assume an error has occurred.
40

ERRORS

42       EBADF        File descriptor in DIR structure is invalid.
43
44       EFAULT       dirp is a NULL pointer.
45
46       SENOSSERV    Service unknown.
47
48       SECOMERR     Communication error.
49
50       ENSNACT      Name server is not running or is being shutdown.
51

SEE ALSO

53       dpns_closedir(3), dpns_opendir(3), dpns_rewinddir(3), dirent
54

AUTHOR

56       LCG Grid Deployment Team
57
58
59
60DPNS         $Date: 2010-12-13 08:41:11 +0100 (Mon, 13 Dec 2010)DP$NS_READDIR(3)
Impressum