e661a5518bd577631255588a1d461eadf3d9e46e
[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 #include "kcompat.h"
8
9 struct ustcomm_connection {
10 struct list_head list;
11 int fd;
12 };
13
14 struct ustcomm_server {
15 /* the "server" socket for serving the external requests */
16 int listen_fd;
17 char *socketpath;
18
19 struct list_head connections;
20 };
21
22 struct ustcomm_ustd {
23 struct ustcomm_server server;
24 };
25
26 struct ustcomm_app {
27 struct ustcomm_server server;
28 };
29
30 struct ustcomm_source {
31 int fd;
32 void *priv;
33 };
34
35 char *strdup_malloc(const char *s);
36
37 int send_message(pid_t pid, const char *msg, char **reply);
38
39 int ustcomm_ustd_recv_message(struct ustcomm_ustd *ustd, char **msg, struct ustcomm_source *src, int timeout);
40 int ustcomm_app_recv_message(struct ustcomm_app *app, char **msg, struct ustcomm_source *src, int timeout);
41
42 int ustcomm_init_app(pid_t pid, struct ustcomm_app *handle);
43
44 int ustcomm_init_ustd(struct ustcomm_ustd *handle);
45
46 int nth_token_is(char *str, char *token, int tok_no);
47
48 char *nth_token(char *str, int tok_no);
49
50 #endif /* USTCOMM_H */
This page took 0.031973 seconds and 3 git commands to generate.