![]() ![]() Create an ifreq structure for passing data in and out of ioctl.The method described here has five steps: On Linux-based systems the MAC address of an interface can be obtained using the ioctl command SIOCGIFHWADDR. The variable if_name points to a null-terminated string containing the name of the interface (for example, eth0). Suppose you wish to display the MAC address of an Ethernet interface. ![]() ![]() To get the MAC address of an Ethernet interface in C using the ioctl command SIOCGIFHWADDR Scenario ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |