2 * Copyright (C) 2005 by Latchesar Ionkov <lucho@ionkov.net>
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * LATCHESAR IONKOV AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
24 extern Npuserpool
*np_default_users
;
27 Npfcall
*np_version(Npreq
*req
, Npfcall
*tc
);
28 Npfcall
*np_auth(Npreq
*req
, Npfcall
*tc
);
29 Npfcall
*np_attach(Npreq
*req
, Npfcall
*tc
);
30 Npfcall
*np_flush(Npreq
*req
, Npfcall
*tc
);
31 Npfcall
*np_walk(Npreq
*req
, Npfcall
*tc
);
32 Npfcall
*np_open(Npreq
*req
, Npfcall
*tc
);
33 Npfcall
*np_create(Npreq
*req
, Npfcall
*tc
);
34 Npfcall
*np_read(Npreq
*req
, Npfcall
*tc
);
35 Npfcall
*np_write(Npreq
*req
, Npfcall
*tc
);
36 Npfcall
*np_clunk(Npreq
*req
, Npfcall
*tc
);
37 Npfcall
*np_remove(Npreq
*req
, Npfcall
*tc
);
38 Npfcall
*np_stat(Npreq
*req
, Npfcall
*tc
);
39 Npfcall
*np_wstat(Npreq
*req
, Npfcall
*tc
);
42 int np_printstat(FILE *f
, Npstat
*st
, int dotu
);
43 int np_dump(FILE *f
, u8
*data
, int datalen
);
46 void np_srv_add_req(Npsrv
*srv
, Npreq
*req
);
47 void np_srv_remove_req(Npsrv
*srv
, Npreq
*req
);
48 void np_srv_add_workreq(Npsrv
*srv
, Npreq
*req
);
49 void np_srv_remove_workreq(Npsrv
*srv
, Npreq
*req
);
50 Npreq
*np_req_alloc(Npconn
*conn
, Npfcall
*tc
);
51 Npreq
*np_req_ref(Npreq
*);
52 void np_req_unref(Npreq
*);
53 void np_req_free(Npreq
*req
);
54 void np_srv_process_fcall(Npconn
*conn
, Npfcall
*tc
);
55 int sreuid(int a
, int b
);
56 int sregid(int a
, int b
);