]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* $KAME: mip6_common.h,v 1.9 2000/03/25 07:23:50 sumikawa Exp $ */ |
2 | ||
3 | /* | |
4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | |
5 | * All rights reserved. | |
6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | |
15 | * 3. Neither the name of the project nor the names of its contributors | |
16 | * may be used to endorse or promote products derived from this software | |
17 | * without specific prior written permission. | |
18 | * | |
19 | * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND | |
20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE | |
23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
29 | * SUCH DAMAGE. | |
30 | */ | |
31 | ||
32 | /* | |
33 | * Copyright (c) 1999 and 2000 Ericsson Radio Systems AB | |
34 | * All rights reserved. | |
35 | * | |
36 | * Author: Hesham Soliman <hesham.soliman@ericsson.com.au> | |
37 | * Martti Kuparinen <martti.kuparinen@ericsson.com> | |
38 | */ | |
39 | ||
40 | ||
41 | #ifndef _NETINET6_MIP6_COMMON_H_ | |
42 | #define _NETINET6_MIP6_COMMON_H_ | |
43 | ||
44 | ||
45 | ||
46 | /* SIOCs used for communication between kernel and user space. | |
47 | * | |
48 | * SIOCSDEBUG_MIP6 Set MIP6 debug on/off | |
49 | * <mip6config -d> | |
50 | * SIOCSBCFLUSH_MIP6 Remove list of BC | |
51 | * <mip6stat -C> | |
52 | * SIOCSDEFCONFIG_MIP6 Restore default configuration | |
53 | * <mip6stat -P> | |
54 | * SIOCSBRUPDATE_MIP6 Set time when CN should send Binding request | |
55 | * <mip6config -w> | |
56 | * SIOCSENABLEBR_MIP6 Enable sending BR to the MN | |
57 | * <mip6config -q> | |
58 | * SIOCSHALISTFLUSH_MIP6 Remove list of Home Agents | |
59 | * <mip6stat -A> | |
60 | * SIOCSHAPREF_MIP6 HA preference | |
61 | * <mip6config -y> | |
62 | * SIOCSFWDSLUNICAST_MIP6 Enable forwarding of SL Unicast dest addresses | |
63 | * <mip6config -u> | |
64 | * SIOCSFWDSLMULTICAST_MIP6 Enable forwarding of SL Multicast dest addresses | |
65 | * <mip6config -m> | |
66 | * SIOCSFORADDRFLUSH_MIP6 Remove default foreign address from list | |
67 | * <mip6stat -F> | |
68 | * SIOCSHADDRFLUSH_MIP6 Remove Home Address | |
69 | * <mip6stat -M> | |
70 | * SIOCSBULISTFLUSH_MIP6 Remove Binding Update list | |
71 | * <mip6stat -U> | |
72 | * SIOCACOADDR_MIP6 Set Default foreign IP Address | |
73 | * <mip6config -F> | |
74 | * SIOCAHOMEADDR_MIP6 Add home address | |
75 | * <mip6config -H> | |
76 | * SIOCSBULIFETIME_MIP6 Set default BU lifetime | |
77 | * <mip6config -b> | |
78 | * SIOCSHRLIFETIME_MIP6 Set default lifetime for home registration, not BU | |
79 | * <mip6config -l> | |
80 | * SIOCDCOADDR_MIP6 Remove default foreign address from list | |
81 | * <mip6config -E> | |
82 | * SIOCSPROMMODE_MIP6 Enable link layer promiscuous mode | |
83 | * <mip6config -p> | |
84 | * SIOCSBU2CN_MIP6 Enable sending BU to CN, i.e. Route opt on/off | |
85 | * <mip6config -r> | |
86 | * SIOCSREVTUNNEL_MIP6 Enable tunneling of packets from MN to CN via HA | |
87 | * <mip6config -t> | |
88 | * SIOCSAUTOCONFIG_MIP6 Allow autoconfiguration of Home address | |
89 | * <mip6config -a> | |
90 | * SIOCSEAGERMD_MIP6 Enable eager Movement Detection | |
91 | * <mip6config -e> | |
92 | */ | |
93 | #define SIOCSDEBUG_MIP6 _IOWR('M', 1, struct mip6_input_data) | |
94 | #define SIOCSBCFLUSH_MIP6 _IOWR('M', 2, int) | |
95 | #define SIOCSDEFCONFIG_MIP6 _IOWR('M', 3, int) | |
96 | #define SIOCSBRUPDATE_MIP6 _IOWR('M', 4, u_int8_t) | |
97 | #define SIOCSENABLEBR_MIP6 _IOWR('M', 5, u_int8_t) | |
98 | ||
99 | #define SIOCSHALISTFLUSH_MIP6 _IOWR('M', 6, int) | |
100 | #define SIOCSHAPREF_MIP6 _IOWR('M', 7, int) | |
101 | #define SIOCSFWDSLUNICAST_MIP6 _IOWR('M', 8, int) | |
102 | #define SIOCSFWDSLMULTICAST_MIP6 _IOWR('M', 9, int) | |
103 | ||
104 | #define SIOCSFORADDRFLUSH_MIP6 _IOWR('M', 10, int) | |
105 | #define SIOCSHADDRFLUSH_MIP6 _IOWR('M', 11, int) | |
106 | #define SIOCSBULISTFLUSH_MIP6 _IOWR('M', 12, int) | |
107 | #define SIOCACOADDR_MIP6 _IOWR('M', 13, struct mip6_input_data) | |
108 | #define SIOCAHOMEADDR_MIP6 _IOWR('M', 14, struct mip6_input_data) | |
109 | #define SIOCSBULIFETIME_MIP6 _IOWR('M', 15, struct mip6_input_data) | |
110 | #define SIOCSHRLIFETIME_MIP6 _IOWR('M', 16, struct mip6_input_data) | |
111 | #define SIOCDCOADDR_MIP6 _IOWR('M', 17, struct mip6_input_data) | |
112 | #define SIOCSPROMMODE_MIP6 _IOWR('M', 18, struct mip6_input_data) | |
113 | #define SIOCSBU2CN_MIP6 _IOWR('M', 19, struct mip6_input_data) | |
114 | #define SIOCSREVTUNNEL_MIP6 _IOWR('M', 20, struct mip6_input_data) | |
115 | #define SIOCSAUTOCONFIG_MIP6 _IOWR('M', 21, struct mip6_input_data) | |
116 | #define SIOCSEAGERMD_MIP6 _IOWR('M', 22, struct mip6_input_data) | |
117 | #define SIOCSATTACH_MIP6 _IOWR('M', 23, struct mip6_input_data) | |
118 | #define SIOCSRELEASE_MIP6 _IOWR('M', 24, struct mip6_input_data) | |
119 | ||
120 | ||
121 | /* | |
122 | * Information about which module that has been compiled into the kernel or | |
123 | * loaded as a module. | |
124 | */ | |
125 | #define MIP6_MN_MODULE 0x01 | |
126 | #define MIP6_HA_MODULE 0x02 | |
127 | ||
128 | ||
129 | /* | |
130 | * Generic message to pass configuration parameters from mip6config to | |
131 | * kernel. | |
132 | */ | |
133 | struct mip6_input_data { | |
134 | char if_name[IFNAMSIZ]; /* Interface name */ | |
135 | u_int8_t prefix_len; /* Prefix length for address */ | |
136 | struct in6_addr ip6_addr; /* Address */ | |
137 | struct in6_addr ha_addr; /* Corresponding Home Agent */ | |
138 | u_int32_t value; /* Value */ | |
139 | }; | |
140 | ||
141 | #endif /* not _NETINET6_MIP6_COMMON_H_ */ |