Networking Forums

Networking Forums > Computer Networking > Linux Networking > Packet forwarding queries

Reply
Thread Tools Display Modes

Packet forwarding queries

 
 
kernel.lover
Guest
Posts: n/a

 
      01-30-2005, 09:09 AM
Hello,
1) How Router knows destinations mtu. In IP forwarding case following
function is used that checks pmtu value to decide whether outgoing
packet is required to fragment a packet or not?
static inline int ip_send(struct sk_buff *skb)
{
if (skb->len > skb->dst->pmtu)
return ip_fragment(skb, ip_finish_output);
else
return ip_finish_output(skb);
}

2) Can anybody help me how following function works in calcualting
checksum?
static inline int ip_decrease_ttl(struct iphdr *iph)
{
u32 check = iph->check;
check += __constant_htons(0x0100);
iph->check = check + (check>=0xFFFF);
return --iph->ttl;
}
regards,
cranium
 
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 in Linux. rramesh1@gmail.com Linux Networking 1 10-30-2006 11:26 PM
packet forwarding query rahul8143 Linux Networking 0 04-14-2005 01:36 PM
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