1178476Sjb/* 2178476Sjb * CDDL HEADER START 3178476Sjb * 4178476Sjb * The contents of this file are subject to the terms of the 5178476Sjb * Common Development and Distribution License (the "License"). 6178476Sjb * You may not use this file except in compliance with the License. 7178476Sjb * 8178476Sjb * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9178476Sjb * or http://www.opensolaris.org/os/licensing. 10178476Sjb * See the License for the specific language governing permissions 11178476Sjb * and limitations under the License. 12178476Sjb * 13178476Sjb * When distributing Covered Code, include this CDDL HEADER in each 14178476Sjb * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15178476Sjb * If applicable, add the following below this CDDL HEADER, with the 16178476Sjb * fields enclosed by brackets "[]" replaced with your own identifying 17178476Sjb * information: Portions Copyright [yyyy] [name of copyright owner] 18178476Sjb * 19178476Sjb * CDDL HEADER END 20178476Sjb */ 21178476Sjb 22178476Sjb/* 23178476Sjb * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24178476Sjb * Use is subject to license terms. 25178476Sjb */ 26178476Sjb 27178476Sjb#pragma ident "%Z%%M% %I% %E% SMI" 28178476Sjb 29178476Sjb#pragma D option quiet 30178476Sjb 31178534Sjbinline int AF_INET = 2; 32178534Sjbinline int AF_INET6 = 28; 33178534Sjb 34178534Sjbin_addr_t *ip4a; 35178534Sjbin_addr_t *ip4b; 36178534Sjbin_addr_t *ip4c; 37178534Sjbin_addr_t *ip4d; 38178476Sjbstruct in6_addr *ip6a; 39178476Sjbstruct in6_addr *ip6b; 40178476Sjbstruct in6_addr *ip6c; 41178476Sjbstruct in6_addr *ip6d; 42178476Sjbstruct in6_addr *ip6e; 43178476Sjbstruct in6_addr *ip6f; 44178476Sjbstruct in6_addr *ip6g; 45178476Sjbstruct in6_addr *ip6h; 46178476Sjb 47178476SjbBEGIN 48178476Sjb{ 49178534Sjb this->buf4a = alloca(sizeof (in_addr_t)); 50178534Sjb this->buf4b = alloca(sizeof (in_addr_t)); 51178534Sjb this->buf4c = alloca(sizeof (in_addr_t)); 52178534Sjb this->buf4d = alloca(sizeof (in_addr_t)); 53178476Sjb this->buf6a = alloca(sizeof (struct in6_addr)); 54178476Sjb this->buf6b = alloca(sizeof (struct in6_addr)); 55178476Sjb this->buf6c = alloca(sizeof (struct in6_addr)); 56178476Sjb this->buf6d = alloca(sizeof (struct in6_addr)); 57178476Sjb this->buf6e = alloca(sizeof (struct in6_addr)); 58178476Sjb this->buf6f = alloca(sizeof (struct in6_addr)); 59178476Sjb this->buf6g = alloca(sizeof (struct in6_addr)); 60178476Sjb this->buf6h = alloca(sizeof (struct in6_addr)); 61178476Sjb ip4a = this->buf4a; 62178476Sjb ip4b = this->buf4b; 63178476Sjb ip4c = this->buf4c; 64178476Sjb ip4d = this->buf4d; 65178476Sjb ip6a = this->buf6a; 66178476Sjb ip6b = this->buf6b; 67178476Sjb ip6c = this->buf6c; 68178476Sjb ip6d = this->buf6d; 69178476Sjb ip6e = this->buf6e; 70178476Sjb ip6f = this->buf6f; 71178476Sjb ip6g = this->buf6g; 72178476Sjb ip6h = this->buf6h; 73178476Sjb 74178476Sjb *ip4a = htonl(0xc0a80117); 75178476Sjb *ip4b = htonl(0x7f000001); 76178476Sjb *ip4c = htonl(0xffffffff); 77178476Sjb *ip4d = htonl(0x00000000); 78178534Sjb ip6a->__u6_addr.__u6_addr8[0] = 0xfe; 79178534Sjb ip6a->__u6_addr.__u6_addr8[1] = 0x80; 80178534Sjb ip6a->__u6_addr.__u6_addr8[8] = 0x02; 81178534Sjb ip6a->__u6_addr.__u6_addr8[9] = 0x14; 82178534Sjb ip6a->__u6_addr.__u6_addr8[10] = 0x4f; 83178534Sjb ip6a->__u6_addr.__u6_addr8[11] = 0xff; 84178534Sjb ip6a->__u6_addr.__u6_addr8[12] = 0xfe; 85178534Sjb ip6a->__u6_addr.__u6_addr8[13] = 0x0b; 86178534Sjb ip6a->__u6_addr.__u6_addr8[14] = 0x76; 87178534Sjb ip6a->__u6_addr.__u6_addr8[15] = 0xc8; 88178534Sjb ip6b->__u6_addr.__u6_addr8[0] = 0x10; 89178534Sjb ip6b->__u6_addr.__u6_addr8[1] = 0x80; 90178534Sjb ip6b->__u6_addr.__u6_addr8[10] = 0x08; 91178534Sjb ip6b->__u6_addr.__u6_addr8[11] = 0x08; 92178534Sjb ip6b->__u6_addr.__u6_addr8[13] = 0x20; 93178534Sjb ip6b->__u6_addr.__u6_addr8[13] = 0x0c; 94178534Sjb ip6b->__u6_addr.__u6_addr8[14] = 0x41; 95178534Sjb ip6b->__u6_addr.__u6_addr8[15] = 0x7a; 96178534Sjb ip6c->__u6_addr.__u6_addr8[15] = 0x01; 97178534Sjb ip6e->__u6_addr.__u6_addr8[12] = 0x7f; 98178534Sjb ip6e->__u6_addr.__u6_addr8[15] = 0x01; 99178534Sjb ip6f->__u6_addr.__u6_addr8[10] = 0xff; 100178534Sjb ip6f->__u6_addr.__u6_addr8[11] = 0xff; 101178534Sjb ip6f->__u6_addr.__u6_addr8[12] = 0x7f; 102178534Sjb ip6f->__u6_addr.__u6_addr8[15] = 0x01; 103178534Sjb ip6g->__u6_addr.__u6_addr8[10] = 0xff; 104178534Sjb ip6g->__u6_addr.__u6_addr8[11] = 0xfe; 105178534Sjb ip6g->__u6_addr.__u6_addr8[12] = 0x7f; 106178534Sjb ip6g->__u6_addr.__u6_addr8[15] = 0x01; 107178534Sjb ip6h->__u6_addr.__u6_addr8[0] = 0xff; 108178534Sjb ip6h->__u6_addr.__u6_addr8[1] = 0xff; 109178534Sjb ip6h->__u6_addr.__u6_addr8[2] = 0xff; 110178534Sjb ip6h->__u6_addr.__u6_addr8[3] = 0xff; 111178534Sjb ip6h->__u6_addr.__u6_addr8[4] = 0xff; 112178534Sjb ip6h->__u6_addr.__u6_addr8[5] = 0xff; 113178534Sjb ip6h->__u6_addr.__u6_addr8[6] = 0xff; 114178534Sjb ip6h->__u6_addr.__u6_addr8[7] = 0xff; 115178534Sjb ip6h->__u6_addr.__u6_addr8[8] = 0xff; 116178534Sjb ip6h->__u6_addr.__u6_addr8[9] = 0xff; 117178534Sjb ip6h->__u6_addr.__u6_addr8[10] = 0xff; 118178534Sjb ip6h->__u6_addr.__u6_addr8[11] = 0xff; 119178534Sjb ip6h->__u6_addr.__u6_addr8[12] = 0xff; 120178534Sjb ip6h->__u6_addr.__u6_addr8[13] = 0xff; 121178534Sjb ip6h->__u6_addr.__u6_addr8[14] = 0xff; 122178534Sjb ip6h->__u6_addr.__u6_addr8[15] = 0xff; 123178476Sjb 124178476Sjb printf("%s\n", inet_ntop(AF_INET, ip4a)); 125178476Sjb printf("%s\n", inet_ntop(AF_INET, ip4b)); 126178476Sjb printf("%s\n", inet_ntop(AF_INET, ip4c)); 127178476Sjb printf("%s\n", inet_ntop(AF_INET, ip4d)); 128178476Sjb printf("%s\n", inet_ntop(AF_INET6, ip6a)); 129178476Sjb printf("%s\n", inet_ntop(AF_INET6, ip6b)); 130178476Sjb printf("%s\n", inet_ntop(AF_INET6, ip6c)); 131178476Sjb printf("%s\n", inet_ntop(AF_INET6, ip6d)); 132178476Sjb printf("%s\n", inet_ntop(AF_INET6, ip6e)); 133178476Sjb printf("%s\n", inet_ntop(AF_INET6, ip6f)); 134178476Sjb printf("%s\n", inet_ntop(AF_INET6, ip6g)); 135178476Sjb printf("%s\n", inet_ntop(AF_INET6, ip6h)); 136178476Sjb 137178476Sjb exit(0); 138178476Sjb} 139