From: "rahul N." <rahul8143@gmail.com>
To: netdev@oss.sgi.com
Subject: packet forwarding understandings
Date: Thu, 14 Apr 2005 19:16:56 +0530 [thread overview]
Message-ID: <d8d7db9905041406465f294834@mail.gmail.com> (raw)
hello,
Following is code snippet from ip_forward function from ip_forward.c
........
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 other threads:[~2005-04-14 13:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d8d7db9905041406465f294834@mail.gmail.com \
--to=rahul8143@gmail.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).