From owner-freebsd-hackers Tue Oct 6 19:12:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA10954 for freebsd-hackers-outgoing; Tue, 6 Oct 1998 17:36:18 -0700 (PDT) (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 RAA10764 for ; Tue, 6 Oct 1998 17:35:28 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id RAA21505; Tue, 6 Oct 1998 17:35:18 -0700 (PDT) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma021500; Tue Oct 6 17:34:58 1998 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id RAA07525; Tue, 6 Oct 1998 17:34:57 -0700 (PDT) From: Archie Cobbs Message-Id: <199810070034.RAA07525@bubba.whistle.com> Subject: Re: GRE support in FreeBSD? In-Reply-To: from "David E. Cross" at "Oct 6, 98 03:34:40 pm" To: crossd@null.cs.rpi.edu (David E. Cross) Date: Tue, 6 Oct 1998 17:34:57 -0700 (PDT) Cc: freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (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 David E. Cross writes: > > > > What would be required to add GRE support (IP Protocol 47, RFC > > > > 1701,1702) to FreeBSD? > > > > > > Ask archie@whistle.com, since he's already done it. > > > > > > Alternatively, look at one of the two IPSEC implementations for > > > FreeBSD, as announced on -current. > > > > Actually I just opened a raw socket: > > > > s = socket(PF_INET, SOCK_RAW, IPPROTO_GRE); > > > > and sniffed out the sub-protocol number I was looking for in > > user-land. > > > > Alternately you could have the kernel do the (de)multiplexing by > > adding a block for IPPROTO_GRE to /sys/netinet/in_proto.c and > > adding the necessary socket stuff. > Yes, I am currently doing it in userland, I was referring to adding it > into the kernel. Well, to answer your original question, take a look in /sys/netinet and the example of IPDIVERT (or IPIP, or..) - in_proto.c: add to protosw - ip_divert.c: add your socket routines Etc.. -Archie ___________________________________________________________________________ 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