diff options
author | Skylar Chang <chiaweic@codeaurora.org> | 2017-03-29 11:30:43 -0700 |
---|---|---|
committer | Niranjan Pendharkar <npendhar@codeaurora.org> | 2017-04-20 10:14:21 -0700 |
commit | 789db9e676beb0ce29ca9771303db30f6292b205 (patch) | |
tree | 5d479604c436cbaa6934441c0a8184f3b3941e91 /include/libnfnetlink | |
parent | d3b7d1f63f19a832929e905d6c569c29d6ab5169 (diff) | |
download | libnfnetlink-789db9e676beb0ce29ca9771303db30f6292b205.tar.gz |
Add support for passing pre-bound file descriptorandroid-wear-o-preview-4android-wear-o-preview-3android-o-preview-2
Add API support to accept pre-bound file descriptor from a
privileged process for creating a handle. Also clean-up
the handle without close the passing file descriptor. This
paves the path for privilege separation.
Bug:34361337
Test: Compiles
Change-Id: Iec6a1208e88ff70c52f08d5eddbce02e3dbf0b26
Diffstat (limited to 'include/libnfnetlink')
-rw-r--r-- | include/libnfnetlink/libnfnetlink.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/libnfnetlink/libnfnetlink.h b/include/libnfnetlink/libnfnetlink.h index 1d8c49d..90c5672 100644 --- a/include/libnfnetlink/libnfnetlink.h +++ b/include/libnfnetlink/libnfnetlink.h @@ -18,6 +18,7 @@ #include <sys/socket.h> /* for sa_family_t */ #include <linux/netlink.h> #include <libnfnetlink/linux_nfnetlink.h> +#include <stdbool.h> #ifndef NETLINK_NETFILTER #define NETLINK_NETFILTER 12 @@ -66,11 +67,17 @@ extern unsigned int nfnl_portid(const struct nfnl_handle *h); /* get a new library handle */ extern struct nfnl_handle *nfnl_open(void); +extern struct nfnl_handle *nfnl_open2(int fd, bool bind); extern int nfnl_close(struct nfnl_handle *); +extern int nfnl_close2(struct nfnl_handle *); extern struct nfnl_subsys_handle *nfnl_subsys_open(struct nfnl_handle *, u_int8_t, u_int8_t, unsigned int); +extern struct nfnl_subsys_handle *nfnl_subsys_open2(struct nfnl_handle *, + u_int8_t, u_int8_t, + unsigned int, + bool bind); extern void nfnl_subsys_close(struct nfnl_subsys_handle *); /* set and unset sequence tracking */ |