From owner-freebsd-questions Wed Oct 13 9: 2:43 1999 Delivered-To: freebsd-questions@freebsd.org Received: from smtp13.bellglobal.com (smtp13.bellglobal.com [204.101.251.52]) by hub.freebsd.org (Postfix) with ESMTP id 2A668152BA for ; Wed, 13 Oct 1999 09:02:35 -0700 (PDT) (envelope-from a.genkin@utoronto.ca) Received: from main.wgaf.net (HSE-TOR-ppp22822.sympatico.ca [209.226.71.112]) by smtp13.bellglobal.com (8.8.5/8.8.5) with ESMTP id MAA18846 for ; Wed, 13 Oct 1999 12:04:33 -0400 (EDT) Received: from antipode by main.wgaf.net with local (Exim 2.05 #1 (Debian)) id 11bRxW-0000EY-00; Wed, 13 Oct 1999 13:13:02 -0400 To: freebsd-questions@freebsd.org Subject: Re: Where do I get libnet? References: <17878.939829631@axl.noc.iafrica.com> X-Home-Page: http://wgaf.dyndns.org Organization: Wgaf From: Arcady Genkin Date: 13 Oct 1999 13:13:02 -0400 In-Reply-To: Sheldon Hearn's message of "Wed, 13 Oct 1999 17:47:11 +0200" Message-ID: <87wvsrw5ep.fsf@main.wgaf.net> Lines: 104 User-Agent: Gnus/5.070097 (Pterodactyl Gnus v0.97) XEmacs/21.1 (Biscayne) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Sheldon Hearn writes: > > I need to complile a program, that requieres libnet.h and > > libnet-headers.h. > > I think libnet.h is a linux thing. Remove the #include lines and see > what things are undeclared. Tell us what they are and we'll be able to > help you find 'em. :-) Thanks, Sheldon. In fact, I'm trying to compile PPPoE (ppp over ethernet) driver, that was released originally for Linux. But I got it from a FreeBSD user, who said that he modified the code for FreeBSD. If I comment out the includes, I get the following stuff upon "make -k": gcc -funroll-loops -fomit-frame-pointer -pipe -Wall -pthread -g -DSAFE -c pppoe-discover.c -o pppoe-discover.o -I/usr/local/include -I/usr/local/include/libnet -L/usr/local/lib In file included from pppoe-discover.c:9: pppoe-discover.h:8: warning: `struct link_int' declared inside parameter list pppoe-discover.h:8: warning: its scope is only this definition or declaration, pppoe-discover.h:8: warning: which is probably not what you want. pppoe-discover.c:21: variable `broadcast' has initializer but incomplete type pppoe-discover.c:21: extra brace group at end of initializer for `broadcast' pppoe-discover.c:21: warning: excess elements in struct initializer after `broadcast' pppoe-discover.c:153: conflicting types for `pppoe_send_discover' pppoe-discover.h:8: previous declaration of `pppoe_send_discover' pppoe-discover.c: In function `pppoe_send_discover': pppoe-discover.c:156: warning: implicit declaration of function `malloc' pppoe-discover.c:156: `ETH_H' undeclared (first use this function) pppoe-discover.c:156: (Each undeclared identifier is reported only once pppoe-discover.c:156: for each function it appears in.) pppoe-discover.c:161: warning: implicit declaration of function `get_hwaddr' pppoe-discover.c:161: sizeof applied to an incomplete type pppoe-discover.c:161: warning: passing arg 2 of `memcpy' makes pointer from integer without a cast pppoe-discover.c:169: warning: implicit declaration of function `build_ethernet' pppoe-discover.c:171: invalid use of undefined type `struct ether_addr' pppoe-discover.c:177: warning: implicit declaration of function `write_link_layer' pppoe-discover.c:180: warning: implicit declaration of function `free' pppoe-discover.c: In function `PPPoE_SendPADR': pppoe-discover.c:221: `ETH_H' undeclared (first use this function) pppoe-discover.c:232: invalid use of undefined type `struct ether_addr' pppoe-discover.c: In function `PPPoE_HandleTag': pppoe-discover.c:257: warning: implicit declaration of function `strncmp' pppoe-discover.c:265: warning: assignment makes pointer from integer without a cast pppoe-discover.c:271: warning: assignment makes pointer from integer without a cast pppoe-discover.c: In function `pppoe_dump_ppp': pppoe-discover.c:324: sizeof applied to an incomplete type pppoe-discover.c: In function `pppoe_process_packet': pppoe-discover.c:483: sizeof applied to an incomplete type pppoe-discover.c: In function `pppoe_send_ppp': pppoe-discover.c:521: `ETH_H' undeclared (first use this function) pppoe-discover.c:532: invalid use of undefined type `struct ether_addr' pppoe-discover.c: At top level: pppoe-discover.c:89: storage size of `gPPPoEEthernetAddress' isn't known pppoe-discover.c:96: storage size of `saddr' isn't known *** Error code 1 (continuing) gcc -funroll-loops -fomit-frame-pointer -pipe -Wall -pthread -g -DSAFE -c main.c -o main.o -I/usr/local/include -I/usr/local/include/libnet -L/usr/local/lib In file included from main.c:7: pppoe-discover.h:8: warning: `struct link_int' declared inside parameter list pppoe-discover.h:8: warning: its scope is only this definition or declaration, pppoe-discover.h:8: warning: which is probably not what you want. main.c:11: field `ethernet' has incomplete type main.c:12: field `ip' has incomplete type main.c: In function `main': main.c:183: warning: implicit declaration of function `open_link_interface' main.c:183: warning: assignment makes pointer from integer without a cast main.c:190: warning: implicit declaration of function `get_hwaddr' main.c:190: sizeof applied to an incomplete type main.c:190: warning: passing arg 2 of `memcpy' makes pointer from integer without a cast main.c:193: invalid use of undefined type `struct ether_addr' main.c:194: invalid use of undefined type `struct ether_addr' main.c:195: invalid use of undefined type `struct ether_addr' main.c:196: invalid use of undefined type `struct ether_addr' main.c:197: invalid use of undefined type `struct ether_addr' main.c:198: invalid use of undefined type `struct ether_addr' main.c:227: invalid use of undefined type `struct ether_addr' main.c:228: invalid use of undefined type `struct ether_addr' main.c:229: invalid use of undefined type `struct ether_addr' main.c:230: invalid use of undefined type `struct ether_addr' main.c:231: invalid use of undefined type `struct ether_addr' main.c:232: invalid use of undefined type `struct ether_addr' main.c:252: warning: passing arg 1 of `pppoe_send_discover' from incompatible pointer type main.c: At top level: main.c:15: storage size of `saddr' isn't known *** Error code 1 (continuing) ./buildwrap %%%%%%%%%%%%%%%%%%%%%%%%% buildwrap %%%%%%%%%%%%%%%%%%%%%%%%%%%% list of interfaces: ed0 ed1 lo0 enter interface to be used for PPPoE: building pppoe-wrapper file %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% `all' not remade because of errors. I hope someone can help me out, because my ISP is going to shut down dhcp servers in a couple of days -- I'll have to switch to this PPPoE crap. If I don't have a FreeBSD driver by then, I'll have to temporarily move to Linux. Thanks! -- Arcady Genkin http://wgaf.dyndns.org "You should seek your enemy, you should wage your war -- a war for your opinions. And if your opinion is defeated, your honesty should still cry triumph over that!" (F. Nietzsche) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message