Networking Forums

Networking Forums > Computer Networking > Linux Networking > packet forwarding query

Reply
Thread Tools Display Modes

packet forwarding query

 
 
rahul8143
Guest
Posts: n/a

 
      04-14-2005, 01:36 PM
hello,
Following is code snippet from ip_forward function from ip_forward.c
in kernel source code
.........
dev2 = rt->u.dst.dev;
mtu = rt->u.dst.pmtu;

/*
* We now generate an ICMP HOST REDIRECT giving the route
* we calculated.
*/
if (rt->rt_flags&RTCF_DOREDIRECT && !opt->srr)
ip_rt_send_redirect(skb);

/* We are about to mangle packet. Copy it! */
if (skb_cow(skb, dev2->hard_header_len))
goto drop;
iph = skb->nh.iph;
...............

when router takes packet to forward does above code is written to
check if
next dst hop has different network device or if it is using different
hard_header_len so that skb_cow is called?
whats use of skb_cow in ip_forward?
I am using 2.4 series kernel.
regards,
rahul
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Packet Forwarding and mirroring george Linux Networking 0 12-08-2005 05:09 PM
Packet forwarding queries kernel.lover Linux Networking 0 01-30-2005 09:09 AM
Packet forwarding Manu J Linux Networking 5 09-14-2003 10:45 AM
packet forwarding luke Linux Networking 1 09-03-2003 06:11 PM
Packet forwarding Andy Zhang Linux Networking 3 08-02-2003 02:12 PM



1 2 3 4 5 6 7 8 9 10 11