ust: improve message parsing
[ust.git] / libustcomm / ustcomm.h
1 #ifndef USTCOMM_H
2 #define USTCOMM_H
3
4 #include <sys/types.h>
5 #include <sys/un.h>
6
7 struct ustcomm_app {
8 /* the "server" socket for serving the external requests */
9 int fd;
10 char *socketpath;
11 };
12
13 struct ustcomm_ustd {
14 /* the "server" socket for serving the external requests */
15 int fd;
16 char *socketpath;
17 };
18
19 struct ustcomm_source {
20 struct sockaddr_un addr;
21 };
22
23 int send_message(pid_t pid, const char *msg, char **reply);
24
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);
27
28 int ustcomm_init_app(pid_t pid, struct ustcomm_app *handle);
29
30 int ustcomm_init_ustd(struct ustcomm_ustd *handle);
31
32 int nth_token_is(char *str, char *token, int tok_no);
33
34 char *nth_token(char *str, int tok_no);
35
36 #endif /* USTCOMM_H */
This page took 0.02968 seconds and 4 git commands to generate.