ust: add info exchange between app and ustd
[ust.git] / libustcomm / ustcomm.h
CommitLineData
f9e5ce61
PMF
1#ifndef USTCOMM_H
2#define USTCOMM_H
3
4#include <sys/types.h>
b02e31e5 5#include <sys/un.h>
f9e5ce61 6
aca1ad90
PMF
7#include "kcompat.h"
8
9struct ustcomm_connection {
10 struct list_head list;
11 int fd;
12};
13
811e4b93 14struct ustcomm_server {
b0540e11 15 /* the "server" socket for serving the external requests */
aca1ad90 16 int listen_fd;
d0b5f2b9 17 char *socketpath;
aca1ad90
PMF
18
19 struct list_head connections;
d0b5f2b9
PMF
20};
21
22struct ustcomm_ustd {
811e4b93
PMF
23 struct ustcomm_server server;
24};
aca1ad90 25
811e4b93
PMF
26struct ustcomm_app {
27 struct ustcomm_server server;
d0b5f2b9
PMF
28};
29
b02e31e5 30struct ustcomm_source {
811e4b93
PMF
31 int fd;
32 void *priv;
b02e31e5
PMF
33};
34
d0b5f2b9
PMF
35int send_message(pid_t pid, const char *msg, char **reply);
36
b02e31e5
PMF
37int ustcomm_ustd_recv_message(struct ustcomm_ustd *ustd, char **msg, struct ustcomm_source *src);
38int ustcomm_app_recv_message(struct ustcomm_app *app, char **msg, struct ustcomm_source *src);
3847c3ba 39
d0b5f2b9
PMF
40int ustcomm_init_app(pid_t pid, struct ustcomm_app *handle);
41
42int ustcomm_init_ustd(struct ustcomm_ustd *handle);
f9e5ce61 43
b02e31e5
PMF
44int nth_token_is(char *str, char *token, int tok_no);
45
46char *nth_token(char *str, int tok_no);
47
f9e5ce61 48#endif /* USTCOMM_H */
This page took 0.024359 seconds and 4 git commands to generate.