linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ratheesh k <ratheesh.ksz@gmail.com>
To: hong zhang <henryzhang62@yahoo.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: strcut casts unsigned long
Date: Fri, 13 Aug 2010 12:14:15 +0530	[thread overview]
Message-ID: <AANLkTikAiKKtzMcpt14W3veeiOe1JV57RyfG3L1L=OPh@mail.gmail.com> (raw)
In-Reply-To: <965738.16877.qm@web57908.mail.re3.yahoo.com>

On Fri, Aug 13, 2010 at 7:47 AM, hong zhang <henryzhang62@yahoo.com> wrote:
> List,
>
> I have C question on skbuff.h.
> skb->_skb_dst is defined as unsigned long and dst_entry is struct.
>
> Why strct dst_entry casts unsigned long skb->_skb_dst?
>
> See below
>
> static inline struct dst_entry *skb_dst(const struct sk_buff *skb)
> {
>        return (struct dst_entry *)skb->_skb_dst;
> }
>
> Appreciate any answer!
>
> --henry

skb->_skb_dst can be a pointer to both destination cache or  routing
table . We could type cast to any of those .

-Ratheesh











\\> --
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-08-13  6:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-13  2:17 strcut casts unsigned long hong zhang
2010-08-13  6:44 ` ratheesh k [this message]
2010-08-13 13:23   ` Javier Martinez Canillas
2010-08-13 21:25   ` hong zhang
2010-08-13 21:49     ` Javier Martinez Canillas

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='AANLkTikAiKKtzMcpt14W3veeiOe1JV57RyfG3L1L=OPh@mail.gmail.com' \
    --to=ratheesh.ksz@gmail.com \
    --cc=henryzhang62@yahoo.com \
    --cc=linux-c-programming@vger.kernel.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 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).