Porting the RTSP module to 2.6.22

Jan Engelhardt jengelh at computergmbh.de
Sun Jul 29 22:21:46 CEST 2007


On Jul 29 2007 22:12, Michael Guntsche wrote:
>
> 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;

Use  (void *)iph + ip_hdrlen(*skb)

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

h.raw is now skb_transport_header(skb);
Also, skb-> should be (*skb)->, since it is a double pointer (which you
can also get rid of)

> 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.


	Jan
-- 



More information about the netfilter-devel mailing list