From owner-freebsd-net Sat Feb 23 8:25:13 2002 Delivered-To: freebsd-net@freebsd.org Received: from ns1.cksoft.de (ns1.cksoft.de [62.111.66.1]) by hub.freebsd.org (Postfix) with ESMTP id DDC0937B404 for ; Sat, 23 Feb 2002 08:25:09 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by ns1.cksoft.de (Postfix) with ESMTP id 454F614FB6 for ; Sat, 23 Feb 2002 17:25:08 +0100 (CET) Received: by ns1.cksoft.de (Postfix, from userid 66) id 27FBD14FB1; Sat, 23 Feb 2002 17:25:07 +0100 (CET) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id B090A22E6C; Sat, 23 Feb 2002 17:22:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 9ABBF22E6B; Sat, 23 Feb 2002 17:22:24 +0100 (CET) Date: Sat, 23 Feb 2002 17:22:24 +0100 (CET) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: freebsd-net@freebsd.org Cc: "Bjoern A. Zeeb" Subject: net/if.c ifconf() question Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS perl-11 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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