scope6_var.h revision 121161
1119815Smarcel/* $FreeBSD: head/sys/netinet6/scope6_var.h 121161 2003-10-17 15:46:31Z ume $ */ 2119815Smarcel/* $KAME: scope6_var.h,v 1.4 2000/05/18 15:03:27 jinmei Exp $ */ 3119815Smarcel 4119815Smarcel/* 5119815Smarcel * Copyright (C) 2000 WIDE Project. 6119815Smarcel * All rights reserved. 7119815Smarcel * 8119815Smarcel * Redistribution and use in source and binary forms, with or without 9119815Smarcel * modification, are permitted provided that the following conditions 10119815Smarcel * are met: 11119815Smarcel * 1. Redistributions of source code must retain the above copyright 12119815Smarcel * notice, this list of conditions and the following disclaimer. 13119815Smarcel * 2. Redistributions in binary form must reproduce the above copyright 14119815Smarcel * notice, this list of conditions and the following disclaimer in the 15119815Smarcel * documentation and/or other materials provided with the distribution. 16119815Smarcel * 3. Neither the name of the project nor the names of its contributors 17119815Smarcel * may be used to endorse or promote products derived from this software 18119815Smarcel * without specific prior written permission. 19119815Smarcel * 20119815Smarcel * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 21119815Smarcel * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22119815Smarcel * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23119815Smarcel * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 24119815Smarcel * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25119815Smarcel * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26119815Smarcel * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27119815Smarcel * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28119815Smarcel * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29119815Smarcel * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30119815Smarcel * SUCH DAMAGE. 31119815Smarcel */ 32119815Smarcel 33119815Smarcel#ifndef _NETINET6_SCOPE6_VAR_H_ 34119815Smarcel#define _NETINET6_SCOPE6_VAR_H_ 35119815Smarcel 36119815Smarcel#ifdef _KERNEL 37119815Smarcelstruct scope6_id { 38119815Smarcel /* 39119815Smarcel * 16 is correspondent to 4bit multicast scope field. 40119815Smarcel * i.e. from node-local to global with some reserved/unassigned types. 41119815Smarcel */ 42119815Smarcel u_int32_t s6id_list[16]; 43119815Smarcel}; 44119815Smarcel 45119815Smarcelvoid scope6_init __P((void)); 46119815Smarcelstruct scope6_id *scope6_ifattach __P((struct ifnet *)); 47119815Smarcelvoid scope6_ifdetach __P((struct scope6_id *)); 48119815Smarcelint scope6_set __P((struct ifnet *, struct scope6_id *)); 49119815Smarcelint scope6_get __P((struct ifnet *, struct scope6_id *)); 50119815Smarcelvoid scope6_setdefault __P((struct ifnet *)); 51119815Smarcelint scope6_get_default __P((struct scope6_id *)); 52119815Smarcelu_int32_t scope6_in6_addrscope __P((struct in6_addr *)); 53119815Smarcelu_int32_t scope6_addr2default __P((struct in6_addr *)); 54119815Smarcel#endif /* _KERNEL */ 55119815Smarcel 56119815Smarcel#endif /* _NETINET6_SCOPE6_VAR_H_ */ 57119815Smarcel