2 * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
6 #ifndef _ATALK_SERVER_CHILD_H
7 #define _ATALK_SERVER_CHILD_H 1
10 #include <sys/types.h>
11 #include <netatalk/endian.h>
13 /* useful stuff for child processes. most of this is hidden in
14 * server_child.c to ease changes in implementation */
16 #define CHILD_NFORKS 2
17 #define CHILD_ASPFORK 0
18 #define CHILD_PAPFORK 0
19 #define CHILD_DSIFORK 1
21 typedef struct server_child {
23 int count, nsessions, nforks;
27 extern server_child *server_child_alloc __P((const int, const int));
28 extern int server_child_add __P((server_child *, const int, const pid_t));
29 extern int server_child_remove __P((server_child *, const int, const pid_t));
30 extern void server_child_free __P((server_child *));
32 extern void server_child_kill __P((server_child *, const int, const int));
33 extern void server_child_kill_one __P((server_child *children, const int forkid, const pid_t, const uid_t));
34 extern void server_child_kill_one_by_id __P((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));
37 extern void server_child_setup __P((server_child *, const int, void (*)()));
38 extern void server_child_handler __P((server_child *));
39 extern void server_reset_signal __P((void));