blob: efe3450dedc81df170ec1bcd2ce952bd6dfa1b55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
|