From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 15 09:43:51 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E7F01065670 for ; Fri, 15 Jan 2010 09:43:51 +0000 (UTC) (envelope-from mail@maxlor.com) Received: from mxout004.mail.hostpoint.ch (mxout004.mail.hostpoint.ch [217.26.49.183]) by mx1.freebsd.org (Postfix) with ESMTP id DF5088FC13 for ; Fri, 15 Jan 2010 09:43:50 +0000 (UTC) Received: from [10.0.2.20] (helo=asmtp002.mail.hostpoint.ch) by mxout004.mail.hostpoint.ch with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1NViPr-0000Oa-HO for freebsd-hackers@freebsd.org; Fri, 15 Jan 2010 10:24:27 +0100 Received: from [82.136.101.114] (helo=atlantis.intranet) by asmtp002.mail.hostpoint.ch with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1NViPr-000PUg-Cv for freebsd-hackers@freebsd.org; Fri, 15 Jan 2010 10:24:27 +0100 Received: from [192.168.10.167] (pub212004072186.fx-hfc.datazug.ch [212.4.72.186]) by atlantis.intranet (Postfix) with ESMTPSA id 2112E1B5D8 for ; Fri, 15 Jan 2010 10:24:27 +0100 (CET) X-Authenticated-Sender-Id: mail@maxlor.com From: Benjamin Lutz To: freebsd-hackers@freebsd.org Date: Fri, 15 Jan 2010 10:24:26 +0100 User-Agent: KMail/1.9.9 X-Face: $Ov27?7*N,h60fIEfNJdb!m,@#4T/d; 1hw|W0zvsHM(a$Yn6BYQ0^SEEXvi8>D`|V*F"=?utf-8?q?=5F+=0A=09R2?=@Aq>+mNb4`,'[[%z9v0Fa~]AD1}xQO3|>b.z&}l#R-_(P`?@Mz"kS; XC>Eti,i3>%@=?utf-8?q?g=3F=0A=094f?=,\c7|Ghwb&ky$b2PJ^\0b83NkLsFKv|smL/cI4UD%Tu8alAD MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201001151024.26325.mail@maxlor.com> Subject: getifaddrs(3), ifa_data field X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 09:43:51 -0000 I noticed that the getifaddrs(3) library function doesn't behave as=20 described in the manpage. The manpage says: The ifa_data field references address family specific data. For AF_LINK addresses it contains a pointer to the struct if_data (as defined in include file ) which contains various interface attributes and statistics. This is correct and works. For all other address families, it contains a pointer to the struct ifa_data (as defined in include file ) which contains per=E2=80=90address interface statistics. This is not what I'm seeing. First, I can't find a struct ifa_data=20 definition, and second, the ifa_data field seems to be NULL for all address= =20 types other than AF_LINK. I'm thinking there are three possible explanations for this behaviour: =2D I need to set some non-default option to enable the ifa_data field for non-AF_LINK addresses. =2D There's a regression; the ifa_data field should contain data for non-AF_LINK addresses but no longer does. =2D The behaviour is correct, but the manpageis outdated. Please give me a bit more background information on this issue. Cheers Benjamin