scope6_var.h revision 235916
1139826Simp/*- 262587Sitojun * Copyright (C) 2000 WIDE Project. 362587Sitojun * All rights reserved. 4120941Sume * 562587Sitojun * Redistribution and use in source and binary forms, with or without 662587Sitojun * modification, are permitted provided that the following conditions 762587Sitojun * are met: 862587Sitojun * 1. Redistributions of source code must retain the above copyright 962587Sitojun * notice, this list of conditions and the following disclaimer. 1062587Sitojun * 2. Redistributions in binary form must reproduce the above copyright 1162587Sitojun * notice, this list of conditions and the following disclaimer in the 1262587Sitojun * documentation and/or other materials provided with the distribution. 1362587Sitojun * 3. Neither the name of the project nor the names of its contributors 1462587Sitojun * may be used to endorse or promote products derived from this software 1562587Sitojun * without specific prior written permission. 16120941Sume * 1762587Sitojun * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 1862587Sitojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1962587Sitojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2062587Sitojun * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 2162587Sitojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2262587Sitojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2362587Sitojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2462587Sitojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2562587Sitojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2662587Sitojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2762587Sitojun * SUCH DAMAGE. 28174510Sobrien * 29174510Sobrien * $KAME: scope6_var.h,v 1.4 2000/05/18 15:03:27 jinmei Exp $ 30174510Sobrien * $FreeBSD: head/sys/netinet6/scope6_var.h 235916 2012-05-24 16:30:13Z bz $ 3162587Sitojun */ 3262587Sitojun 3362587Sitojun#ifndef _NETINET6_SCOPE6_VAR_H_ 3462587Sitojun#define _NETINET6_SCOPE6_VAR_H_ 3562587Sitojun 3662587Sitojun#ifdef _KERNEL 37121161Sumestruct scope6_id { 38121161Sume /* 39121161Sume * 16 is correspondent to 4bit multicast scope field. 40121161Sume * i.e. from node-local to global with some reserved/unassigned types. 41121161Sume */ 42121161Sume u_int32_t s6id_list[16]; 43121161Sume}; 44121161Sume 45121161Sumevoid scope6_init __P((void)); 46121161Sumestruct scope6_id *scope6_ifattach __P((struct ifnet *)); 47121161Sumevoid scope6_ifdetach __P((struct scope6_id *)); 48121161Sumeint scope6_set __P((struct ifnet *, struct scope6_id *)); 49121161Sumeint scope6_get __P((struct ifnet *, struct scope6_id *)); 5062587Sitojunvoid scope6_setdefault __P((struct ifnet *)); 51121161Sumeint scope6_get_default __P((struct scope6_id *)); 5262587Sitojunu_int32_t scope6_addr2default __P((struct in6_addr *)); 53148385Sumeint sa6_embedscope __P((struct sockaddr_in6 *, int)); 54148385Sumeint sa6_recoverscope __P((struct sockaddr_in6 *)); 55148385Sumeint in6_setscope __P((struct in6_addr *, struct ifnet *, u_int32_t *)); 56148385Sumeint in6_clearscope __P((struct in6_addr *)); 57235916Sbzuint16_t in6_getscope(struct in6_addr *); 5862587Sitojun#endif /* _KERNEL */ 5962587Sitojun 6062587Sitojun#endif /* _NETINET6_SCOPE6_VAR_H_ */ 61