Received: with ECARTIS (v1.0.0; list netdev); Mon, 31 Jan 2005 02:31:04 -0800 (PST) Received: from balu1.urz.unibas.ch (balu1.urz.unibas.ch [131.152.1.51]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j0VAUvLL032722 for ; Mon, 31 Jan 2005 02:30:58 -0800 Received: from igor.urz.unibas.ch (igor.urz.unibas.ch [131.152.1.3]) by balu1.urz.unibas.ch (8.12.10/8.12.10) with ESMTP id j0VAUrCJ016118; Mon, 31 Jan 2005 11:30:53 +0100 Date: Mon, 31 Jan 2005 11:30:52 +0100 (MET) From: Christian Tschudin To: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= cc: netdev@oss.sgi.com Subject: Re: PROBLEM: nd_tbl not a public symbol in net/ipv6/ndisc.c In-Reply-To: <20050131.190157.42878368.yoshfuji@linux-ipv6.org> Message-ID: References: <20050131.172022.93845025.yoshfuji@linux-ipv6.org> <20050131.190157.42878368.yoshfuji@linux-ipv6.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN X-SMTP-Vilter-Version: 1.1.8 X-SMTP-Vilter-Virus-Backend: savse X-SMTP-Vilter-Status: clean X-SMTP-Vilter-savse-Virus-Status: clean X-SMTP-Vilter-Unwanted-Backend: attachment X-SMTP-Vilter-attachment-Unwanted-Status: clean X-Virus-Scanned: ClamAV 0.80/650/Sun Jan 2 19:00:02 2005 clamav-milter version 0.80j on 127.0.0.1 X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by oss.sgi.com id j0VAUvLL032722 X-archive-position: 1066 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Christian.Tschudin@unibas.ch Precedence: bulk X-list: netdev Content-Length: 1282 Lines: 50 On Mon, 31 Jan 2005, YOSHIFUJI Hideaki / [iso-2022-jp] µÈÆ£±ÑÌÀ wrote: > Ok, but basically, we do not export it unless it is really used. > We may do if it is necessary when you merge it. > > BTW, for your purpose, we may export > ndisc_lookup() > or something instead of nd_tbl itself. > > Anyway, I'd like to know the usage (code). Your new ndisc_lookup() would need to distinguish the IP address types (relating to different tables). Here is roughly what we do: --- int netbox_neigh_map(struct net_device *dev, struct lunartarget_s *host, char *eth) { struct neighbour *neigh = 0; if (TARGET_IS_IPV4(host)) neigh = neigh_lookup_errno(&arp_tbl, (struct in_addr*)&(host->addr.ipv4), dev); else if (TARGET_IS_IPV6(host)) neigh = neigh_lookup_errno(&nd_tbl, &host->addr.ipv6, dev); if (!IS_ERR(neigh)) { neigh->parms->delay_probe_time = 0; NEIGH_UPDATE(neigh, eth, NUD_REACHABLE, 1, 0); neigh_release(neigh); } return 0; } --- Our other function netbox_neigh_unmap() is basically the same, with the flag NUD_REACHABLE replaced by NUD_NONE. best, christian PS: full code (use guest/guest for username/password) at https://subversion.cs.unibas.ch/repos/lunar/trunk/lnx/knetbox.c > > --yoshfuji >