Commit Graph

19 Commits

Author SHA1 Message Date
dyoung
51a6c2e769 Cosmetic: s/g_proto/sc_proto/.
(Straggler from last commit affecting net/if_gre.c, netinet/ip_gre.c.)
2006-11-16 22:32:38 +00:00
dyoung
9cc1c09a17 Rename gre_softc member sc_sp to sc_soparm to fix NetBSD/alpha
compiles, where some other system header #defines sc_sp.

In gre_ioctl, GREDSOCK case, do not try to delete sc_fp if it is
NULL.

Move GREDSOCK and GRESSOCK definitions to where the other GRE ioctls
are defined.

Remove #ifdef GRESSOCK, it's unnecessary now that the feature is
complete.
2006-09-01 01:34:05 +00:00
dyoung
47be766fd3 Add a mode to gre(4) that sends GRE tunnel packets in UDP datagrams.
Fix MOBILE encapsulation.  Add many debugging printfs (mainly
concerning UDP mode).  Clean up the gre(4) code a bit.  Add the
capability to setup UDP tunnels to ifconfig.  Update documentation.

In UDP mode, gre(4) puts a GRE header onto transmitted packets,
and hands them to a UDP socket for transmission.  That is, the
encapsulation looks like this: IP+UDP+GRE+encapsulated packet.

There are two ways to set up a UDP tunnel.  One way is to tell the
source and destination IP+port to gre(4), and let gre(4) create
the socket.  The other way to create a UDP tunnel is for userland
to "delegate" a UDP socket to the kernel.
2006-08-31 17:46:16 +00:00
thorpej
63eac52bac ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
elad
976bf6cfdd Multiple inclusion protection, as suggested by christos@ on tech-kern@
few days ago.
2005-12-10 23:21:38 +00:00
perry
f07677dd81 nuke trailing whitespace 2005-02-26 22:45:09 +00:00
wiz
ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
itojun
9636351c96 u_short -> u_int16_t 2003-09-05 23:02:40 +00:00
itojun
91b11e1eba prototype must not have variable name 2003-07-08 07:13:50 +00:00
martin
a7d662b71c Clear M_BCAST and M_MCAST on outgoing mbufs.
Don't copy ttl from the inner packet to the encapsulating packet. Make
the outer ttl sysctl'able. This should close PR 14269 from Jasper Wallace
(change partly from there) and it makes traceroute work over gre tunnels.
2002-02-24 17:22:20 +00:00
itojun
b87cb9344b whitespace/indentation cleanup 2001-05-10 01:23:51 +00:00
thorpej
c5293456da Adapt to bpfattach() changes, and further centralize the bpfattach()
and bpfdetach() calls into link-type subroutines where possible.
2000-12-12 18:00:22 +00:00
thorpej
9c86b65a92 Fix an omission in the gre cloning changes. 2000-07-05 22:45:25 +00:00
thorpej
4ec021cecf Make gre(4) a cloning network pseudo-device. 2000-07-05 18:14:13 +00:00
thorpej
e1ed9178a1 Add the `packed' attribute to structures which describe wire protocol
data formats.
1999-11-19 20:41:19 +00:00
thorpej
3322b9a32e Add an extern declaration of gre_softc[] here. Wrap it and the prototypes
in #ifdef _KERNEL.
1998-12-22 01:33:45 +00:00
thorpej
588ccb2d75 Fix some typos in comments, and clean up some whitespace. 1998-10-07 23:33:02 +00:00
hwr
eaccb9cd8d Start supporting IPPROTO_MOBILE (55) encapsulation. This is yet
another tunneling protocol used by the Mobile-IP people. See RFC 2004
for this.
1998-09-30 05:59:27 +00:00
hwr
366b9c4515 Add a gre tunnel pseudo network device. Gre = generic route encapsulation.
This device shows up like any other network interface and can be used to
tunnel L3 protocols as e.g. IP over IP.
1998-09-13 20:27:47 +00:00