On Fri, 2004-09-10 at 02:38, vxp wrote: > hi, > > i realize it's most likely a stupid question, but try not to be too hard > on me please - i'm trying to learn :) > > i'm experimenting with the kernel's source, and i'm not quite sure how to > find what all the header files are that i need, for the stuff i'd like to > do.. how do i track down what header files i need to #include in my stuff? > > for instance, i'm trying to modify icmp_input() (found in > /sys/netinet/ip_icmp.c) and load the new function via a kernel module. > > so, i copied all the #include's from /sys/netinet/ip_icmp.c and only have > the icmp_input() function (unmodified right now, from the form i found > it), the header files from the original ip_icmp, and a main() that > simply returns 0. doesn't want to compile, with errors about header files > such as: > --------------- > In file included from icmp.c:37: > /usr/include/netinet/in_var.h:50: error: field `ia_ifa' has incomplete > type > In file included from /usr/include/netinet/in_var.h:238, > from icmp.c:37: > /usr/include/netinet6/in6_var.h:103: error: field `ia_ifa' has incomplete > type > --------------- > i realize that it's most likely because i didn't #include something else i > need.. but how come /sys/netinet/ip_icmp.c compiles, then? because this > file is basically that, with all functions but icmp_input removed, and a > main() that does nothing.. > > so.. sorry for the long post. > but please tell me how do i find out what header files i need ? :) > > thanks. >
Hi, just guessing: Did you compile with -D_KERNEL? HTH, Andreas
signature.asc
Description: This is a digitally signed message part