Date: Sat, 23 Feb 2002 17:22:24 +0100 (CET) From: "Bjoern A. Zeeb" <patch@zabbadoz.net> To: freebsd-net@freebsd.org Cc: "Bjoern A. Zeeb" <patch@zabbadoz.net> Subject: net/if.c ifconf() question Message-ID: <Pine.BSF.4.44.0202231617210.6347-100000@e0-0.zab2.int.zabbadoz.net>
next in thread | raw e-mail | index | archive | help
Hi, had some problems with new isc dhcpd. The problem was that the supplied buffer was not big enough in common/discover.c when doing i = ioctl(sock, SIOCGIFCONF, &ic); My question now after a short look at this is: net/if.c: static int ifconf(cmd, data) only fills the supplied buffer as long as more data fits and only returns the length of bytes copied into the buffer. In userspace how can one decide if we got all data ? Should ifconf() either return -EFAULT if buffer does not fit or return the total length of data needed for all interface information ? Please cc me because I'm not on the list. Thanks. -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT 56 69 73 69 74 http://www.zabbadoz.net/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.44.0202231617210.6347-100000>