Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 1998 23:11:10 -0500 (EST)
From:      "Matthew N. Dodd" <winter@jurai.net>
To:        Archie Cobbs <archie@whistle.com>
Cc:        Philippe Regnauld <regnauld@deepo.prosa.dk>, sthaug@nethelp.no, hackers@FreeBSD.ORG
Subject:   Re: IP tunnels
Message-ID:  <Pine.BSF.3.96.980215230646.9437B-100000@sasami.jurai.net>
In-Reply-To: <199802152040.MAA25372@bubba.whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help

I'm playing around with code to implement IP-ENCAP(4), IPIP(94), and
ENCAP(98) in the kernel.  Would it not be useful to define a driver
framework that would allow easy extension to add GRE support and PPTP?

I've been tossing a few ideas around but have not come up with something
concrete.

Doing this in userland with the tun device is fairly easy but a kernel
level driver would be really slick.

On Sun, 15 Feb 1998, Archie Cobbs wrote:
> 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

/* 
   Matthew N. Dodd		| A memory retaining a love you had for life	
   winter@jurai.net		| As cruel as it seems nothing ever seems to
   http://www.jurai.net/~winter | go right - FLA M 3.1:53	
*/


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?Pine.BSF.3.96.980215230646.9437B-100000>