[mpls-linux-general] question about skbuff
Status: Beta
Brought to you by:
jleu
From: Yan, X. Q. (Rex) <re...@lu...> - 2001-05-03 17:14:24
|
Hi James, I'm going to add some features into your mpls-linux code for our research use. I am confused with mpls_opcode_pop() and mpls_opcode_push(). In mpls_opcode_pop() Why do you need to shift the skb->h.raw and skb->nh.raw? My understanding is that all the L3/L4 headers remain in the same address, We do not need to shift skb->h.raw and skb->nh.raw ====================from mpls_opcode.c======= ... skb_pull(skb, sizeof(u32)); skb->h.raw += sizeof(u32); skb->nh.raw += sizeof(u32); ... ========================================== in mpls_opcode_push() ... /*if we have room between data and end of mac.raw*/ skb->push(o,sizeof(u32)); o->h.raw -= sizeof(u32); o->nh.raw -= sizeof(u32); ... /*if we have tailroom, just move the data down...*/ /* My understanding is YOU NEED TO ADJUST ALL TH POINTERS HERE IN THIS CASE */ .... I'm new to linux kernel, maybe its a very stupid question. Thanks in advance. Rex |