Browse code

Add route_ipv6_gateway* data structures for rgi6 support.

route_gateway_address -> route_ipv6_gateway_address
route_gateway_info -> route_ipv6_gateway_info

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <1441985627-14822-4-git-send-email-gert@greenie.muc.de>
URL: http://article.gmane.org/gmane.network.openvpn.devel/10088

Gert Doering authored on 2015/09/12 00:33:40
Showing 1 changed files
... ...
@@ -177,6 +177,34 @@ struct route_gateway_info {
177 177
   struct route_gateway_address addrs[RGI_N_ADDRESSES]; /* local addresses attached to iface */
178 178
 };
179 179
 
180
+struct route_ipv6_gateway_address {
181
+  struct in6_addr addr_ipv6;
182
+  int netbits_ipv6;
183
+};
184
+
185
+struct route_ipv6_gateway_info {
186
+/* RGI_ flags used as in route_gateway_info */
187
+  unsigned int flags;
188
+
189
+  /* gateway interface */
190
+# ifdef WIN32
191
+  DWORD adapter_index;  /* interface or ~0 if undefined */
192
+#else
193
+  char iface[16]; /* interface name (null terminated), may be empty */
194
+#endif
195
+
196
+  /* gateway interface hardware address */
197
+  uint8_t hwaddr[6];
198
+
199
+  /* gateway/router address */
200
+  struct route_ipv6_gateway_address gateway;
201
+
202
+  /* address/netmask pairs bound to interface */
203
+# define RGI_N_ADDRESSES 8
204
+  int n_addrs; /* len of addrs, may be 0 */
205
+  struct route_ipv6_gateway_address addrs[RGI_N_ADDRESSES]; /* local addresses attached to iface */
206
+};
207
+
180 208
 struct route_list {
181 209
 # define RL_DID_REDIRECT_DEFAULT_GATEWAY (1<<0)
182 210
 # define RL_DID_LOCAL                    (1<<1)