summaryrefslogtreecommitdiffstats
path: root/src/nlrequest.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2003-08-04 22:45:25 +0000
committerLennart Poettering <lennart@poettering.net>2003-08-04 22:45:25 +0000
commit3e05cdd09405cc6133ebf38ea9ee9afc50fb280f (patch)
tree22de63df1a8223e84fb1c028ca5ebf178e97cfc8 /src/nlrequest.h
parent80f8eef17230e586d343d0c219f9eb2f2d1643e8 (diff)
Initial checkin
git-svn-id: file:///home/lennart/svn/public/ifmetric/trunk@3 b1ab5a0b-19c4-0310-9d9a-ef184d715f50
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
+