MAC ADDRESS/ioctl(siocgifhwaddr)

MAC ADDRESS/ioctl(siocgifhwaddr)

Post by Martin Birte » Tue, 03 Aug 1999 04:00:00

Hi (again)!
I want to figure out the mac-address of my network-devices (ippp0,eth0).
I have already found the ioctl()-call i have to use but i have the
problem, that i dont know how to decode the given data.
the ioctl call is as follows: ioctl(filedes,siocgifhwaddr,struct ifreq*)

the ifreq struct has a member ifr_ifru (a union) an this one has a
member ifru_hwaddr of type "struct sockaddr". Now i dont know how to
get the mac-address from the sockaddr.sa_data member. I thought sockaddr
was only used to store ip-addresses...

thanx for any help



1. Gated failure in ioctl SIOCGIFHWADDR?!

  I'm attempting to get gated running on a new Slakware installation.
  gated is failing with the following msg to syslog:
    gated[135]: krt_ifread: ioctl SIOCGIFHWADDR: Invalid argument

  Do I need to rebuild the kernel with some patch to allow gated
  to operate correctly?

  Any help would be much appreciated...


2. auto_action set to boot :(

3. RTL8139: ioctl(SIOCGIFHWADDR): No such device

4. xlock starting by default?

5. Help with printing to remote device

6. Newbie: RH8.0 ADSL problem ioctl(SIOCGIFHWADDR): No such device

7. Symbolic Links Outside the Document Tree

8. socket ioctl and mac address

9. MAC address ( ioctl )

10. filtering users by mac address and limiting bandwidth to each mac.

11. Binding a single IP Address to two different MAC addresses

12. Is different 'Ethenet address' from 'Mac Address' ?