diff options
| author | Roy Marples <roy@marples.name> | 2016-02-15 21:19:56 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-02-15 21:19:56 +0000 |
| commit | aafc7d05c869821038ec54de2a81cfd68b42575d (patch) | |
| tree | f555a6cc49c182d2ade19c4325ca210489bb12f5 /ipv6.c | |
| parent | ee184a69d1f46327f8ef76910f01030609ebcab8 (diff) | |
| download | dhcpcd-aafc7d05c869821038ec54de2a81cfd68b42575d.tar.xz | |
Export STATIC6 to libdhcpcd.
Diffstat (limited to 'ipv6.c')
| -rw-r--r-- | ipv6.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -1383,6 +1383,25 @@ ipv6_env(char **env, const char *prefix, const struct interface *ifp) } int +ipv6_staticdadcompleted(const struct interface *ifp) +{ + const struct ipv6_state *state; + const struct ipv6_addr *ia; + int n; + + if ((state = IPV6_CSTATE(ifp)) == NULL) + return 0; + n = 0; +#define COMPLETED (IPV6_AF_STATIC | IPV6_AF_ADDED | IPV6_AF_DADCOMPLETED) + TAILQ_FOREACH(ia, &state->addrs, next) { + if ((ia->flags & COMPLETED) == COMPLETED && + !(ia->addr_flags & IN6_IFF_NOTUSEABLE)) + n++; + } + return n; +} + +int ipv6_startstatic(struct interface *ifp) { struct ipv6_addr *ia; |
