add first version of an initscript
[osspd.git] / ossp-slave.h
1 /*
2  * ossp-slave - OSS Proxy: Common codes for slaves
3  *
4  * Copyright (C) 2008-2010  SUSE Linux Products GmbH
5  * Copyright (C) 2008-2010  Tejun Heo <tj@kernel.org>
6  *
7  * This file is released under the GPLv2.
8  */
9
10 #ifndef _OSSP_SLAVE_H
11 #define _OSSP_SLAVE_H
12
13 #include "ossp.h"
14 #include "ossp-util.h"
15
16 #define OSSP_USER_NAME_LEN      128
17
18 extern char ossp_user_name[OSSP_USER_NAME_LEN];
19 extern int ossp_cmd_fd, ossp_notify_fd;
20 extern void *ossp_mmap_addr[2];
21
22 void ossp_slave_init(int argc, char **argv);
23 int ossp_slave_process_command(int cmd_fd,
24                                ossp_action_fn_t const *action_fn_tbl,
25                                int (*action_pre_fn)(void),
26                                void (*action_post_fn)(void));
27
28 #endif /* _OSSP_SLAVE_H */