1 /* Function prototypes. */
3 /* Structs used in prototypes must be declared as such first. */
7 int srv_execve(int proc_e
, char *exec
, size_t exec_len
, char *argv
[],
14 int do_up(message
*m
);
15 int do_down(message
*m
);
16 int do_refresh(message
*m
);
17 int do_restart(message
*m
);
18 int do_clone(message
*m
);
19 int do_edit(message
*m
);
20 int do_shutdown(message
*m
);
21 void do_period(message
*m
);
22 int do_init_ready(message
*m
);
23 int do_update(message
*m
);
24 int do_upd_ready(message
*m
);
25 void do_sigchld(void);
26 int do_getsysinfo(message
*m
);
27 int do_lookup(message
*m
);
30 int check_call_permission(endpoint_t caller
, int call
, struct rproc
32 int copy_rs_start(endpoint_t src_e
, char *src_rs_start
, struct rs_start
34 int copy_label(endpoint_t src_e
, char *src_label
, size_t src_len
, char
35 *dst_label
, size_t dst_len
);
36 void build_cmd_dep(struct rproc
*rp
);
37 int srv_fork(uid_t reuid
, gid_t regid
);
38 int srv_kill(pid_t pid
, int sig
);
39 int srv_update(endpoint_t src_e
, endpoint_t dst_e
);
40 #define kill_service(rp, errstr, err) \
41 kill_service_debug(__FILE__, __LINE__, rp, errstr, err)
42 int kill_service_debug(char *file
, int line
, struct rproc
*rp
, char
44 #define crash_service(rp) \
45 crash_service_debug(__FILE__, __LINE__, rp)
46 int crash_service_debug(char *file
, int line
, struct rproc
*rp
);
47 #define cleanup_service(rp) \
48 cleanup_service_debug(__FILE__, __LINE__, rp)
49 void cleanup_service_debug(char *file
, int line
, struct rproc
*rp
);
50 int create_service(struct rproc
*rp
);
51 int clone_service(struct rproc
*rp
, int instance_flag
);
52 int publish_service(struct rproc
*rp
);
53 int unpublish_service(struct rproc
*rp
);
54 int run_service(struct rproc
*rp
, int init_type
);
55 int start_service(struct rproc
*rp
);
56 void stop_service(struct rproc
*rp
,int how
);
57 int update_service(struct rproc
**src_rpp
, struct rproc
**dst_rpp
, int
59 void activate_service(struct rproc
*rp
, struct rproc
*ex_rp
);
60 void terminate_service(struct rproc
*rp
);
61 void restart_service(struct rproc
*rp
);
62 void inherit_service_defaults(struct rproc
*def_rp
, struct rproc
*rp
);
63 void get_service_instances(struct rproc
*rp
, struct rproc
***rps
, int
65 int read_exec(struct rproc
*rp
);
66 void share_exec(struct rproc
*rp_src
, struct rproc
*rp_dst
);
67 void free_exec(struct rproc
*rp
);
68 int init_slot(struct rproc
*rp
, struct rs_start
*rs_start
, endpoint_t
70 int edit_slot(struct rproc
*rp
, struct rs_start
*rs_start
, endpoint_t
72 int clone_slot(struct rproc
*rp
, struct rproc
**clone_rpp
);
73 void swap_slot(struct rproc
**src_rpp
, struct rproc
**dst_rpp
);
74 struct rproc
* lookup_slot_by_label(char *label
);
75 struct rproc
* lookup_slot_by_pid(pid_t pid
);
76 struct rproc
* lookup_slot_by_dev_nr(dev_t dev_nr
);
77 struct rproc
* lookup_slot_by_flags(int flags
);
78 int alloc_slot(struct rproc
**rpp
);
79 void free_slot(struct rproc
*rp
);
80 char *get_next_label(char *ptr
, char *label
, char *caller_label
);
81 void add_forward_ipc(struct rproc
*rp
, struct priv
*privp
);
82 void add_backward_ipc(struct rproc
*rp
, struct priv
*privp
);
83 void init_privs(struct rproc
*rp
, struct priv
*privp
);
84 void update_period(message
*m_ptr
);
85 void end_update(int result
, int reply_flag
);
88 int init_service(struct rproc
*rp
, int type
);
89 void fill_send_mask(sys_map_t
*send_mask
, int set_bits
);
90 void fill_call_mask( int *calls
, int tot_nr_calls
, bitchunk_t
91 *call_mask
, int call_base
, int is_init
);
92 char* srv_to_string(struct rproc
*rp
);
93 void reply(endpoint_t who
, struct rproc
*rp
, message
*m_ptr
);
94 void late_reply(struct rproc
*rp
, int code
);
95 int rs_isokendpt(endpoint_t endpoint
, int *proc
);
96 int sched_init_proc(struct rproc
*rp
);
97 int update_sig_mgrs(struct rproc
*rp
, endpoint_t sig_mgr
, endpoint_t
101 char * init_strerror(int errnum
);
102 char * lu_strerror(int errnum
);