Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 1998 12:40:08 -0800 (PST)
From:      Archie Cobbs <archie@whistle.com>
To:        regnauld@deepo.prosa.dk (Philippe Regnauld)
Cc:        sthaug@nethelp.no, hackers@FreeBSD.ORG
Subject:   Re: IP tunnels
Message-ID:  <199802152040.MAA25372@bubba.whistle.com>
In-Reply-To: <19980213100658.20479@deepo.prosa.dk> from Philippe Regnauld at "Feb 13, 98 10:06:58 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Philippe Regnauld writes:
> sthaug@nethelp.no writes:
> > > If no code is available,
> > > and there is interest, I may hack something up over the weekend. Cisco ha
> > > their own tunneling protocol (I forget exactly what TLA they use to name 
> > 
> > GRE.
> 
> 	I believe Linux has support for this (so I heard).

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

___________________________________________________________________________
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?199802152040.MAA25372>