[BusyBox] nameif applet patch

Nick Fedchik fnm at fusion.ukrsat.com
Sat Dec 14 09:12:04 UTC 2002


I fix one bug with dual-linked list usage on list from /etc/mactab file.
It's mainly rewritten, but still in deep testing state.

Also I found strange situation - not all lines are readed from
/proc/net/dev file
when I using 2.5.51 kernel.
For my case, all lines readed on same box when I used 2.4.20 kernel, and
only first 9 lines when kernel 2.5.51 used.
Also I can see it when
cut -f 1 -d : /proc/net/dev
but all lines showed by
cat /proc/net/dev

Is it possible to get ifname by hwaddr (mac)?
F.e.:
memset(&ifr, 0, sizeof(struct ifreq));
memcpy(ifr.ifr_hwaddr.sa_data, ch->mac, ETH_ALEN);
ioctl(ctl_sk, SIOCGIFNAME, &ifr);

I haven't success on the ioctl() :(

-- 
Nick Fedchik <fnm at fusion.ukrsat.com>
FNM3-RIPE (-UANIC), UkrSat ISP



More information about the busybox mailing list