path: root/include
diff options
authorKen-ichirou MATSUZAWA <>2014-09-25 09:33:27 +0900
committerPablo Neira Ayuso <>2014-09-25 12:46:13 +0200
commite374664f48724e5b13a848bad5c5353349f0ae38 (patch)
tree3817b5e34fafa9e9ef38ca7edbe67df5ce21bea8 /include
parent2c458b2eb479cbc83c83de79dcd14bec6acc90bd (diff)
socket: creating a struct mnl_socket from a pre-existing socket
This patch defines a new function mnl_socket_fdopen() which creates a struct mnl_socket object from a pre-existing socket like obtained from other process and different domain/type from the same prodess. Signed-off-by: Ken-ichirou MATSUZAWA <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include')
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index 223709c..0de6678 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -22,6 +22,7 @@ extern "C" {
struct mnl_socket;
extern struct mnl_socket *mnl_socket_open(int type);
+extern struct mnl_socket *mnl_socket_fdopen(int fd);
extern int mnl_socket_bind(struct mnl_socket *nl, unsigned int groups, pid_t pid);
extern int mnl_socket_close(struct mnl_socket *nl);
extern int mnl_socket_get_fd(const struct mnl_socket *nl);