chatgpt回答挺好
req.hdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ndmsg));
req.hdr.nlmsg_type = RTM_GETNEIGH;
req.hdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP;
req.hdr.nlmsg_seq = 1;
req.hdr.nlmsg_pid = getpid();
req.ndm.ndm_family = AF_INET;
用netlink可以,用这个关键字搜吧
man 7 rtnetlink
【 在 b0207191 的大作中提到: 】
: 比如访问
: /proc/sys/net/ipv4/neigh/vlan15下的若干节点
: anycast_delay
: ...................
--
FROM 27.38.197.*