From owner-freebsd-hackers Tue Oct 6 15:05:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA08285 for freebsd-hackers-outgoing; Tue, 6 Oct 1998 15:05:37 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from alpha.xerox.com (omega.Xerox.COM [13.1.64.95]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id PAA08074 for ; Tue, 6 Oct 1998 15:04:37 -0700 (PDT) (envelope-from fenner@parc.xerox.com) Received: from crevenia.parc.xerox.com ([13.2.116.11]) by alpha.xerox.com with SMTP id <434016(2)>; Tue, 6 Oct 1998 15:04:20 PDT Received: from localhost by crevenia.parc.xerox.com with SMTP id <177476>; Tue, 6 Oct 1998 15:04:08 -0700 To: "David E. Cross" cc: freebsd-hackers@FreeBSD.ORG Subject: Re: GRE support in FreeBSD? In-reply-to: Your message of "Tue, 06 Oct 98 12:34:40 PDT." Date: Tue, 6 Oct 1998 15:03:59 PDT From: Bill Fenner Message-Id: <98Oct6.150408pdt.177476@crevenia.parc.xerox.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It wouldn't take much to add to the kernel. Look at ip_mroute.c's ipip_input() to see how it decapsulates ip proto 4, and at encap_send() to see how it encapsulates. You'd have to create real interfaces, which the multicast code doesn't do, but it's really fairly straightforward. I know that NetBSD is working on general IP proto 4 tunnels in the kernel and they have an API for setting the tunnel's IP source and destination. I don't know if they're doing GRE also, but perhaps you could look at what they're doing and see if it'd be applicable. I've thought for a while that there should be a generalized tunneling mechanism (e.g. hand the kernel an IP header to prepend with an ioctl and a bpf program to do decapsulation but otherwise live in the standard demux mechanism) but doing that right is too much more work than having N different tunneling mechanisms... Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message