Linux network user mode and kernel mode interface: ioctl, netlink

The following code uses ioctl to read the ip and mac addresses of the eth2 interface:

The same can be done with netlink, that is, netlink socket. For details, see Baidu:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325912664&siteId=291194637