source: TI05-delivery/trunk/doc/doxygen/html/ndg_8c.html @ 1198

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/trunk/doc/doxygen/html/ndg_8c.html@1198
Revision 1198, 13.8 KB checked in by spascoe, 13 years ago (diff)

Updated epydoc documentation.

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>NDG Delivery Service: ndg.c File Reference</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5</head><body>
6<!-- Generated by Doxygen 1.3.5 -->
7<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="globals.html">Globals</a></div>
8<h1>ndg.c File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
9<tr><td></td></tr>
10<tr><td colspan=2><br><h2>Functions</h2></td></tr>
11<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ndg_8c.html#a0">bbftpd_private_auth</a> (char *logmessage)</td></tr>
12
13<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Routine to do private authentication.  <a href="#a0"></a><br><br></td></tr>
14<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ndg_8c.html#a1">bbftpd_private_authz_control</a> (int msgcode, int transferoption, char *path, char *logmessage)</td></tr>
15
16<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Routine to authorise bbftp control commands.  <a href="#a1"></a><br><br></td></tr>
17<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ndg_8c.html#a2">bbftpd_private_authz_retr</a> (char *path, char *logmessage)</td></tr>
18
19<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Routine to authorise file retrieve requests.  <a href="#a2"></a><br><br></td></tr>
20<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ndg_8c.html#a3">bbftpd_private_authz_store</a> (char *path, char *logmessage)</td></tr>
21
22<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Routine to authorise file store requests.  <a href="#a3"></a><br><br></td></tr>
23<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ndg_8c.html#a4">ndg_message_send</a> (char *buffer, int length, char *logmessage)</td></tr>
24
25<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send a message of variable length to the client.  <a href="#a4"></a><br><br></td></tr>
26<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="ndg_8c.html#a5">ndg_message_recv</a> (char **buffer, int *length, char *logmessage)</td></tr>
27
28<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Receive a message of variable length from the client.  <a href="#a5"></a><br><br></td></tr>
29</table>
30<hr><h2>Function Documentation</h2>
31<a class="anchor" name="a0" doxytag="ndg.c::bbftpd_private_auth" ></a><p>
32<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
33  <tr>
34    <td class="mdRow">
35      <table cellpadding="0" cellspacing="0" border="0">
36        <tr>
37          <td class="md" nowrap valign="top"> int bbftpd_private_auth </td>
38          <td class="md" valign="top">(&nbsp;</td>
39          <td class="md" nowrap valign="top">char *&nbsp;</td>
40          <td class="mdname1" valign="top" nowrap> <em>logmessage</em>          </td>
41          <td class="md" valign="top">&nbsp;)&nbsp;</td>
42          <td class="md" nowrap></td>
43        </tr>
44
45      </table>
46    </td>
47  </tr>
48</table>
49<table cellspacing=5 cellpadding=0 border=0>
50  <tr>
51    <td>
52      &nbsp;
53    </td>
54    <td>
55
56<p>
57Routine to do private authentication.
58<p>
59This function is the main entry point from bbftpd into the private authentication system. See <code>bbftpd_private_user.c</code> for full details on the private authentication interface.<p>
60<dl compact><dt><b>Parameters:</b></dt><dd>
61  <table border="0" cellspacing="2" cellpadding="0">
62    <tr><td valign=top><em>logmessage</em>&nbsp;</td><td>a pointer to a buffer of length <code>NDG_MAX_LOGMESSAGE</code> for storing an error message when returning -1. </td></tr>
63  </table>
64</dl>
65<dl compact><dt><b>Returns:</b></dt><dd>0 on success or -1 on failure. </dd></dl>
66    </td>
67  </tr>
68</table>
69<a class="anchor" name="a1" doxytag="ndg.c::bbftpd_private_authz_control" ></a><p>
70<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
71  <tr>
72    <td class="mdRow">
73      <table cellpadding="0" cellspacing="0" border="0">
74        <tr>
75          <td class="md" nowrap valign="top"> int bbftpd_private_authz_control </td>
76          <td class="md" valign="top">(&nbsp;</td>
77          <td class="md" nowrap valign="top">int&nbsp;</td>
78          <td class="mdname" nowrap> <em>msgcode</em>, </td>
79        </tr>
80        <tr>
81          <td></td>
82          <td></td>
83          <td class="md" nowrap>int&nbsp;</td>
84          <td class="mdname" nowrap> <em>transferoption</em>, </td>
85        </tr>
86        <tr>
87          <td></td>
88          <td></td>
89          <td class="md" nowrap>char *&nbsp;</td>
90          <td class="mdname" nowrap> <em>path</em>, </td>
91        </tr>
92        <tr>
93          <td></td>
94          <td></td>
95          <td class="md" nowrap>char *&nbsp;</td>
96          <td class="mdname" nowrap> <em>logmessage</em></td>
97        </tr>
98        <tr>
99          <td></td>
100          <td class="md">)&nbsp;</td>
101          <td class="md" colspan="2"></td>
102        </tr>
103
104      </table>
105    </td>
106  </tr>
107</table>
108<table cellspacing=5 cellpadding=0 border=0>
109  <tr>
110    <td>
111      &nbsp;
112    </td>
113    <td>
114
115<p>
116Routine to authorise bbftp control commands.
117<p>
118Commands that require authorisation but do not involve sending or retrieving a file are authorised by this function. The argument <em>msgcode</em> will be one of the following constants defined in <code>structures.h</code> :<p>
119<ul>
120<li><code>MSG_CHDIR_V2</code> : a chdir request </li>
121<li><code>MSG_LIST_V2</code> : a ls/dir request </li>
122<li><code>MSG_MKDIR_V2</code> : a mkdir request </li>
123<li><code>MSG_RM</code> : a rm request </li>
124<li><code>MSG_STAT</code> : a stat request </li>
125<li><code>MSG_DF</code> : a statfs request</li>
126</ul>
127Each command is being applied to the file pointed to by <em>path</em>. Some commands may be affected by the value of <em>transferoption</em>.<p>
128<dl compact><dt><b>Parameters:</b></dt><dd>
129  <table border="0" cellspacing="2" cellpadding="0">
130    <tr><td valign=top><em>msgcode</em>&nbsp;</td><td>the message code from struct message. </td></tr>
131    <tr><td valign=top><em>transferoption</em>&nbsp;</td><td><code>TROPT_*</code> options. </td></tr>
132    <tr><td valign=top><em>path</em>&nbsp;</td><td>the path to which the command applies. </td></tr>
133    <tr><td valign=top><em>logmessage</em>&nbsp;</td><td>pointer to a buffer of length <code>NDG_MAX_LOGMESSAGE</code> for storing an error message when returning -1. </td></tr>
134  </table>
135</dl>
136<dl compact><dt><b>Returns:</b></dt><dd>0 on success or -1 on authorisation failure. </dd></dl>
137    </td>
138  </tr>
139</table>
140<a class="anchor" name="a2" doxytag="ndg.c::bbftpd_private_authz_retr" ></a><p>
141<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
142  <tr>
143    <td class="mdRow">
144      <table cellpadding="0" cellspacing="0" border="0">
145        <tr>
146          <td class="md" nowrap valign="top"> int bbftpd_private_authz_retr </td>
147          <td class="md" valign="top">(&nbsp;</td>
148          <td class="md" nowrap valign="top">char *&nbsp;</td>
149          <td class="mdname" nowrap> <em>path</em>, </td>
150        </tr>
151        <tr>
152          <td></td>
153          <td></td>
154          <td class="md" nowrap>char *&nbsp;</td>
155          <td class="mdname" nowrap> <em>logmessage</em></td>
156        </tr>
157        <tr>
158          <td></td>
159          <td class="md">)&nbsp;</td>
160          <td class="md" colspan="2"></td>
161        </tr>
162
163      </table>
164    </td>
165  </tr>
166</table>
167<table cellspacing=5 cellpadding=0 border=0>
168  <tr>
169    <td>
170      &nbsp;
171    </td>
172    <td>
173
174<p>
175Routine to authorise file retrieve requests.
176<p>
177The client is requesting the retrieval of the file <em>path</em>.<p>
178<dl compact><dt><b>Parameters:</b></dt><dd>
179  <table border="0" cellspacing="2" cellpadding="0">
180    <tr><td valign=top><em>path</em>&nbsp;</td><td>the file being retrieved. </td></tr>
181    <tr><td valign=top><em>logmessage</em>&nbsp;</td><td>pointer to a buffer of length <code>NDG_MAX_LOGMESSAGE</code> for storing an error message when returning -1. </td></tr>
182  </table>
183</dl>
184<dl compact><dt><b>Returns:</b></dt><dd>0 on success or -1 on authorisation failure. </dd></dl>
185    </td>
186  </tr>
187</table>
188<a class="anchor" name="a3" doxytag="ndg.c::bbftpd_private_authz_store" ></a><p>
189<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
190  <tr>
191    <td class="mdRow">
192      <table cellpadding="0" cellspacing="0" border="0">
193        <tr>
194          <td class="md" nowrap valign="top"> int bbftpd_private_authz_store </td>
195          <td class="md" valign="top">(&nbsp;</td>
196          <td class="md" nowrap valign="top">char *&nbsp;</td>
197          <td class="mdname" nowrap> <em>path</em>, </td>
198        </tr>
199        <tr>
200          <td></td>
201          <td></td>
202          <td class="md" nowrap>char *&nbsp;</td>
203          <td class="mdname" nowrap> <em>logmessage</em></td>
204        </tr>
205        <tr>
206          <td></td>
207          <td class="md">)&nbsp;</td>
208          <td class="md" colspan="2"></td>
209        </tr>
210
211      </table>
212    </td>
213  </tr>
214</table>
215<table cellspacing=5 cellpadding=0 border=0>
216  <tr>
217    <td>
218      &nbsp;
219    </td>
220    <td>
221
222<p>
223Routine to authorise file store requests.
224<p>
225The client is requesting the storage of a file at location <em>path</em>.<p>
226<dl compact><dt><b>Parameters:</b></dt><dd>
227  <table border="0" cellspacing="2" cellpadding="0">
228    <tr><td valign=top><em>path</em>&nbsp;</td><td>the file being stored. </td></tr>
229    <tr><td valign=top><em>logmessage</em>&nbsp;</td><td>pointer to a buffer of length NDG_MAX_LOGMESSAGE for storing an error message when returning -1. </td></tr>
230  </table>
231</dl>
232<dl compact><dt><b>Returns:</b></dt><dd>0 on success or -1 on authorisation failure. </dd></dl>
233    </td>
234  </tr>
235</table>
236<a class="anchor" name="a5" doxytag="ndg.c::ndg_message_recv" ></a><p>
237<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
238  <tr>
239    <td class="mdRow">
240      <table cellpadding="0" cellspacing="0" border="0">
241        <tr>
242          <td class="md" nowrap valign="top"> int ndg_message_recv </td>
243          <td class="md" valign="top">(&nbsp;</td>
244          <td class="md" nowrap valign="top">char **&nbsp;</td>
245          <td class="mdname" nowrap> <em>buffer</em>, </td>
246        </tr>
247        <tr>
248          <td></td>
249          <td></td>
250          <td class="md" nowrap>int *&nbsp;</td>
251          <td class="mdname" nowrap> <em>length</em>, </td>
252        </tr>
253        <tr>
254          <td></td>
255          <td></td>
256          <td class="md" nowrap>char *&nbsp;</td>
257          <td class="mdname" nowrap> <em>logmessage</em></td>
258        </tr>
259        <tr>
260          <td></td>
261          <td class="md">)&nbsp;</td>
262          <td class="md" colspan="2"></td>
263        </tr>
264
265      </table>
266    </td>
267  </tr>
268</table>
269<table cellspacing=5 cellpadding=0 border=0>
270  <tr>
271    <td>
272      &nbsp;
273    </td>
274    <td>
275
276<p>
277Receive a message of variable length from the client.
278<p>
279The message length is sent in a separate header.<p>
280<dl compact><dt><b>Parameters:</b></dt><dd>
281  <table border="0" cellspacing="2" cellpadding="0">
282    <tr><td valign=top><em>buffer</em>&nbsp;</td><td>is set to newly allocated message buffer. </td></tr>
283    <tr><td valign=top><em>length</em>&nbsp;</td><td>is set to the length of the message. </td></tr>
284    <tr><td valign=top><em>logmessage</em>&nbsp;</td><td>is filled with the logmessage on error. </td></tr>
285  </table>
286</dl>
287<dl compact><dt><b>Returns:</b></dt><dd>0 if OK, -1 if error. </dd></dl>
288    </td>
289  </tr>
290</table>
291<a class="anchor" name="a4" doxytag="ndg.c::ndg_message_send" ></a><p>
292<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
293  <tr>
294    <td class="mdRow">
295      <table cellpadding="0" cellspacing="0" border="0">
296        <tr>
297          <td class="md" nowrap valign="top"> int ndg_message_send </td>
298          <td class="md" valign="top">(&nbsp;</td>
299          <td class="md" nowrap valign="top">char *&nbsp;</td>
300          <td class="mdname" nowrap> <em>buffer</em>, </td>
301        </tr>
302        <tr>
303          <td></td>
304          <td></td>
305          <td class="md" nowrap>int&nbsp;</td>
306          <td class="mdname" nowrap> <em>length</em>, </td>
307        </tr>
308        <tr>
309          <td></td>
310          <td></td>
311          <td class="md" nowrap>char *&nbsp;</td>
312          <td class="mdname" nowrap> <em>logmessage</em></td>
313        </tr>
314        <tr>
315          <td></td>
316          <td class="md">)&nbsp;</td>
317          <td class="md" colspan="2"></td>
318        </tr>
319
320      </table>
321    </td>
322  </tr>
323</table>
324<table cellspacing=5 cellpadding=0 border=0>
325  <tr>
326    <td>
327      &nbsp;
328    </td>
329    <td>
330
331<p>
332Send a message of variable length to the client.
333<p>
334This function sends the length of the message in a header thus the client does not need to know what length message to expect.<p>
335<dl compact><dt><b>Parameters:</b></dt><dd>
336  <table border="0" cellspacing="2" cellpadding="0">
337    <tr><td valign=top><em>buffer</em>&nbsp;</td><td>a pointer to the message buffer. </td></tr>
338    <tr><td valign=top><em>length</em>&nbsp;</td><td>the number of bytes to send. </td></tr>
339    <tr><td valign=top><em>logmessage</em>&nbsp;</td><td>is filled with the error message on error. </td></tr>
340  </table>
341</dl>
342<dl compact><dt><b>Returns:</b></dt><dd>0 if OK, -1 if error. </dd></dl>
343    </td>
344  </tr>
345</table>
346<hr size="1"><address style="align: right;"><small>Generated on Thu Jun 15 15:59:15 2006 for NDG Delivery Service by
347<a href="http://www.doxygen.org/index.html">
348<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
349</a>1.3.5 </small></address>
350</body>
351</html>
Note: See TracBrowser for help on using the repository browser.