2008-09-09 03:36:53 +04:00
|
|
|
/* $NetBSD: if_gre.h,v 1.39 2008/09/08 23:36:55 gmcgarry Exp $ */
|
1998-09-14 00:27:47 +04:00
|
|
|
|
|
|
|
/*
|
2008-05-15 08:03:53 +04:00
|
|
|
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
|
2008-05-04 16:59:38 +04:00
|
|
|
* All rights reserved.
|
1998-09-14 00:27:47 +04:00
|
|
|
*
|
|
|
|
* This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
* by Heiko W.Rupp <hwr@pilhuhn.de>
|
|
|
|
*
|
2008-05-15 08:03:53 +04:00
|
|
|
* This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
* by David Young <dyoung@NetBSD.org>
|
|
|
|
*
|
1998-09-14 00:27:47 +04:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
2005-02-27 01:45:09 +03:00
|
|
|
*
|
1998-09-14 00:27:47 +04:00
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
2008-05-15 08:03:53 +04:00
|
|
|
*
|
|
|
|
* This material is based upon work partially supported by NSF
|
|
|
|
* under Contract No. NSF CNS-0626584.
|
1998-09-14 00:27:47 +04:00
|
|
|
*/
|
|
|
|
|
2005-12-11 02:21:38 +03:00
|
|
|
#ifndef _NET_IF_GRE_H_
|
|
|
|
#define _NET_IF_GRE_H_
|
1998-09-14 00:27:47 +04:00
|
|
|
|
2008-02-12 03:53:06 +03:00
|
|
|
#include <sys/evcnt.h>
|
2000-07-05 22:14:13 +04:00
|
|
|
#include <sys/queue.h>
|
2007-05-06 06:47:52 +04:00
|
|
|
#include <sys/mutex.h>
|
|
|
|
#include <sys/condvar.h>
|
Work in progress: use a raw socket for GRE in IP encapsulation
instead of adding/subtracting our own IPv4 header.
There are many benefits: gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code. The IP
stack needn't grok GRE, so it is simplified, too. gre(4) will
benefit from optimizations in the socket code. Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.
There is a small performance loss. A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code. TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code. A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.
I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use. They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.
A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.
Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
2007-10-05 07:28:12 +04:00
|
|
|
#include <sys/malloc.h>
|
|
|
|
#include <sys/mallocvar.h>
|
2000-07-05 22:14:13 +04:00
|
|
|
|
2006-08-31 21:46:16 +04:00
|
|
|
#ifdef _KERNEL
|
|
|
|
struct gre_soparm {
|
2008-05-10 00:14:07 +04:00
|
|
|
struct socket *sp_so;
|
Work in progress: use a raw socket for GRE in IP encapsulation
instead of adding/subtracting our own IPv4 header.
There are many benefits: gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code. The IP
stack needn't grok GRE, so it is simplified, too. gre(4) will
benefit from optimizations in the socket code. Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.
There is a small performance loss. A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code. TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code. A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.
I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use. They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.
A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.
Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
2007-10-05 07:28:12 +04:00
|
|
|
struct sockaddr_storage sp_src; /* source of gre packets */
|
|
|
|
struct sockaddr_storage sp_dst; /* destination of gre packets */
|
|
|
|
int sp_type; /* encapsulating socket type */
|
|
|
|
int sp_proto; /* encapsulating protocol */
|
2008-05-10 00:14:07 +04:00
|
|
|
bool sp_bysock; /* encapsulation configured by passing
|
Work in progress: use a raw socket for GRE in IP encapsulation
instead of adding/subtracting our own IPv4 header.
There are many benefits: gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code. The IP
stack needn't grok GRE, so it is simplified, too. gre(4) will
benefit from optimizations in the socket code. Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.
There is a small performance loss. A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code. TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code. A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.
I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use. They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.
A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.
Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
2007-10-05 07:28:12 +04:00
|
|
|
* socket, not by SIOCSLIFPHYADDR
|
|
|
|
*/
|
2006-08-31 21:46:16 +04:00
|
|
|
};
|
|
|
|
|
Work in progress: use a raw socket for GRE in IP encapsulation
instead of adding/subtracting our own IPv4 header.
There are many benefits: gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code. The IP
stack needn't grok GRE, so it is simplified, too. gre(4) will
benefit from optimizations in the socket code. Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.
There is a small performance loss. A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code. TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code. A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.
I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use. They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.
A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.
Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
2007-10-05 07:28:12 +04:00
|
|
|
enum gre_state {
|
|
|
|
GRE_S_IDLE = 0
|
2007-10-06 07:30:25 +04:00
|
|
|
, GRE_S_IOCTL
|
Work in progress: use a raw socket for GRE in IP encapsulation
instead of adding/subtracting our own IPv4 header.
There are many benefits: gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code. The IP
stack needn't grok GRE, so it is simplified, too. gre(4) will
benefit from optimizations in the socket code. Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.
There is a small performance loss. A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code. TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code. A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.
I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use. They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.
A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.
Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
2007-10-05 07:28:12 +04:00
|
|
|
, GRE_S_DIE
|
|
|
|
};
|
|
|
|
|
2008-09-09 03:36:53 +04:00
|
|
|
#define __cacheline_aligned __aligned(CACHE_LINE_SIZE)
|
Work in progress: use a raw socket for GRE in IP encapsulation
instead of adding/subtracting our own IPv4 header.
There are many benefits: gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code. The IP
stack needn't grok GRE, so it is simplified, too. gre(4) will
benefit from optimizations in the socket code. Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.
There is a small performance loss. A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code. TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code. A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.
I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use. They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.
A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.
Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
2007-10-05 07:28:12 +04:00
|
|
|
|
|
|
|
struct gre_bufq {
|
|
|
|
volatile int bq_prodidx;
|
|
|
|
volatile int bq_considx;
|
|
|
|
size_t bq_len __cacheline_aligned;
|
|
|
|
size_t bq_lenmask;
|
|
|
|
volatile int bq_drops;
|
|
|
|
struct mbuf **bq_buf;
|
|
|
|
};
|
|
|
|
|
|
|
|
MALLOC_DECLARE(M_GRE_BUFQ);
|
|
|
|
|
2008-05-10 00:14:07 +04:00
|
|
|
enum gre_msg {
|
|
|
|
GRE_M_NONE = 0
|
|
|
|
, GRE_M_SETFP
|
|
|
|
, GRE_M_DELFP
|
|
|
|
, GRE_M_STOP
|
|
|
|
, GRE_M_OK
|
|
|
|
, GRE_M_ERR
|
|
|
|
};
|
|
|
|
|
1998-09-14 00:27:47 +04:00
|
|
|
struct gre_softc {
|
2006-08-31 21:46:16 +04:00
|
|
|
struct ifnet sc_if;
|
2007-05-06 06:47:52 +04:00
|
|
|
kmutex_t sc_mtx;
|
Work in progress: use a raw socket for GRE in IP encapsulation
instead of adding/subtracting our own IPv4 header.
There are many benefits: gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code. The IP
stack needn't grok GRE, so it is simplified, too. gre(4) will
benefit from optimizations in the socket code. Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.
There is a small performance loss. A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code. TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code. A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.
I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use. They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.
A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.
Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
2007-10-05 07:28:12 +04:00
|
|
|
kcondvar_t sc_condvar;
|
2008-05-10 00:14:07 +04:00
|
|
|
kcondvar_t sc_fp_condvar;
|
Work in progress: use a raw socket for GRE in IP encapsulation
instead of adding/subtracting our own IPv4 header.
There are many benefits: gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code. The IP
stack needn't grok GRE, so it is simplified, too. gre(4) will
benefit from optimizations in the socket code. Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.
There is a small performance loss. A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code. TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code. A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.
I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use. They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.
A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.
Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
2007-10-05 07:28:12 +04:00
|
|
|
struct gre_bufq sc_snd;
|
2006-09-01 05:34:05 +04:00
|
|
|
struct gre_soparm sc_soparm;
|
Work in progress: use a raw socket for GRE in IP encapsulation
instead of adding/subtracting our own IPv4 header.
There are many benefits: gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code. The IP
stack needn't grok GRE, so it is simplified, too. gre(4) will
benefit from optimizations in the socket code. Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.
There is a small performance loss. A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code. TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code. A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.
I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use. They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.
A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.
Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
2007-10-05 07:28:12 +04:00
|
|
|
volatile enum gre_state sc_state;
|
|
|
|
volatile int sc_waiters;
|
2008-05-10 00:14:07 +04:00
|
|
|
volatile int sc_fp_waiters;
|
Work in progress: use a raw socket for GRE in IP encapsulation
instead of adding/subtracting our own IPv4 header.
There are many benefits: gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code. The IP
stack needn't grok GRE, so it is simplified, too. gre(4) will
benefit from optimizations in the socket code. Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.
There is a small performance loss. A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code. TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code. A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.
I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use. They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.
A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.
Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
2007-10-05 07:28:12 +04:00
|
|
|
void *sc_si;
|
|
|
|
|
|
|
|
struct evcnt sc_recv_ev;
|
|
|
|
struct evcnt sc_send_ev;
|
|
|
|
|
|
|
|
struct evcnt sc_block_ev;
|
|
|
|
struct evcnt sc_error_ev;
|
|
|
|
struct evcnt sc_pullup_ev;
|
|
|
|
struct evcnt sc_unsupp_ev;
|
|
|
|
struct evcnt sc_oflow_ev;
|
2008-05-10 00:14:07 +04:00
|
|
|
file_t * volatile sc_fp;
|
|
|
|
volatile enum gre_msg sc_msg;
|
|
|
|
int sc_fd;
|
2005-02-27 01:45:09 +03:00
|
|
|
};
|
2007-08-30 09:54:07 +04:00
|
|
|
|
1998-09-14 00:27:47 +04:00
|
|
|
struct gre_h {
|
Work in progress: use a raw socket for GRE in IP encapsulation
instead of adding/subtracting our own IPv4 header.
There are many benefits: gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code. The IP
stack needn't grok GRE, so it is simplified, too. gre(4) will
benefit from optimizations in the socket code. Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.
There is a small performance loss. A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code. TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code. A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.
I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use. They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.
A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.
Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
2007-10-05 07:28:12 +04:00
|
|
|
uint16_t flags; /* GRE flags */
|
|
|
|
uint16_t ptype; /* protocol type of payload typically
|
|
|
|
* ethernet protocol type
|
|
|
|
*/
|
2005-02-27 01:45:09 +03:00
|
|
|
/*
|
|
|
|
* from here on: fields are optional, presence indicated by flags
|
1998-09-14 00:27:47 +04:00
|
|
|
*
|
2001-05-10 05:23:51 +04:00
|
|
|
u_int_16 checksum checksum (one-complements of GRE header
|
|
|
|
and payload
|
|
|
|
Present if (ck_pres | rt_pres == 1).
|
|
|
|
Valid if (ck_pres == 1).
|
|
|
|
u_int_16 offset offset from start of routing filed to
|
|
|
|
first octet of active SRE (see below).
|
|
|
|
Present if (ck_pres | rt_pres == 1).
|
|
|
|
Valid if (rt_pres == 1).
|
|
|
|
u_int_32 key inserted by encapsulator e.g. for
|
|
|
|
authentication
|
|
|
|
Present if (key_pres ==1 ).
|
|
|
|
u_int_32 seq_num Sequence number to allow for packet order
|
|
|
|
Present if (seq_pres ==1 ).
|
|
|
|
struct gre_sre[] routing Routing fileds (see below)
|
|
|
|
Present if (rt_pres == 1)
|
|
|
|
*/
|
2007-12-25 21:33:32 +03:00
|
|
|
} __packed;
|
1998-09-14 00:27:47 +04:00
|
|
|
|
2001-05-10 05:23:51 +04:00
|
|
|
#define GRE_CP 0x8000 /* Checksum Present */
|
|
|
|
#define GRE_RP 0x4000 /* Routing Present */
|
|
|
|
#define GRE_KP 0x2000 /* Key Present */
|
|
|
|
#define GRE_SP 0x1000 /* Sequence Present */
|
1998-09-14 00:27:47 +04:00
|
|
|
#define GRE_SS 0x0800 /* Strict Source Route */
|
|
|
|
|
2001-05-10 05:23:51 +04:00
|
|
|
/*
|
|
|
|
* gre_sre defines a Source route Entry. These are needed if packets
|
|
|
|
* should be routed over more than one tunnel hop by hop
|
1998-09-14 00:27:47 +04:00
|
|
|
*/
|
|
|
|
struct gre_sre {
|
2008-02-20 20:05:52 +03:00
|
|
|
uint16_t sre_family; /* address family */
|
2001-05-10 05:23:51 +04:00
|
|
|
u_char sre_offset; /* offset to first octet of active entry */
|
2005-02-27 01:45:09 +03:00
|
|
|
u_char sre_length; /* number of octets in the SRE.
|
2001-05-10 05:23:51 +04:00
|
|
|
sre_lengthl==0 -> last entry. */
|
|
|
|
u_char *sre_rtinfo; /* the routing information */
|
1998-09-14 00:27:47 +04:00
|
|
|
};
|
|
|
|
|
2002-02-24 20:22:20 +03:00
|
|
|
#define GRE_TTL 30
|
|
|
|
extern int ip_gre_ttl;
|
2006-08-31 21:46:16 +04:00
|
|
|
#endif /* _KERNEL */
|
1998-09-30 09:59:27 +04:00
|
|
|
|
2005-02-27 01:45:09 +03:00
|
|
|
/*
|
|
|
|
* ioctls needed to manipulate the interface
|
1998-09-30 09:59:27 +04:00
|
|
|
*/
|
|
|
|
|
2001-05-10 05:23:51 +04:00
|
|
|
#define GRESADDRS _IOW('i', 101, struct ifreq)
|
2005-02-27 01:45:09 +03:00
|
|
|
#define GRESADDRD _IOW('i', 102, struct ifreq)
|
2001-05-10 05:23:51 +04:00
|
|
|
#define GREGADDRS _IOWR('i', 103, struct ifreq)
|
|
|
|
#define GREGADDRD _IOWR('i', 104, struct ifreq)
|
|
|
|
#define GRESPROTO _IOW('i' , 105, struct ifreq)
|
|
|
|
#define GREGPROTO _IOWR('i', 106, struct ifreq)
|
2006-09-01 05:34:05 +04:00
|
|
|
#define GRESSOCK _IOW('i' , 107, struct ifreq)
|
|
|
|
#define GREDSOCK _IOW('i' , 108, struct ifreq)
|
1998-09-14 00:27:47 +04:00
|
|
|
|
2005-12-11 02:21:38 +03:00
|
|
|
#endif /* !_NET_IF_GRE_H_ */
|