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
|