1DPNS_READDIRX(3) DPNS Library Functions DP‐
2NS_READDIRX(3)
3
4
5
6[1mNAME[0m
7 dpns_readdirx ‐ 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 "dpns_api.h"[0m
14
15 [1mstruct dpns_direnstat *dpns_readdirx (dpns_DIR
16*[4m[22mdirp[24m[1m)[0m
17
18[1mDESCRIPTION[0m
19 [1mdpns_readdirx [22mreads the DPNS directory opened by
20[1mdpns_opendir [22min the
21 name server. This routine returns a pointer to a struc‐
22ture containing
23 the current directory entry including the [1mstat [22min‐
24formation. [1mdpns_read‐[0m
25 [1mdirx [22mcaches a variable number of such entries,
26depending on the file‐
27 name size, to minimize the number of requests to the name
28server.
29
30 [4mdirp[24m specifies the pointer value returned by
31[1mdpns_opendir[22m.
32
33[1mRETURN VALUE[0m
34 This routine returns a pointer to a structure containing
35the current
36 directory entry if the operation was successful or NULL
37if the end of
38 the directory was reached or if the operation failed. When
39the end of
40 the directory is encountered, serrno is not changed. If
41the operation
42 failed, [1mserrno [22mis set appropriately.
43
44 As dpns_readdirx returns a null pointer both at the end of
45the direc‐
46 tory and on error, an application wishing to check for er‐
47ror situations
48 should set [1mserrno [22mto 0, then call dpns_readdirx,
49then check [1mserrno [22mand
50 if it is non‐zero, assume an error has occurred.
51
52[1mERRORS[0m
53 [1mEBADF [22mFile descriptor in DIR structure is
54invalid.
55
56 [1mEFAULT [4m[22mdirp[24m is a NULL pointer.
57
58 [1mSECOMERR [22mCommunication error.
59
60 [1mENSNACT [22mName server is not running or is being
61shutdown.
62
63[1mSEE ALSO[0m
64 [1mdpns_closedir(3)[22m, [1mdpns_opendir(3)[22m, [1mdp‐
65ns_rewinddir(3)[22m, [1mdirent[22m, [1mstat(2)[0m
66
67[1mAUTHOR[0m
68 [1mLCG Grid Deployment [22mTeam
69
70
71
72DPNS $Date$ DP‐
73NS_READDIRX(3)
74
75
76
77
78
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