netdev
[Top] [All Lists]

Re: PROBLEM: nd_tbl not a public symbol in net/ipv6/ndisc.c

To: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Subject: Re: PROBLEM: nd_tbl not a public symbol in net/ipv6/ndisc.c
From: Christian Tschudin <Christian.Tschudin@xxxxxxxxx>
Date: Mon, 31 Jan 2005 11:30:52 +0100 (MET)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20050131.190157.42878368.yoshfuji@xxxxxxxxxxxxxx>
References: <Pine.OSF.4.58.0501310903220.211@xxxxxxxxxxxxxxxxxx> <20050131.172022.93845025.yoshfuji@xxxxxxxxxxxxxx> <Pine.OSF.4.58.0501310922130.2054@xxxxxxxxxxxxxxxxxx> <20050131.190157.42878368.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
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
>


<Prev in Thread] Current Thread [Next in Thread>