Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Oct 1998 17:34:57 -0700 (PDT)
From:      Archie Cobbs <archie@whistle.com>
To:        crossd@null.cs.rpi.edu (David E. Cross)
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: GRE support in FreeBSD?
Message-ID:  <199810070034.RAA07525@bubba.whistle.com>
In-Reply-To: <Pine.SGI.4.04.9810061533400.3218-100000@null.cs.rpi.edu> from "David E. Cross" at "Oct 6, 98 03:34:40 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810070034.RAA07525>