From owner-freebsd-hackers Tue Jan 9 7:39:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id BEC5F37B6A5 for ; Tue, 9 Jan 2001 07:39:14 -0800 (PST) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 9 Jan 2001 15:39:13 +0000 (GMT) To: Graham Wheeler Cc: freebsd-hackers@freebsd.org, markster@marko.net Subject: Re: Size of struct ifreq/returned buffer of SIOCGIFCONF In-reply-to: Your message of "Tue, 09 Jan 2001 15:42:28 +0200." <3A5B1544.36E7F8C3@cequrux.com> X-Request-Do: Date: Tue, 09 Jan 2001 15:39:13 +0000 From: David Malone Message-ID: <200101091539.aa14307@salmon.maths.tcd.ie> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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. In Steven's "Unix Network Programming" book (2nd Edition, Volume 1) he impliments a get_ifi_info function in section 16.6. He NUL terminates the interface name on the bottom of page 436. It would be more up to date and seems better explained than the TCP/IP Illustrated section on the same topic. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message