From owner-freebsd-questions@FreeBSD.ORG Tue Jan 10 12:09:15 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D75E116A41F for ; Tue, 10 Jan 2006 12:09:15 +0000 (GMT) (envelope-from SP373@student.apu.ac.uk) Received: from mailhub-out.apu.ac.uk (mailhub-out.apu.ac.uk [193.63.55.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 314C043D66 for ; Tue, 10 Jan 2006 12:09:14 +0000 (GMT) (envelope-from SP373@student.apu.ac.uk) Received: from smtp.cam.apu.ac.uk ([193.63.55.9]:51259) by mailhub.anglia.ac.uk with esmtp (Exim 4.50) id 1EwIHR-0005v4-40 for freebsd-questions@freebsd.org; Tue, 10 Jan 2006 12:07:13 +0000 Received: from cam-netmail.netware.anglia.ac.uk ([194.83.45.141]:10522 helo=student.apu.ac.uk) by boswell.cam.apu.ac.uk with esmtp (Exim 4.50) id 1EwIEH-0006y2-56 for freebsd-questions@freebsd.org; Tue, 10 Jan 2006 12:03:57 +0000 Received: from SP373 [172.212.93.178] by student.apu.ac.uk with NetMail ModWeb Module; Tue, 10 Jan 2006 12:03:51 +0000 From: "SPYRIDON PAPADOPOULOS" To: freebsd-questions@freebsd.org Date: Tue, 10 Jan 2006 12:03:51 +0000 X-Mailer: NetMail ModWeb Module X-Sender: SP373 MIME-Version: 1.0 Message-ID: <1136894631.20dec60SP373@student.apu.ac.uk> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ARU-HELO: smtp.cam.apu.ac.uk X-ARU-sender-host: smtp.cam.apu.ac.uk [193.63.55.9]:51259 X-ARU-MailScanner-Info: see http://www.apu.ac.uk/mail-problems X-ARU-MailScanner: Found to be clean X-ARU-SpamCheck: not spam, SpamAssassin (score=-5.799, required 6, autolearn=not spam, ARU_FROM_AC_UK -4.00, AWL 0.67, BAYES_00 -2.60, FORGED_RCVD_HELO 0.14) X-ARU-MailScanner-From: sp373@student.apu.ac.uk X-APU-MailFilter: message scanned X-ARU-MailFilter: message scanned Subject: ip_icmp.h strange problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: SP373@student.apu.ac.uk List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 12:09:16 -0000 Hi, I am include ip_icmp.h to a program. The icmp struct in there is exactly th= e same with the one on: http://fxr.watson.org/fxr/source/netinet/ip_icmp.h?v=3DTRUSTEDBSD-AUDIT3=20 (this is just the first exactly the same struct i found online) I am using FreeBSD 5.4-RELEASE #1 I have already included header files like tcp.h, ip.h, udp.h etc in my prog= ram. Now when i am trying to compile my program with the command: #gcc -o capTool capTool0.1 -lpcap it gives me syntax errors, where n_short values appear: lines: 60, 61, 67, = 68 and 89 (in my ip_icmp.h). 71, 72, 78, 79 and 100 (on the online one). After changing the first four to "u_short ..." it compiles properly... This also happened with some value in ip.h. However i am not sure which one= now, because i changed it and it worked immediately (so i didn't even no= te what exactly i changed..and since it worked to be honest i didn't mind= ) the problem is with the value in line 89: n_time its_otime; /* Originate */ even if i change that to: u_time its_otime; /* Originate */ it still gives me syntax error before "n_time" or "u_time" Can anyone help and explain briefly - if possible - how is this happening? = I cannot believe that the n_* values are wrong, but are working when chan= ging them to u_*. I like getting involved with the system header files...but it doesn't reall= y look appropriate to me ;o), or it is? This message is written quickly in case the problem is known. I can provide= with any required information if needed. Please advice thank you in advance Spiros Papadopoulos