summaryrefslogtreecommitdiffstats
path: root/src/nlrequest.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nlrequest.h')
-rw-r--r--src/nlrequest.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nlrequest.h b/src/nlrequest.h
new file mode 100644
index 0000000..efe3450
--- /dev/null
+++ b/src/nlrequest.h
@@ -0,0 +1,20 @@
+#ifndef foonlrequesthfoo
+#define foonlrequesthfoo
+
+#include <sys/socket.h>
+#include <linux/types.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+#include <linux/if.h>
+
+/* Issue a netlink message and wait for a response, calling 'callback' for every response message */
+int netlink_request(int s, struct nlmsghdr *n, int (*callback) (struct nlmsghdr *n, void*u), void *u);
+
+int addattr32(struct nlmsghdr *n, int maxlen, int type, int data);
+int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen);
+
+int netlink_open(void);
+
+
+#endif
+