2 * Copyright (c) 2008, 2009 Nicira Networks.
4 * This file is offered under your choice of two licenses: Apache 2.0 or GNU
5 * GPL 2.0 or later. The permission statements for each of these licenses is
6 * given below. You may license your modifications to this file under either
7 * of these licenses or both. If you wish to license your modifications under
8 * only one of these licenses, delete the permission text for the other
11 * ----------------------------------------------------------------------
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at:
16 * http://www.apache.org/licenses/LICENSE-2.0
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 * ----------------------------------------------------------------------
24 * This program is free software; you can redistribute it and/or modify
25 * it under the terms of the GNU General Public License as published by
26 * the Free Software Foundation; either version 2 of the License, or
27 * (at your option) any later version.
29 * This program is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU General Public License for more details.
34 * You should have received a copy of the GNU General Public License along
35 * with this program; if not, write to the Free Software Foundation, Inc.,
36 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
37 * ----------------------------------------------------------------------
40 #ifndef OPENVSWITCH_GRE_H
41 #define OPENVSWITCH_GRE_H 1
43 #include <linux/if_tunnel.h>
44 #include <linux/version.h>
46 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
47 #define GRE_IOCTL_ONLY
48 #elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
65 #define IFLA_GRE_MAX (__IFLA_GRE_MAX - 1)
68 #define GRE_IOCTL_DEVICE "gre0"
70 #define SIOCGETGRETAP SIOCGETTUNNEL
71 #define SIOCADDGRETAP (SIOCDEVPRIVATE + 10)
72 #define SIOCDELGRETAP SIOCDELTUNNEL
73 #define SIOCCHGGRETAP (SIOCDEVPRIVATE + 11)
75 #endif /* openvswitch/gre.h */