xref: /netbsd-src/lib/libc/net/vars6.c (revision 99e58e3f961f093a163b298c349013e6db9a8b6e)
1*99e58e3fSchristos /*	$NetBSD: vars6.c,v 1.7 2005/08/07 16:00:01 christos Exp $	*/
24620b004Sitojun 
337e81591Sitojun /*
437e81591Sitojun  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
537e81591Sitojun  * All rights reserved.
637e81591Sitojun  *
737e81591Sitojun  * Redistribution and use in source and binary forms, with or without
837e81591Sitojun  * modification, are permitted provided that the following conditions
937e81591Sitojun  * are met:
1037e81591Sitojun  * 1. Redistributions of source code must retain the above copyright
1137e81591Sitojun  *    notice, this list of conditions and the following disclaimer.
1237e81591Sitojun  * 2. Redistributions in binary form must reproduce the above copyright
1337e81591Sitojun  *    notice, this list of conditions and the following disclaimer in the
1437e81591Sitojun  *    documentation and/or other materials provided with the distribution.
1537e81591Sitojun  * 3. Neither the name of the project nor the names of its contributors
1637e81591Sitojun  *    may be used to endorse or promote products derived from this software
1737e81591Sitojun  *    without specific prior written permission.
1837e81591Sitojun  *
1937e81591Sitojun  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
2037e81591Sitojun  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2137e81591Sitojun  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2237e81591Sitojun  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
2337e81591Sitojun  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2437e81591Sitojun  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2537e81591Sitojun  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2637e81591Sitojun  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2737e81591Sitojun  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2837e81591Sitojun  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2937e81591Sitojun  * SUCH DAMAGE.
3037e81591Sitojun  */
3137e81591Sitojun 
3272eddcacSitojun #include <sys/cdefs.h>
3372eddcacSitojun #if defined(LIBC_SCCS) && !defined(lint)
34*99e58e3fSchristos __RCSID("$NetBSD: vars6.c,v 1.7 2005/08/07 16:00:01 christos Exp $");
3572eddcacSitojun #endif /* LIBC_SCCS and not lint */
3672eddcacSitojun 
37749057fdSkleink #include "namespace.h"
3837e81591Sitojun #include <sys/types.h>
3937e81591Sitojun #include <netinet/in.h>
4037e81591Sitojun 
41749057fdSkleink #ifdef __weak_alias
4260549036Smycroft __weak_alias(in6addr_any, _in6addr_any)
4360549036Smycroft __weak_alias(in6addr_loopback, _in6addr_loopback)
4460549036Smycroft __weak_alias(in6addr_nodelocal_allnodes, _in6addr_nodelocal_allnodes)
4560549036Smycroft __weak_alias(in6addr_linklocal_allnodes, _in6addr_linklocal_allnodes)
46*99e58e3fSchristos __weak_alias(in6addr_linklocal_allrouters, _in6addr_linklocal_allrouters)
47749057fdSkleink #endif
48749057fdSkleink 
4937e81591Sitojun /*
5038528693Suebayasi  * Definitions of some constant IPv6 addresses.
5137e81591Sitojun  */
5237e81591Sitojun const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
5337e81591Sitojun const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
5437e81591Sitojun const struct in6_addr in6addr_nodelocal_allnodes = IN6ADDR_NODELOCAL_ALLNODES_INIT;
5537e81591Sitojun const struct in6_addr in6addr_linklocal_allnodes = IN6ADDR_LINKLOCAL_ALLNODES_INIT;
56*99e58e3fSchristos const struct in6_addr in6addr_linklocal_allrouters = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT;
5737e81591Sitojun 
58