From owner-freebsd-net Wed Mar 1 12:42:15 2000 Delivered-To: freebsd-net@freebsd.org Received: from muzak.iinet.net.au (muzak.iinet.net.au [203.59.24.237]) by hub.freebsd.org (Postfix) with ESMTP id 9C49B37BA9F for ; Wed, 1 Mar 2000 12:42:09 -0800 (PST) (envelope-from julian@elischer.org) Received: from jules.elischer.org (reggae-20-155.nv.iinet.net.au [203.59.85.155]) by muzak.iinet.net.au (8.8.5/8.8.5) with SMTP id EAA25582; Thu, 2 Mar 2000 04:41:53 +0800 Message-ID: <38BD806F.15FB7483@elischer.org> Date: Wed, 01 Mar 2000 12:41:19 -0800 From: Julian Elischer X-Mailer: Mozilla 3.04Gold (X11; I; FreeBSD 4.0-CURRENT i386) MIME-Version: 1.0 To: Archie Cobbs Cc: Alejandro Ramirez , net@freeBSD.org Subject: Re: GRE Support in 4.X ??? References: <200003012022.MAA71299@bubba.whistle.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Archie Cobbs wrote: > > > You can do GRE in FreeBSD without any modifications simply > by opening a raw IP socket. This is how mpd does it (actually > using ng_ksocket(8) to create the socket and ng_pptpgre(8) do > do the handling of the GRE packets). Ah that's how I was confused.. so we could add a generic GRE handling netgraph node as well, so you could do netgraphy tricks as well. > > However, really FreeBSD should have built-in support for GRE > so you could say, eg: > > s = socket(PF_INET, SOCK_DGRAM, IPPROTO_GRE); > > sin.sin_addr = 192.168.1.1; > sin.sin_port = 0x883E; // GRE protocol number > > bind(s, (struct sockaddr *)&sin, sizeof(sin)); > > It looks like they have done the first part (create the socket type) > but not the second part (allow you to bind to a specific GRE protocol). > > Instead, they hard code the squid protocol number 0x883E into the > kernel, turning GRE (generic routing encapsulation) into SRE (specific > routing encapsulation :-) > > These patches would not be necessary if they just used a raw socket. > On the other hand, we should add (complete) GRE support to FreeBSD > anyway. > > -Archie > -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 ---> X_.---._/ presently in: Perth v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message