diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-07-17 13:33:36 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-07-17 13:33:36 +0200 |
commit | 9406f29b89f6727c3db5485d109466701393b4d4 (patch) | |
tree | 6b5b9898b6bd9063d26087450b9044f2e500a80f /include | |
parent | 589fd85fa48b8e1da2debd08b90a6062cf64ef15 (diff) | |
download | conntrack-tools-9406f29b89f6727c3db5485d109466701393b4d4.tar.gz conntrack-tools-9406f29b89f6727c3db5485d109466701393b4d4.zip |
local: add LOCAL_RET_* return values for UNIX sockets callbacks
This patch adds the LOCAL_RET_* return values. The return value
LOCAL_RET_STOLEN which allows to leave a client socket open while
waiting for an operation to finish.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/conntrackd.h | 1 | ||||
-rw-r--r-- | include/local.h | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/conntrackd.h b/include/conntrackd.h index 040c252..417bac6 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -234,7 +234,6 @@ extern struct ct_mode stats_mode; /* These live in run.c */ void killer(int foo); -void local_handler(int fd, void *data); int init(void); void run(void); diff --git a/include/local.h b/include/local.h index 6940755..f9121b1 100644 --- a/include/local.h +++ b/include/local.h @@ -16,11 +16,16 @@ struct local_server { char path[UNIX_PATH_MAX]; }; +/* callback return values */ +#define LOCAL_RET_ERROR -1 +#define LOCAL_RET_OK 0 +#define LOCAL_RET_STOLEN 1 + /* local server */ int local_server_create(struct local_server *server, struct local_conf *conf); void local_server_destroy(struct local_server *server); int do_local_server_step(struct local_server *server, void *data, - void (*process)(int fd, void *data)); + int (*process)(int fd, void *data)); /* local client */ int local_client_create(struct local_conf *conf); |