Linux libnl 安装
安装libnl
sudo apt-get install libssl-dev
sudo apt-get install libnl-genl-3-dev
提供:
#include<netlink/msg.h>
#include<netlink/socket.h>
#include<netlink/attr.h>
#include<netlink/handlers.h>
struct nl_sock;
struct nl_sock *nl_socket_alloc();
int nl_connect(struct nl_sock *s ,int protocol);
void nl_socket_free(struct nl_sock *s);
void nl_close(struct nl_sock * s);
int nl_sendto(struct nl_sock *s,void *buf,size_t size);
int nl_sendmsg(struct nl_sock *s,struct nl_msg *msg,struct msghdr *hdr);
int nl_send(struct nl_sock *s,struct nl_msg *msg);