Skip to contentSkip to conversation

"right" way to requeue a packet to IP from ip_rcv?

DISCUSSION David Meyer 1 participant 1 message Nov 23, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Folks,

I'm receiving an encapsulated packet that looks like

outer iph
outer udph
foreign header
inner iph
inner udph
data

What I'd like to do is strip off the outer IP, UDP and foreign headers in ip_rcv and requeue the packet to IP to process the rest of the packet (inner IP header, etc). What's the clean way to do this? In freeBSD you might do something like

(*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen);

but I'm not exactly sure what the analogous thing is for linux. Any insight greatly appreciated.

Thnx,

Dave