From owner-freebsd-net@FreeBSD.ORG Mon Dec 22 15:50:33 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E45651065686; Mon, 22 Dec 2008 15:50:33 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from mailrelay007.isp.belgacom.be (mailrelay007.isp.belgacom.be [195.238.6.173]) by mx1.freebsd.org (Postfix) with ESMTP id 58B4E8FC1D; Mon, 22 Dec 2008 15:50:33 +0000 (UTC) (envelope-from tijl@ulyssis.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArcEAOA/T0lR92C8/2dsb2JhbACBbLxJWI9shkM Received: from 188.96-247-81.adsl-dyn.isp.belgacom.be (HELO kalimero.kotnet.org) ([81.247.96.188]) by relay.skynet.be with ESMTP; 22 Dec 2008 16:21:44 +0100 Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.14.3/8.14.3) with ESMTP id mBMFLfvX003349; Mon, 22 Dec 2008 16:21:41 +0100 (CET) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-current@freebsd.org, "Li, Qing" , freebsd-net@freebsd.org Date: Mon, 22 Dec 2008 16:21:39 +0100 User-Agent: KMail/1.9.10 References: <20081221125120.GO23166@droso.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812221621.40722.tijl@ulyssis.org> Cc: Gerald Pfeifer Subject: Re: HEADSUP: arp-v2 has been committed X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 15:50:34 -0000 On Monday 22 December 2008 10:55:34 Li, Qing wrote: > Thank you all for patching these programs. > > I scanned through your patches and they all look fine. > Each one that I read through seems to be simple fix, which > is what I hoped for. > > Again, just to emphasize the points I made in my previous > emails, the code that retrieves the ARP table by means > of sysctl() does not have to check for the RTF_LLINFO > entries in the returned list because the retrieved > entries all belong to the ARP table. For those programs > that retrieve the routing table through the routing socket > interface, the code that bypasses RTF_LLINFO entries can > also be eliminated because the routing table does not > contain any L2 information. I'm looking into the Wine case, but don't have any experience with the implementation of routing tables, so I need to have a few things spelled out. Wine currently uses: int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_LLINFO}; I take it this returns all the entries which have the RTF_LLINFO flag set? And to make this compile on CURRENT I have to change this into: #ifdef RTF_LLINFO int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_LLINFO}; #else int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, 0}; #endif Is AF_INET really the correct address family? What about AF_LINK and AF_ARP? Is using NET_RT_FLAGS with flags mask 0 exactly the same as using NET_RT_DUMP? Also, at some other place, Wine wants to retrieve gateway entries and it uses: int mib[6] = {CTL_NET, PF_ROUTE, 0, PF_INET, NET_RT_DUMP, 0}; ^ this should be AF_INET I think After that it runs over all entries counting only those which have RTF_GATEWAY set and RTF_MULTICAST unset. Is the output of this different now in CURRENT?