Date: Thu, 9 Sep 2004 20:38:23 -0400 (EDT) From: vxp <vxp@digital-security.org> To: freebsd-hackers@freebsd.org Subject: header file related question Message-ID: <20040909203816.J3744@digital-security.org>
next in thread | raw e-mail | index | archive | help
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. Val
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040909203816.J3744>