From owner-freebsd-hackers Tue Jan 9 7:29:47 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from citadel.cequrux.com (citadel.cequrux.com [192.96.22.18]) by hub.freebsd.org (Postfix) with ESMTP id 8BD1737B69B for ; Tue, 9 Jan 2001 07:29:09 -0800 (PST) Received: (from nobody@localhost) by citadel.cequrux.com (8.8.8/8.6.9) id RAA17627; Tue, 9 Jan 2001 17:26:42 +0200 (SAST) Received: by citadel.cequrux.com via recvmail id 17539; Tue Jan 9 17:25:58 2001 Message-ID: <3A5B1544.36E7F8C3@cequrux.com> Date: Tue, 09 Jan 2001 15:42:28 +0200 From: Graham Wheeler Organization: Cequrux Technologies X-Mailer: Mozilla 4.75 [en] (X11; U; FreeBSD 3.4-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: David Malone Cc: freebsd-hackers@freebsd.org, markster@marko.net Subject: Re: Size of struct ifreq/returned buffer of SIOCGIFCONF References: <3A5AE854.F769B86C@cequrux.com> <20010109142043.B52761@walton.maths.tcd.ie> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David Malone wrote: > > If you read the paragraph below that code, it notes that the ifreq > structures are of variable length. The spacing depends on the size > of the returned info. > > David. Something that isn't clear to me - do you know (Mark for Linux, Dave or someone else for FreeBSD) whether it is reasonable to assume the ifr_name if the struct ifreq will be NUL terminated? I know that the name in a struct sockaddr_dl is not necessarily so terminated, but for the ifr_name field, if it isn't NUL terminated this could get really messy. -- Dr Graham Wheeler E-mail: gram@cequrux.com Director, Research and Development WWW: http://www.cequrux.com CEQURUX Technologies Phone: +27(21)423-6065 Firewalls/VPN Specialists Fax: +27(21)424-3656 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message