From owner-freebsd-hackers Sun Feb 15 12:40:56 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA18768 for freebsd-hackers-outgoing; Sun, 15 Feb 1998 12:40:56 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA18759 for ; Sun, 15 Feb 1998 12:40:48 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id MAA23878; Sun, 15 Feb 1998 12:40:18 -0800 (PST) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma023876; Sun Feb 15 12:40:13 1998 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id MAA25372; Sun, 15 Feb 1998 12:40:08 -0800 (PST) From: Archie Cobbs Message-Id: <199802152040.MAA25372@bubba.whistle.com> Subject: Re: IP tunnels In-Reply-To: <19980213100658.20479@deepo.prosa.dk> from Philippe Regnauld at "Feb 13, 98 10:06:58 am" To: regnauld@deepo.prosa.dk (Philippe Regnauld) Date: Sun, 15 Feb 1998 12:40:08 -0800 (PST) Cc: sthaug@nethelp.no, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Philippe Regnauld writes: > sthaug@nethelp.no writes: > > > If no code is available, > > > and there is interest, I may hack something up over the weekend. Cisco ha > > > their own tunneling protocol (I forget exactly what TLA they use to name > > > > GRE. > > I believe Linux has support for this (so I heard). What a coincidence. I'm starting to play with GRE a little bit. I was simply going to open a raw IP socket with IPPROTO_GRE (47) and filter out sub-protocols that I don't want (by examining the GRE protocol field): s = socket(AF_INET, IPPROTO_RAW, 0); read(s, (char *) &packet, sizeof(packet)); if (packet.proto != 0x809b) break; /* process packet */ However, it might be useful to make GRE a supported kernel protocol. There would not be much code involved, but it would be kindof handy. So if you were tunneling AppleTalk, for example, you could say this: proto = 0x809b; /* Ethertype for AppleTalk */ s = socket(AF_INET, IPPROTO_GRE, proto); /* process packet */ You would still read and write complete GRE packets; the kernel would simply be mulitplexing incoming packets to sockets based on the GRE protocol number (in the above example, 0x0800). So different processes that were tunnelling different things could operate independently. Optionally, the kernel could provide slightly more service, like automatically filling in the checksum if the checksum bit is set, verifying incoming packets' checksums, etc. The question is.. is this something worth doing? If so, I'll can try to hack something up. -Archie References: RFC 1701, RFC 1702 ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message