1DPNS_READDIR(3)                  DPNS      Library      Functions
2DPNS_READDIR(3)
3
4
5
6[1mNAME[0m
7       dpns_readdir  ‐  read  DPNS  directory  opened  by  [1mdp‐
8ns_opendir [22min the name
9       server
10
11[1mSYNOPSIS[0m
12       [1m#include <sys/types.h>[0m
13       [1m#include <dirent.h>[0m
14       [1m#include "dpns_api.h"[0m
15
16       [1mstruct       dirent       *dpns_readdir       (dpns_DIR
17*[4m[22mdirp[24m[1m)[0m
18
19[1mDESCRIPTION[0m
20       [1mdpns_readdir [22mreads the DPNS  directory  opened   by
21[1mdpns_opendir  [22min  the
22       name   server.  This routine returns a pointer to a struc‐
23ture containing
24       the current directory entry.  [1mdpns_readdir [22mcaches a
25variable number  of
26       such  entries, depending on the filename size, to minimize
27the number of
28       requests to the name server.
29
30       [4mdirp[24m   specifies  the  pointer  value  returned  by
31[1mdpns_opendir[22m.
32
33[1mNOTE[0m
34       Only  the  fields d_name, d_reclen and on  some  platforms
35d_namlen  are
36       filled.
37
38[1mRETURN VALUE[0m
39       This  routine  returns  a pointer to a structure  contain‐
40ing the current
41       directory entry if the operation was successful or NULL if
42the  end  of
43       the  directory  was reached or if  the  operation  failed.
44When the end of
45       the  directory  is  encountered, serrno is not changed. If
46the  operation
47       failed, [1mserrno [22mis set appropriately.
48
49       As dpns_readdir returns a null pointer both at the end  of
50the directory
51       and  on error, an application wishing  to  check  for  er‐
52ror  situations
53       should  set  [1mserrno [22mto 0, then  call  dpns_readdir,
54then check [1mserrno [22mand
55       if it is non‐zero, assume an error has occurred.
56
57[1mERRORS[0m
58       [1mEBADF         [22mFile  descriptor  in DIR structure is
59invalid.
60
61       [1mEFAULT       [4m[22mdirp[24m is a NULL pointer.
62
63       [1mSECOMERR     [22mCommunication error.
64
65       [1mENSNACT      [22mName server is not running or is being
66shutdown.
67
68[1mSEE ALSO[0m
69       [1mdpns_closedir(3)[22m,   [1mdpns_opendir(3)[22m,  [1mdp‐
70ns_rewinddir(3)[22m, [1mdirent[0m
71
72[1mAUTHOR[0m
73       [1mLCG Grid Deployment [22mTeam
74
75
76
77DPNS                                                       $Date$
78DPNS_READDIR(3)
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum