tst.inet_ntoa6.d revision 14ea49401f3c8c61422aefbda43809e275f60c6c
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore/*
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * CDDL HEADER START
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore *
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * The contents of this file are subject to the terms of the
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Common Development and Distribution License (the "License").
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * You may not use this file except in compliance with the License.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore *
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * or http://www.opensolaris.org/os/licensing.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * See the License for the specific language governing permissions
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * and limitations under the License.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore *
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * When distributing Covered Code, include this CDDL HEADER in each
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * If applicable, add the following below this CDDL HEADER, with the
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * fields enclosed by brackets "[]" replaced with your own identifying
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * information: Portions Copyright [yyyy] [name of copyright owner]
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore *
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * CDDL HEADER END
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore/*
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Use is subject to license terms.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#pragma ident "%Z%%M% %I% %E% SMI"
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#pragma D option quiet
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amorestruct in6_addr *ip6a;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amorestruct in6_addr *ip6b;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amorestruct in6_addr *ip6c;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amorestruct in6_addr *ip6d;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amorestruct in6_addr *ip6e;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amorestruct in6_addr *ip6f;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amorestruct in6_addr *ip6g;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'AmoreBEGIN
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore{
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore this->buf6a = alloca(sizeof (struct in6_addr));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore this->buf6b = alloca(sizeof (struct in6_addr));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore this->buf6c = alloca(sizeof (struct in6_addr));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore this->buf6d = alloca(sizeof (struct in6_addr));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore this->buf6e = alloca(sizeof (struct in6_addr));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore this->buf6f = alloca(sizeof (struct in6_addr));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore this->buf6g = alloca(sizeof (struct in6_addr));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6a = this->buf6a;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6b = this->buf6b;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6c = this->buf6c;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6d = this->buf6d;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6e = this->buf6e;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6f = this->buf6f;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6g = this->buf6g;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6a->_S6_un._S6_u8[0] = 0xfe;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6a->_S6_un._S6_u8[1] = 0x80;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6a->_S6_un._S6_u8[8] = 0x02;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6a->_S6_un._S6_u8[9] = 0x14;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6a->_S6_un._S6_u8[10] = 0x4f;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6a->_S6_un._S6_u8[11] = 0xff;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6a->_S6_un._S6_u8[12] = 0xfe;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6a->_S6_un._S6_u8[13] = 0x0b;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6a->_S6_un._S6_u8[14] = 0x76;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6a->_S6_un._S6_u8[15] = 0xc8;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6b->_S6_un._S6_u8[0] = 0x10;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6b->_S6_un._S6_u8[1] = 0x80;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6b->_S6_un._S6_u8[10] = 0x08;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6b->_S6_un._S6_u8[11] = 0x08;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6b->_S6_un._S6_u8[13] = 0x20;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6b->_S6_un._S6_u8[13] = 0x0c;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6b->_S6_un._S6_u8[14] = 0x41;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6b->_S6_un._S6_u8[15] = 0x7a;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6c->_S6_un._S6_u8[15] = 0x01;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6e->_S6_un._S6_u8[12] = 0x7f;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6e->_S6_un._S6_u8[15] = 0x01;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6f->_S6_un._S6_u8[10] = 0xff;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6f->_S6_un._S6_u8[11] = 0xff;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6f->_S6_un._S6_u8[12] = 0x7f;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6f->_S6_un._S6_u8[15] = 0x01;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6g->_S6_un._S6_u8[10] = 0xff;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6g->_S6_un._S6_u8[11] = 0xfe;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6g->_S6_un._S6_u8[12] = 0x7f;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore ip6g->_S6_un._S6_u8[15] = 0x01;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore printf("%s\n", inet_ntoa6(ip6a));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore printf("%s\n", inet_ntoa6(ip6b));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore printf("%s\n", inet_ntoa6(ip6c));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore printf("%s\n", inet_ntoa6(ip6d));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore printf("%s\n", inet_ntoa6(ip6e));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore printf("%s\n", inet_ntoa6(ip6f));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore printf("%s\n", inet_ntoa6(ip6g));
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore exit(0);
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore}
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore