Iain Hibbert
2008-08-11 13:23:50 UTC
Hi,
Am trying to open a tap(4) device and get the interface address, but
SIOCGIFADDR does not work (though it seems that it should, looking at the
if_tap.c code and ether_ioctl()) No error is produced but nothing is
returned. test program attached, output (with linewraps added) is:
name: tap0
dump:
74 61 70 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
is there a some incantation I must do? There does get printed on the
console a message:
tap0: Ethernet address f2:0b:a4:60:f5:03
tap0: detached
and I worked out how to change the physical address using SIOCSIFPHYADDR
but I wanted to see what the address actually was as reported by ifconfig
(I got lost in the twisty passages there, not sure how it gets it)
the tap(4) manpage mentions a sysctl node but that seems overcomplicated
regards,
iain
Am trying to open a tap(4) device and get the interface address, but
SIOCGIFADDR does not work (though it seems that it should, looking at the
if_tap.c code and ether_ioctl()) No error is produced but nothing is
returned. test program attached, output (with linewraps added) is:
name: tap0
dump:
74 61 70 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
is there a some incantation I must do? There does get printed on the
console a message:
tap0: Ethernet address f2:0b:a4:60:f5:03
tap0: detached
and I worked out how to change the physical address using SIOCSIFPHYADDR
but I wanted to see what the address actually was as reported by ifconfig
(I got lost in the twisty passages there, not sure how it gets it)
the tap(4) manpage mentions a sysctl node but that seems overcomplicated
regards,
iain