Porting the RTSP module to 2.6.22
mike at it-loops.com
Mon Jul 30 17:52:57 CEST 2007
On Jul 29, 2007, at 22:21, Jan Engelhardt wrote:
> 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
> can also get rid of)
Thank you very very much Jan. With your tips and some poking in the
other modules I was able to get a compiling and more suprisingly
running version of the RTSP module.
The new and working function looks like this.
get_skb_tcpdata(struct sk_buff* skb, char** pptcpdata, uint*
struct iphdr* iph = ip_hdr(skb);
struct tcphdr* tcph = (void *)iph + ip_hdrlen(skb);
*pptcpdata = (char*)tcph + tcph->doff*4;
*ptcpdatalen = ((char*)skb_transport_header(skb) + skb->len) -
I am in the process of creating and updated patch against 184.108.40.206
and will put it up on my site this evening.
It is working for me right now, but maybe someone can give it a quick
check and tell me if there are any problems or bugs.
More information about the netfilter-devel