All of lore.kernel.org
 help / color / mirror / Atom feed
* Porting the RTSP module to 2.6.22
@ 2007-07-29 20:12 Michael Guntsche
  2007-07-29 20:21 ` Jan Engelhardt
  2007-07-29 20:27 ` Michael Guntsche
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Guntsche @ 2007-07-29 20:12 UTC (permalink / raw)
  To: netfilter-devel

Hello,

I am trying to forward port the RTSP module from 2.6.21 to 2.6.22 and  
I am nearly done. All there is missing is a helper function. I had a  
look at the skbuff struct but I could not find out what needed to be  
changed.

Here is the short original helper function.

static void
get_skb_tcpdata(struct sk_buff* skb, char** pptcpdata, uint*  
ptcpdatalen)
{
     struct iphdr*   iph  = (struct iphdr*)skb->nh.iph;
     struct tcphdr*  tcph = (struct tcphdr*)((char*)iph + iph->ihl*4);

     *pptcpdata = (char*)tcph + tcph->doff*4;
     *ptcpdatalen = ((char*)skb->h.raw + skb->len) - *pptcpdata;
}

I changed this to

static void
get_skb_tcpdata(struct sk_buff** skb, char** pptcpdata, uint*  
ptcpdatalen)
{
     struct iphdr*   iph  = ip_hdr(*skb);
     struct tcphdr*  tcph = (void *)iph + iph->ihl*4;

     *pptcpdata = (char*)tcph + tcph->doff*4;
     *ptcpdatalen = ((char*)skb->h.raw + skb->len) - *pptcpdata;
}

I am pretty sure, that the first three lines are ok. But the last one  
is giving me some problems, since "h" is no longer in the skb struct.
Maybe someone with a little bit more knowledge about the changes can  
help me here.

Kind regards,
Michael

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-07-30 15:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-29 20:12 Porting the RTSP module to 2.6.22 Michael Guntsche
2007-07-29 20:21 ` Jan Engelhardt
2007-07-30 15:52   ` Michael Guntsche
2007-07-29 20:27 ` Michael Guntsche
2007-07-30 12:38   ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.