Subject: Re: SIOCGPPPSTATS for all network i/f
To: None <tech-kern@NetBSD.ORG>
From: None <itojun@iijlab.net>
List: tech-kern
Date: 05/23/2002 18:30:24
>>Would someone mind me implementing ioctl(SIOCGPPPSTATS, ...) for all network
>>interfaces?
>I would rather have a different ioctl that returns the if_data
>member of ifnet.  It is a much more useful item to return.
>Privately, in my own sources, I have two ioctls:
>#define SIOCGIFDATA _IOWR('i', xx, struct ifdatareq)
>#define SIOCZIFDATA _IOWR('i', xx, struct ifdatareq)

	bsdi4 has struct if_data in if_msghdr and ifa_msghdr.  the value can
	be grabbed getifaddrs(3) through ifa_data member of struct ifaddrs.
	see lib/libc/net/getifaddrs.c and /usr/include/ifaddrs.h.

	to query if_data on specific interface, SIOCGIFDATA is nicer.

itojun