Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
But still can't work.
Error message:
icmpid/xt_icmpid.c: In function 'match':
icmpid/xt_icmpid.c:48:16: error: implicit declaration of function 'ip_hdr'
icmpid/xt_icmpid.c:48:29: warning: initialization makes pointer from integer without a cast
icmpid/xt_icmpid.c:53:43: error: dereferencing pointer to incomplete type
icmpid/xt_icmpid.c:55:13: error: dereferencing pointer to incomplete type
Does anyone know how to modify it? thanks for any help~
in order to help you we need some basic information:
- what are your distribution and version?
- why so huge a jump (from 2.6.17 to 2.6.39)? wouldn't it be simpler to upgrade your distribution's version, or to install a newer one?
- do you try to compile a vanilla kernel (coming directly from kernel.org) or an already patched one?
- how did you configure your kernel? Did you re-use an old ".config" and issued a "make oldconfig" or not?
- which kernel module is involved?
- what are the exact error messages you got before modifying the code?
Last edited by Didier Spaier; 06-25-2012 at 02:12 PM.
- what are your distribution and version?
Fedora 5 to Fedora 14
- why so huge a jump (from 2.6.17 to 2.6.39)? wouldn't it be simpler to upgrade your distribution's version, or to install a newer one?
Install a newer one
- do you try to compile a vanilla kernel (coming directly from kernel.org) or an already patched one?
Coming directly from kernel.org
- how did you configure your kernel? Did you re-use an old ".config" and issued a "make oldconfig" or not?
The problem is caused by kernel 2.6.22 redefined new skbuff.h,all structure were changed.
2.4.x~2.6.22 has an old structure. >2.6.22 has a new structure.
- which kernel module is involved?
No other kernel module is involved.
- what are the exact error messages you got before modifying the code?
46 //#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
47 //struct iphdr *iph = ip_hdr(skb);
48 //#else
49 struct iphdr *iph = skb->nh.iph;
50 //#endif
51 struct icmphdr *icmp = (void *)iph + iph->ihl * 4 ;
52
53 if(!(iph->protocol == IPPROTO_ICMP))
54 return ((0) ^ info->invert);
icmpid/xt_icmpid.c: In function 'match':
icmpid/xt_icmpid.c:49:32: error: 'struct sk_buff' has no member named 'nh'
icmpid/xt_icmpid.c:51:43: error: dereferencing pointer to incomplete type
icmpid/xt_icmpid.c:53:13: error: dereferencing pointer to incomplete type
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.