From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 10 02:13:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49ADD16A4CE for ; Fri, 10 Sep 2004 02:13:46 +0000 (GMT) Received: from digital-security.org (digital-security.org [216.254.116.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF44B43D3F for ; Fri, 10 Sep 2004 02:13:45 +0000 (GMT) (envelope-from vxp@digital-security.org) Received: from digital-security.org ([216.254.116.252] helo=ownage.digital-security.org) by digital-security.org with esmtp (Exim 4.41 (FreeBSD)) id 1C5ZQl-0000yP-Q0 for freebsd-hackers@freebsd.org; Thu, 09 Sep 2004 20:38:25 -0400 Date: Thu, 9 Sep 2004 20:38:23 -0400 (EDT) From: vxp To: freebsd-hackers@freebsd.org Message-ID: <20040909203816.J3744@digital-security.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -2.5 (--) X-Spam-Report: Spam detection software, running on the system "ownage.digital-security.org", hasmessageblock similar future email. If you have any questions, see the administrator of that system for details.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 likemy stuff? [...] Content analysis details: (-2.5 points, 3.0 required) pts rule name description --------------------------------------------------1% [score: 0.0000] 2.5 AWL AWL: Auto-whitelist adjustment Subject: header file related question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2004 02:13:46 -0000 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