nlrequest.h 573 B

1234567891011121314151617181920
  1. #ifndef foonlrequesthfoo
  2. #define foonlrequesthfoo
  3. #include <sys/socket.h>
  4. #include <linux/types.h>
  5. #include <linux/netlink.h>
  6. #include <linux/rtnetlink.h>
  7. #include <linux/if.h>
  8. /* Issue a netlink message and wait for a response, calling 'callback' for every response message */
  9. int netlink_request(int s, struct nlmsghdr *n, int (*callback) (struct nlmsghdr *n, void*u), void *u);
  10. int addattr32(struct nlmsghdr *n, int maxlen, int type, int data);
  11. int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen);
  12. int netlink_open(void);
  13. #endif