netdev
[Top] [All Lists]

Same question on i2.2 kernel, but for ipv6 stack code

To: ak@xxxxxx
Subject: Same question on i2.2 kernel, but for ipv6 stack code
From: Guilhem Tardy <Guilhem.Tardy@xxxxxx>
Date: Fri, 11 Feb 2000 13:19:01 -0500
Cc: netdev@xxxxxxxxxxx, kuznet@xxxxxxxxxxxxx
Organization: CRC
References: <20000210.21122000@localhost.localdomain> <20000211014231.A2750@fred.muc.de>
Sender: owner-netdev@xxxxxxxxxxx
Andi Kleen wrote:
> 
> >
> > In file ip_input.c, function ip_rcv, how can I know if a received skb
> > is for our machine
> > if no sock (and no transport protocol) is waitting that packet(skb)?,
> > Is there an easy way to
> > determine if skb->nh.iph.daddr is our ip addr?. I hope you can
> > understand me :)
> 
> Check ((struct rtable *) skb->dst)->rt_flags & RTCF_LOCAL
> 
> -Andi
> 

How would you do that for an skb with a IPv6 packet?
I want to know if an arbitrary IPv6 address is an on-link address for
the receiving node,
and I need to check the prefix length of the subnet corresponding to
this link.

Finally, how does a node know if it is a router itself? (probably a
#define)

PS Alexey: Sorry for asking the same question again, it is just to let
you know that my usual email system is back to normal (at last).

-- 
Guilhem Tardy                       phone: (613) 993-8232
Network Systems and Technologies    fax:   (613) 998-9648
Communications Research Center      email: Guilhem.Tardy@xxxxxx
3701 Carling Ave. #28/2B            web:   http://www.crc.ca/
Ottawa (Ontario) K2H 8S2

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