Date: Mon, 22 Dec 2008 16:21:39 +0100 From: Tijl Coosemans <tijl@ulyssis.org> To: freebsd-current@freebsd.org, "Li, Qing" <qing.li@bluecoat.com>, freebsd-net@freebsd.org Cc: Gerald Pfeifer <gerald@pfeifer.com> Subject: Re: HEADSUP: arp-v2 has been committed Message-ID: <200812221621.40722.tijl@ulyssis.org> In-Reply-To: <B583FBF374231F4A89607B4D08578A431442EB@bcs-mail03.internal.cacheflow.com> References: <20081221125120.GO23166@droso.net> <rqtxfXiOI/zU%2BmZivn3AictW17c@TVy1gMAmSsiP9GTg//ziIjLy%2Bsk> <B583FBF374231F4A89607B4D08578A431442EB@bcs-mail03.internal.cacheflow.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812221621.40722.tijl>