From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 10 02:10:25 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 B5FC116A4CE for ; Fri, 10 Sep 2004 02:10:25 +0000 (GMT) Received: from ownage.digital-security.org (digital-security.org [216.254.116.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D7C543D4C for ; Fri, 10 Sep 2004 02:10:25 +0000 (GMT) (envelope-from vxp@ownage.digital-security.org) Received: from localhost.tmok.com ([127.0.0.1] helo=localhost) by ownage.digital-security.org with esmtp (Exim 4.41 (FreeBSD)) id 1C5ZNX-0000xp-6k for freebsd-hackers@freebsd.org; Thu, 09 Sep 2004 20:35:04 -0400 Date: Thu, 9 Sep 2004 20:35:03 -0400 (EDT) From: vxp To: freebsd-hackers@freebsd.org Message-ID: <20040909203444.G3681@ownage.digital-security.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -4.1 (----) 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: (-4.1 points, 3.0 required) pts rule name description --------------------------------------------------1% [score: 0.0000] 0.8 AWL AWL: Auto-whitelist adjustment X-Mailman-Approved-At: Fri, 10 Sep 2004 12:33:14 +0000 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:10:25 -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