]> arthur.barton.de Git - netatalk.git/blob - include/atalk/server_child.h
remove pre ansi declarations
[netatalk.git] / include / atalk / server_child.h
1 /*
2  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
3  * All rights reserved.
4  */
5
6 #ifndef _ATALK_SERVER_CHILD_H
7 #define _ATALK_SERVER_CHILD_H 1
8
9 #include <sys/cdefs.h>
10 #include <sys/types.h>
11 #include <netatalk/endian.h>
12
13 /* useful stuff for child processes. most of this is hidden in 
14  * server_child.c to ease changes in implementation */
15
16 #define CHILD_NFORKS   2
17 #define CHILD_ASPFORK  0
18 #define CHILD_PAPFORK  0
19 #define CHILD_DSIFORK  1
20
21 typedef struct server_child {
22   void *fork;
23   int count, nsessions, nforks;
24 } server_child;
25
26 /* server_child.c */
27 extern server_child *server_child_alloc (const int, const int);
28 extern int server_child_add (server_child *, const int, const pid_t);
29 extern int server_child_remove (server_child *, const int, const pid_t);
30 extern void server_child_free (server_child *);
31
32 extern void server_child_kill (server_child *, const int, const int);
33 extern void server_child_kill_one (server_child *children, const int forkid, const pid_t, const uid_t);
34 extern void server_child_kill_one_by_id (server_child *children, const int forkid, const pid_t pid, const uid_t,
35                                                const u_int32_t len, char *id, u_int32_t boottime);
36
37 extern void server_child_setup (server_child *, const int, void (*)(const pid_t));
38 extern void server_child_handler (server_child *);
39 extern void server_reset_signal (void);
40
41 #endif