Re: strcut casts unsigned long
hong zhang <[email protected]>
| Newsgroups | org.kernel.vger.linux-c-programming |
|---|---|
| Message-ID | <[email protected]> |
Ratheesh, Thanks for reply. But does skb->_skb_dst allocate memory any where? It is unsigned long. This is hard part for me to understand. Any explain why unsigned long _skb_dst can be that? ---henry --- On Fri, 8/13/10, ratheesh k <[email protected]> wrote: > From: ratheesh k <[email protected]> > Subject: Re: strcut casts unsigned long > To: "hong zhang" <[email protected]> > Cc: [email protected] > Date: Friday, August 13, 2010, 1:44 AM > On Fri, Aug 13, 2010 at 7:47 AM, hong > zhang <[email protected]> > 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 [email protected] > > 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html