Other uses for sockets
Hi,
Fabio is working on scripts to identify IPv6-capable packages
automatically, and among one of the lists it produces, I noticed
e2fsprogs. It claimed that e2fsprogs had networking support, but not
IPv6.
I downloaded the source to see why such a package would use sockets,
and it appears that for its UUID generation it tries to find the MAC
address for ethernet cards:-
sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
if (ioctl (sd, SIOCGIFCONF, (char *)&ifc) < 0) {
if (ioctl(sd, SIOCGIFHWADDR, &ifr) < 0)
Are there any more possible operations on sockets like this?
Ivo
--
Seit Käptn Ahab sich mit Moses zusammengetan hatte, hatte Moby Dick
nicht mehr viel zu lachen.
- Nichtlustig
Reply to: