in6_src.c (215317) | in6_src.c (215701) |
---|---|
1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 47 unchanged lines hidden (view full) --- 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)in_pcb.c 8.2 (Berkeley) 1/4/94 61 */ 62 63#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 47 unchanged lines hidden (view full) --- 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)in_pcb.c 8.2 (Berkeley) 1/4/94 61 */ 62 63#include <sys/cdefs.h> |
64__FBSDID("$FreeBSD: head/sys/netinet6/in6_src.c 215317 2010-11-14 20:38:11Z dim $"); | 64__FBSDID("$FreeBSD: head/sys/netinet6/in6_src.c 215701 2010-11-22 19:32:54Z dim $"); |
65 66#include "opt_inet.h" 67#include "opt_inet6.h" 68#include "opt_mpath.h" 69 70#include <sys/param.h> 71#include <sys/systm.h> 72#include <sys/lock.h> --- 44 unchanged lines hidden (view full) --- 117static struct sx addrsel_sxlock; 118#define ADDRSEL_SXLOCK_INIT() sx_init(&addrsel_sxlock, "addrsel_sxlock") 119#define ADDRSEL_SLOCK() sx_slock(&addrsel_sxlock) 120#define ADDRSEL_SUNLOCK() sx_sunlock(&addrsel_sxlock) 121#define ADDRSEL_XLOCK() sx_xlock(&addrsel_sxlock) 122#define ADDRSEL_XUNLOCK() sx_xunlock(&addrsel_sxlock) 123 124#define ADDR_LABEL_NOTAPP (-1) | 65 66#include "opt_inet.h" 67#include "opt_inet6.h" 68#include "opt_mpath.h" 69 70#include <sys/param.h> 71#include <sys/systm.h> 72#include <sys/lock.h> --- 44 unchanged lines hidden (view full) --- 117static struct sx addrsel_sxlock; 118#define ADDRSEL_SXLOCK_INIT() sx_init(&addrsel_sxlock, "addrsel_sxlock") 119#define ADDRSEL_SLOCK() sx_slock(&addrsel_sxlock) 120#define ADDRSEL_SUNLOCK() sx_sunlock(&addrsel_sxlock) 121#define ADDRSEL_XLOCK() sx_xlock(&addrsel_sxlock) 122#define ADDRSEL_XUNLOCK() sx_xunlock(&addrsel_sxlock) 123 124#define ADDR_LABEL_NOTAPP (-1) |
125STATIC_VNET_DEFINE(struct in6_addrpolicy, defaultaddrpolicy); | 125static VNET_DEFINE(struct in6_addrpolicy, defaultaddrpolicy); |
126#define V_defaultaddrpolicy VNET(defaultaddrpolicy) 127 128VNET_DEFINE(int, ip6_prefer_tempaddr) = 0; 129 130static int selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *, 131 struct ip6_moptions *, struct route_in6 *, struct ifnet **, 132 struct rtentry **, int)); 133static int in6_selectif __P((struct sockaddr_in6 *, struct ip6_pktopts *, --- 914 unchanged lines hidden (view full) --- 1048 */ 1049struct addrsel_policyent { 1050 TAILQ_ENTRY(addrsel_policyent) ape_entry; 1051 struct in6_addrpolicy ape_policy; 1052}; 1053 1054TAILQ_HEAD(addrsel_policyhead, addrsel_policyent); 1055 | 126#define V_defaultaddrpolicy VNET(defaultaddrpolicy) 127 128VNET_DEFINE(int, ip6_prefer_tempaddr) = 0; 129 130static int selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *, 131 struct ip6_moptions *, struct route_in6 *, struct ifnet **, 132 struct rtentry **, int)); 133static int in6_selectif __P((struct sockaddr_in6 *, struct ip6_pktopts *, --- 914 unchanged lines hidden (view full) --- 1048 */ 1049struct addrsel_policyent { 1050 TAILQ_ENTRY(addrsel_policyent) ape_entry; 1051 struct in6_addrpolicy ape_policy; 1052}; 1053 1054TAILQ_HEAD(addrsel_policyhead, addrsel_policyent); 1055 |
1056STATIC_VNET_DEFINE(struct addrsel_policyhead, addrsel_policytab); | 1056static VNET_DEFINE(struct addrsel_policyhead, addrsel_policytab); |
1057#define V_addrsel_policytab VNET(addrsel_policytab) 1058 1059static void 1060init_policy_queue(void) 1061{ 1062 1063 TAILQ_INIT(&V_addrsel_policytab); 1064} --- 138 unchanged lines hidden --- | 1057#define V_addrsel_policytab VNET(addrsel_policytab) 1058 1059static void 1060init_policy_queue(void) 1061{ 1062 1063 TAILQ_INIT(&V_addrsel_policytab); 1064} --- 138 unchanged lines hidden --- |