Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-25-2012, 05:39 AM   #1
LQ Newbie
Registered: May 2012
Posts: 5

Rep: Reputation: Disabled
Angry error: ‘struct sk_buff’ has no member named ‘dst’

hi all...

i have some patch of code which use sk_buff structure.
while (out_queue.count > 0) {
int rc;
Entry *e;

skb = out_queue.head;

e = lookup_table(&mac_domid_map, skb->dst->neighbour->ha);

rc = xmit_large_pkt(skb, e->bfh->out);

if (rc < 0) {



while compliling i getting this erreo:error: ‘struct sk_buff’ has no member named ‘dst’
my linux kernel information is :

can somebody please help??
Old 05-25-2012, 07:57 AM   #2
Senior Member
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
In the 3.2, at least, It's true, there is no dst member in struct sk_buff.

Look at the definition in ./include/linux/skbuff.h, and you can see this clearly.

There is a struct dst_entry, which has _neighbour field.

There is also a fucntion:

static inline struct dst_entry *skb_dst(const struct sk_buff *skb)
So, if you have a struct sk_buff, you can use that to get a dst_entry, and then you can access neighbor.

In other words,

would need to become:

Or similar, for ~3.2 series kernels.
1 members found this post helpful.
Old 05-29-2012, 01:32 AM   #3
LQ Newbie
Registered: May 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
thank you so much jhwilliams...

Ya u were correct, i modified my code and now i am able to compile it successfully.

Actually the source code which i have is supposed to run with but my requirement is to make it done for 2.6.32-71.el6.i686. So i thought may be if i will modify the source code according to new kernel version the problem will be solved..but when i tried to load the .ko files (insmod ***.ko) it showing me this error:insmod: error inserting 'xenloop.ko': -1 Invalid module format
after checking the log (dmesg) i got this information->disagrees about version of symbol module_layout

I am new to handling kernel things can somebody please help me...



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] error: 'struct tty_struct' has no member named 'device' vlzj Programming 4 04-11-2012 08:58 PM
[SOLVED] struct sk_buff has no member named 'nh' vdx Linux - Kernel 2 05-25-2011 05:07 AM
error: ‘struct in6_addr’ has no member named ‘in6_u’ deb1513 Programming 1 12-02-2008 07:56 AM
error: 'struct SDL_SysWMinfo' has no member named 'info' TiDjY Linux - Desktop 4 11-24-2008 07:00 AM
error: ‘struct inode’ has no member named ‘u’ PankajDS Linux - Kernel 0 02-26-2008 12:34 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration