All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Michael Guntsche <mike@it-loops.com>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Porting the RTSP module to 2.6.22
Date: Mon, 30 Jul 2007 14:38:03 +0200	[thread overview]
Message-ID: <46ADDBAB.3050705@trash.net> (raw)
In-Reply-To: <D1E7007A-5FE3-4D88-8991-A9C1339F4EEB@it-loops.com>

Michael Guntsche wrote:
> Answering my own post.
> I already fixed the obvious mistake I made.
> On Jul 29, 2007, at 22:12, Michael Guntsche wrote:
> <snip>
> 
>> 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;
>> }
>>
> 
> Of course there is no need to change skb.
> Sorry for not checking this before sending the first E-Mail.
> 
> 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;
> }
> 
> The problem remains though that the "h" member is no longer existing.


That shouldn't be a problem since netfilter modules should basically
never use it anyway since its only valid for locally generated packets.
Use Jan's suggestion (or look at other modules) and skb_header_pointer.

      reply	other threads:[~2007-07-30 12:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46ADDBAB.3050705@trash.net \
    --to=kaber@trash.net \
    --cc=mike@it-loops.com \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.