If I understand you correcly you want to know how an IPv6 packet makes it
into the IPv6 stack (ip6_rcv). If the packet is coming via PPP or Ethernet
the protocol id from the L2 frame is used by the lower layer network stack
(net_if_rx) to figure out what L3 protocol handler should be called. Each
L3 protocol handler registers with the kernel via dev_add_pack().
Look at linux/include/linux/if_ether.h to see what the L2 header on an
ethernet frame looks like.
Jim
On Tue, Jan 08, 2002 at 06:42:50PM +0530, Abdul Khaliq wrote:
> Dear sir /madam
> I have some queries regarding IPv6. I am still in the learning stage. So, my
> question may look very simple for you, but if you answer it, that will help
> me a lot. Please answer the following questions.
>
>
> 1. the route table entry consists of "Destination , Next Hop,
> Flags, Metric, Ref, Use, Iface".
> If i recieve an IPv6 packet the function ip6_rcv
>
> I would like to know to what are the functions the function pointers input
> and output in the struct dst_entry structure(Destination)?.
>
> The function ip6_input processes the Ipv6 packet and calls the upper layer
> functions.
>
> The fucntion ip6_input is called twice
> 1) when a multi cast packet is recieved to deliver a packet to host, and
>
> 2) rt->u.dst.input = ip6_input;
> it is mapped while adding the address [int ip6_rt_addr_add(struct in6_addr
> *addr, struct device *dev)]
>
> The address add routine[ip6_rt_addr_add] above is called when a new address
> is to be added when the flag is RTM_NEWADDR , and called by the function
> static void sit_add_v4_addrs(struct inet6_dev *idev).
>
> But when an Ipv6 address is added to a host, the function ip6_input is not
> mapped to dst->input, in which case the host cannot recive the packet with
> that IPv6 address?
>
> Thanks and Regards
> Abdul Khaliq
--
James R. Leu
|