tables.c (8121d73f) | tables.c (69bb4bb4) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 15 unchanged lines hidden (view full) --- 24 */ 25 26#pragma ident "%Z%%M% %I% %E% SMI" 27 28#include "defs.h" 29#include "tables.h" 30 31#include <time.h> | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 15 unchanged lines hidden (view full) --- 24 */ 25 26#pragma ident "%Z%%M% %I% %E% SMI" 27 28#include "defs.h" 29#include "tables.h" 30 31#include <time.h> |
32#include <inet/ip6.h> | |
33 34struct phyint *phyints = NULL; 35 36static void phyint_print(struct phyint *pi); 37static void phyint_insert(struct phyint *pi); 38 39static boolean_t tmptoken_isvalid(struct in6_addr *token); 40 --- 184 unchanged lines hidden (view full) --- 225 226 if (ioctl(fd, SIOCGLIFFLAGS, (char *)&lifr) < 0) { 227 logperror_pi(pi, "phyint_init_from_k: ioctl (get flags)"); 228 goto error; 229 } 230 pi->pi_flags = lifr.lifr_flags; 231 232 /* | 32 33struct phyint *phyints = NULL; 34 35static void phyint_print(struct phyint *pi); 36static void phyint_insert(struct phyint *pi); 37 38static boolean_t tmptoken_isvalid(struct in6_addr *token); 39 --- 184 unchanged lines hidden (view full) --- 224 225 if (ioctl(fd, SIOCGLIFFLAGS, (char *)&lifr) < 0) { 226 logperror_pi(pi, "phyint_init_from_k: ioctl (get flags)"); 227 goto error; 228 } 229 pi->pi_flags = lifr.lifr_flags; 230 231 /* |
233 * If the link local interface is not up yet or it's IFF_UP 234 * and the flag is set to IFF_NOLOCAL as Duplicate Address 235 * Detection is in progress. 236 * IFF_NOLOCAL is "normal" on other prefixes. | 232 * If the link local interface is not up yet or it's IFF_UP and the 233 * IFF_NOLOCAL flag is set, then ignore the interface. |
237 */ | 234 */ |
238 | |
239 if (!(pi->pi_flags & IFF_UP) || (pi->pi_flags & IFF_NOLOCAL)) { 240 if (newsock) { 241 (void) close(pi->pi_sock); 242 pi->pi_sock = -1; 243 } 244 if (debug & D_PHYINT) { 245 logmsg(LOG_DEBUG, "phyint_init_from_k(%s): " | 235 if (!(pi->pi_flags & IFF_UP) || (pi->pi_flags & IFF_NOLOCAL)) { 236 if (newsock) { 237 (void) close(pi->pi_sock); 238 pi->pi_sock = -1; 239 } 240 if (debug & D_PHYINT) { 241 logmsg(LOG_DEBUG, "phyint_init_from_k(%s): " |
246 "not IFF_UP\n", pi->pi_name); | 242 "IFF_NOLOCAL or not IFF_UP\n", pi->pi_name); |
247 } 248 return (0); 249 } 250 pi->pi_kernel_state |= PI_PRESENT; 251 252 bzero(lifr.lifr_groupname, sizeof (lifr.lifr_groupname)); 253 if (ioctl(fd, SIOCGLIFGROUPNAME, (caddr_t)&lifr) < 0) { 254 logperror_pi(pi, "phyint_init_from_k: ioctl (get group name)"); --- 2023 unchanged lines hidden --- | 243 } 244 return (0); 245 } 246 pi->pi_kernel_state |= PI_PRESENT; 247 248 bzero(lifr.lifr_groupname, sizeof (lifr.lifr_groupname)); 249 if (ioctl(fd, SIOCGLIFGROUPNAME, (caddr_t)&lifr) < 0) { 250 logperror_pi(pi, "phyint_init_from_k: ioctl (get group name)"); --- 2023 unchanged lines hidden --- |