summaryrefslogtreecommitdiff
path: root/include/libmnl
diff options
context:
space:
mode:
authorAlex Harpin <development@landsofshadow.co.uk>2015-10-18 11:48:55 +0100
committerAlex Harpin <development@landsofshadow.co.uk>2015-10-18 11:48:55 +0100
commitcebada14c32e6603380a913fb852854c46605d1d (patch)
tree88396b80b0a558866002809642876792f3c60de9 /include/libmnl
parent0bb90c44862ce3f9018656beadfbc2aac4a0d517 (diff)
parent1891e0e2cefced50e7bfdacd50942cefe5bf73ba (diff)
downloadlibmnl-upstream.tar.gz
libmnl-upstream.zip
Merge remote-tracking branch 'source/master' into upstreamupstream
Diffstat (limited to 'include/libmnl')
-rw-r--r--include/libmnl/libmnl.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index a647fd9..5adb13c 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -1,14 +1,9 @@
#ifndef _LIBMNL_H_
#define _LIBMNL_H_
-#ifdef __cplusplus
-# include <cstdio>
-# include <cstdint>
-#else
-# include <stdbool.h> /* not in C++ */
-# include <stdio.h>
-# include <stdint.h>
-#endif
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdint.h>
#include <unistd.h>
#include <sys/socket.h> /* for sa_family_t */
#include <linux/netlink.h>
@@ -22,11 +17,13 @@ extern "C" {
*/
#define MNL_SOCKET_AUTOPID 0
-#define MNL_SOCKET_BUFFER_SIZE (getpagesize() < 8192L ? getpagesize() : 8192L)
+#define MNL_SOCKET_BUFFER_SIZE (sysconf(_SC_PAGESIZE) < 8192L ? sysconf(_SC_PAGESIZE) : 8192L)
struct mnl_socket;
-extern struct mnl_socket *mnl_socket_open(int type);
+extern struct mnl_socket *mnl_socket_open(int bus);
+extern struct mnl_socket *mnl_socket_open2(int bus, int flags);
+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);