#include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <linux/rtnetlink.h> #include <linux/if_arp.h> int main() { int soc; struct sockaddr_nl sa; struct { struct nlmsghdr nh; struct ifinfomsg ifi; } request; int seq = 100; int n; char buf[4096]; struct nlmsghdr *nlhdr; /* Netlinkソケットの作成 */ soc = socket(AF_NETLINK,