Commit | Line | Data |
---|---|---|
f9e5ce61 PMF |
1 | #ifndef USTCOMM_H |
2 | #define USTCOMM_H | |
3 | ||
4 | #include <sys/types.h> | |
b02e31e5 | 5 | #include <sys/un.h> |
f9e5ce61 | 6 | |
d0b5f2b9 | 7 | struct ustcomm_app { |
b0540e11 | 8 | /* the "server" socket for serving the external requests */ |
d0b5f2b9 PMF |
9 | int fd; |
10 | char *socketpath; | |
11 | }; | |
12 | ||
13 | struct ustcomm_ustd { | |
b0540e11 | 14 | /* the "server" socket for serving the external requests */ |
d0b5f2b9 PMF |
15 | int fd; |
16 | char *socketpath; | |
17 | }; | |
18 | ||
b02e31e5 PMF |
19 | struct ustcomm_source { |
20 | struct sockaddr_un addr; | |
21 | }; | |
22 | ||
d0b5f2b9 PMF |
23 | int send_message(pid_t pid, const char *msg, char **reply); |
24 | ||
b02e31e5 PMF |
25 | int ustcomm_ustd_recv_message(struct ustcomm_ustd *ustd, char **msg, struct ustcomm_source *src); |
26 | int ustcomm_app_recv_message(struct ustcomm_app *app, char **msg, struct ustcomm_source *src); | |
3847c3ba | 27 | |
d0b5f2b9 PMF |
28 | int ustcomm_init_app(pid_t pid, struct ustcomm_app *handle); |
29 | ||
30 | int ustcomm_init_ustd(struct ustcomm_ustd *handle); | |
f9e5ce61 | 31 | |
b02e31e5 PMF |
32 | int nth_token_is(char *str, char *token, int tok_no); |
33 | ||
34 | char *nth_token(char *str, int tok_no); | |
35 | ||
f9e5ce61 | 36 | #endif /* USTCOMM_H */ |