LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: shemminger@linux-foundation.org (Stephen Hemminger)
Cc: pvjuliet@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: Change In sk_buff structure in 2.6.22 kernel
Date: Thu, 31 Jan 2008 11:41:49 +1100	[thread overview]
Message-ID: <E1JKNUz-0000jh-00@gondolin.me.apana.org.au> (raw)
In-Reply-To: <20080129222729.1f4fef95@deepthought>

Stephen Hemminger <shemminger@linux-foundation.org> wrote:
>
>> Networking code and drivers are supposed to use skb->transport_header,
>> skb->network_header, and skb->skb_mac_header.
>> But when I am trying to access fields of TCP using the code
>> struct tcphdr *tcp = skb->transport_header;
>> tcp->   //accessing proper field
>> It is not accessing the value properly ...
>> Can anyone please help me ???
>
> Use the new accessor functions skb_transport_header(skb), skb_network_header(skb),

There are also protocol helpers like tcp_hdr.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2008-01-31  0:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30  5:19 PV Juliet
2008-01-30  6:27 ` Stephen Hemminger
2008-01-31  0:41   ` Herbert Xu [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=E1JKNUz-0000jh-00@gondolin.me.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pvjuliet@gmail.com \
    --cc=shemminger@linux-foundation.org \
    --subject='Re: Change In sk_buff structure in 2.6.22 kernel' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).