From owner-freebsd-net Thu Feb 13 14:42:20 2003 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8699F37B401 for ; Thu, 13 Feb 2003 14:42:19 -0800 (PST) Received: from mel-rto6.wanadoo.fr (smtp-out-6.wanadoo.fr [193.252.19.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B8B243F85 for ; Thu, 13 Feb 2003 14:42:18 -0800 (PST) (envelope-from vjardin@wanadoo.fr) Received: from mel-rta9.wanadoo.fr (193.252.19.69) by mel-rto6.wanadoo.fr (6.7.015) id 3E0C343F01F0CA03 for net@FreeBSD.ORG; Thu, 13 Feb 2003 23:42:17 +0100 Received: from there (80.11.204.163) by mel-rta9.wanadoo.fr (6.7.015) id 3E26DA8D0108FE1A for net@FreeBSD.ORG; Thu, 13 Feb 2003 23:42:17 +0100 Message-ID: <3E26DA8D0108FE1A@mel-rta9.wanadoo.fr> (added by postmaster@wanadoo.fr) Content-Type: text/plain; charset="iso-8859-15" From: Vincent Jardin To: net@FreeBSD.ORG Subject: How to get interface's sockaddr_dl with the routing socket ? Date: Fri, 14 Feb 2003 00:03:10 +0100 X-Mailer: KMail [version 1.3.2] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Most of the userland program gets the informations about the interfaces via the Kernel sysctl_iflist() function. When a new interface is added, it is announced by the routing socket with a RTM_IFANNOUNCE message. However the structure if_announcemsghdr does not provide information about the interface's sockaddr_dl. Nevertheless, sysctl_iflist() can be used, but it is not efficient. What should the right fix be ? I was wondering if "ifpaddr = TAILQ_FIRST(&ifp->if_addrhead)->ifa_addr" could be added within rt_ifannouncemsg() and rt_ifmsg() just before rt_msg1() ? Regards, Vincent To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message