From owner-freebsd-hackers Wed Jun 4 00:40:02 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id AAA02891 for hackers-outgoing; Wed, 4 Jun 1997 00:40:02 -0700 (PDT) Received: from awfulhak.demon.co.uk (awfulhak.demon.co.uk [158.152.17.1]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id AAA02844 for ; Wed, 4 Jun 1997 00:39:56 -0700 (PDT) Received: from awfulhak.demon.co.uk (localhost [127.0.0.1]) by awfulhak.demon.co.uk (8.8.5/8.8.5) with ESMTP id IAA06107; Wed, 4 Jun 1997 08:38:04 +0100 (BST) Message-Id: <199706040738.IAA06107@awfulhak.demon.co.uk> X-Mailer: exmh version 1.6.9 8/22/96 To: MARK SAYER cc: "'freebsd-hackers@freebsd.org'" Subject: Re: IPPROTO_IPDIVERT undeclared error in natd In-reply-to: Your message of "Wed, 04 Jun 1997 11:04:42 +1000." <199706040107.SAA06532@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 04 Jun 1997 08:38:04 +0100 From: Brian Somers Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I'm happy to say that I am making progress with this...but still having > trouble. Trying to make the natd binaries..I finally got my in_cksum.h > and got passed that hurdle....but now I am getting an undeclared error > in the natd.c source. I get the following error at compilation: > > ===> alias > > ===> natd > > cc -O -Wall -g -I../alias -c natd.c > > natd.c: In function `main': > > natd.c:178: `IPPROTO_DIVERT' undeclared (first use this function) > > natd.c:178: (Each undeclared identifier is reported only once > > natd.c:178: for each function it appears in.) > > *** Error code 1 > > > > Stop. > > *** Error code 1 > > > > Stop. > > This is the source code that is referring to IPPROTO_IPDIVERT > > /* > > * Create divert sockets. Use only one socket if -p was specified > > * on command line. Otherwise, create separate sockets for > > * outgoing and incoming connnections. > > */ > > if (inOutPort) { > > > > divertInOut = socket (PF_INET, SOCK_RAW, > IPPROTO_DIVERT); > if (divertInOut == -1) > > Quit ("Unable to create divert socket."); > > > > divertIn = -1; > > divertOut = -1; > > Where should this have been declared? I have recompiled my kernel with > the IP_FIREWALL And IP_DIVERT options and am running Walnut Creek > FreeBSD 2.1.6-RELEASE #0 natd doesn't work in 2.1.*. The divert stuff wasn't stable enough. Certainly, if there was divert stuff there back then, the -p option doesn't work - you need the -i & -o options instead (there was a problem with the divert loopback avoidance code). > Mark. I'd suggest going to at least 2.2.1 if you want natd, otherwise use ppp -alias if you're masquerading on a serial interface. -- Brian , Don't _EVER_ lose your sense of humour....