Whenever I call this sysctl, I get an errno of EPROGNOTAVAIL from sysctl():

»·······name[0] = CTL_NET;
»·······name[1] = PF_LINK;
»·······name[2] = NETLINK_GENERIC;
»·······name[3] = IFMIB_IFDATA;
»·······name[4] = ifindex;
»·······name[5] = IFDATA_DRIVERNAME;

»·······len = IFNAMSIZ;
»·······if (sysctl(name, 6, dname, &len, NULL, 0) == -1) {
»·······»·······warnc(EX_OSERR, "cannot obtain driver name for ifname %s",
»·······»·······    ifname);
»·······»·······return (-1);
»·······}

The ifindex is valid. "dname" is a pointer to an IFNAMSIZ sized buffer. This problem is happening on a 7.0-RELEASE system.

It looks like the switch..case in that path could be fubar'd by the compiler as there are not break statements for each distinct case label, could this be due to gcc friendly fire?

cheers
BMS


_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to