diff options
author | Sander Vrijders <[email protected]> | 2017-09-19 14:53:11 +0000 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2017-09-19 14:53:11 +0000 |
commit | 115431af51795dfd583e24a051a7749c58a900b3 (patch) | |
tree | a5817c5bd030b8a07713dcaa7dde95edbd0392d2 /include | |
parent | 669a8d4edfcc0fb2a7cd6f93e0ad2d0de820371a (diff) | |
parent | 541b1c5eeb5fe9f9aaa4aa6487852e5c59761139 (diff) | |
download | ouroboros-115431af51795dfd583e24a051a7749c58a900b3.tar.gz ouroboros-115431af51795dfd583e24a051a7749c58a900b3.zip |
Merged in sandervrijders/ouroboros/be-flow-down (pull request #596)
ipcpd, lib: Add flow down events
Diffstat (limited to 'include')
-rw-r--r-- | include/ouroboros/errno.h | 1 | ||||
-rw-r--r-- | include/ouroboros/fccntl.h | 2 | ||||
-rw-r--r-- | include/ouroboros/shm_rbuff.h | 11 |
3 files changed, 12 insertions, 2 deletions
diff --git a/include/ouroboros/errno.h b/include/ouroboros/errno.h index 7cd58aa5..1710f7f8 100644 --- a/include/ouroboros/errno.h +++ b/include/ouroboros/errno.h @@ -30,5 +30,6 @@ #define EIRMD 1002 /* Failed to communicate with IRMD */ #define EIPCP 1003 /* Failed to communicate with IPCP */ #define EIPCPSTATE 1004 /* Target in wrong state */ +#define EFLOWDOWN 1005 /* Flow is down */ #endif /* OUROBOROS_ERRNO_H */ diff --git a/include/ouroboros/fccntl.h b/include/ouroboros/fccntl.h index d938439f..3bd09e65 100644 --- a/include/ouroboros/fccntl.h +++ b/include/ouroboros/fccntl.h @@ -33,6 +33,8 @@ #define FLOWFRDWR 00000002 /* Read-write flow */ #define FLOWFACCMODE 00000003 /* Access mask */ +#define FLOWFDOWN 00000004 /* Flow is down */ + #define FLOWFNONBLOCK 00004000 /* Non-blocking flow */ #define FLOWFDEFAULT 00000002 /* Default, blocking, rw */ diff --git a/include/ouroboros/shm_rbuff.h b/include/ouroboros/shm_rbuff.h index 55d03b41..af50aada 100644 --- a/include/ouroboros/shm_rbuff.h +++ b/include/ouroboros/shm_rbuff.h @@ -26,6 +26,12 @@ #include <sys/types.h> #include <sys/time.h> +#include <stdint.h> + +#define ACL_RDWR 0000 +#define ACL_RDONLY 0001 +#define ACL_FLOWDOWN 0002 + struct shm_rbuff; struct shm_rbuff * shm_rbuff_create(pid_t api, @@ -38,9 +44,10 @@ void shm_rbuff_close(struct shm_rbuff * rb); void shm_rbuff_destroy(struct shm_rbuff * rb); -void shm_rbuff_block(struct shm_rbuff * rb); +void shm_rbuff_set_acl(struct shm_rbuff * rb, + uint32_t flags); -void shm_rbuff_unblock(struct shm_rbuff * rb); +uint32_t shm_rbuff_get_acl(struct shm_rbuff * rb); void shm_rbuff_fini(struct shm_rbuff * rb); |