2
* dhcpcd - DHCP client daemon
3
* Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* 2. Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution.
15
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31
#include <sys/queue.h>
39
TAILQ_ENTRY(ra_opt) next;
41
struct timeval expire;
47
struct interface *iface;
49
char sfrom[INET6_ADDRSTRLEN];
52
struct timeval received;
58
struct ipv6_addrhead addrs;
59
TAILQ_HEAD(, ra_opt) options;
68
extern TAILQ_HEAD(rahead, ra) ipv6_routers;
76
#define RS_STATE(a) ((struct rs_state *)(ifp)->if_data[IF_DATA_IPV6RS])
79
int ipv6rs_start(struct interface *);
80
ssize_t ipv6rs_env(char **, const char *, const struct interface *);
81
const struct ipv6_addr * ipv6rs_findprefix(const struct ipv6_addr *);
82
int ipv6rs_addrexists(const struct ipv6_addr *);
83
void ipv6rs_freedrop_ra(struct ra *, int);
84
#define ipv6rs_free_ra(ra) ipv6rs_freedrop_ra((ra), 0)
85
#define ipv6rs_drop_ra(ra) ipv6rs_freedrop_ra((ra), 1)
86
ssize_t ipv6rs_free(struct interface *);
87
void ipv6rs_expire(void *arg);
88
int ipv6rs_has_ra(const struct interface *);
89
void ipv6rs_handleifa(int, const char *, const struct in6_addr *, int);
90
void ipv6rs_drop(struct interface *);
92
#define ipv6rs_start(a) {}
93
#define ipv6rs_free(a)
94
#define ipv6rs_has_ra(a) 0
95
#define ipv6rs_drop(a)