1*4271Srie /* 2*4271Srie * CDDL HEADER START 3*4271Srie * 4*4271Srie * The contents of this file are subject to the terms of the 5*4271Srie * Common Development and Distribution License (the "License"). 6*4271Srie * You may not use this file except in compliance with the License. 7*4271Srie * 8*4271Srie * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*4271Srie * or http://www.opensolaris.org/os/licensing. 10*4271Srie * See the License for the specific language governing permissions 11*4271Srie * and limitations under the License. 12*4271Srie * 13*4271Srie * When distributing Covered Code, include this CDDL HEADER in each 14*4271Srie * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*4271Srie * If applicable, add the following below this CDDL HEADER, with the 16*4271Srie * fields enclosed by brackets "[]" replaced with your own identifying 17*4271Srie * information: Portions Copyright [yyyy] [name of copyright owner] 18*4271Srie * 19*4271Srie * CDDL HEADER END 20*4271Srie */ 21*4271Srie 22*4271Srie /* 23*4271Srie * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24*4271Srie * Use is subject to license terms. 25*4271Srie */ 26*4271Srie 27*4271Srie #pragma ident "%Z%%M% %I% %E% SMI" 28*4271Srie 29*4271Srie #include <sys/isa_defs.h> 30*4271Srie #include <sys/types.h> 31*4271Srie 32*4271Srie 33*4271Srie #if defined(_LITTLE_ENDIAN) && !defined(__lint) 34*4271Srie 35*4271Srie #error Use ISA-specific byteorder.s on a little-endian machine. 36*4271Srie 37*4271Srie #else /* !_LITTLE_ENDIAN */ 38*4271Srie 39*4271Srie uint32_t 40*4271Srie htonl(uint32_t in) 41*4271Srie { 42*4271Srie return (in); 43*4271Srie } 44*4271Srie 45*4271Srie uint32_t 46*4271Srie ntohl(uint32_t in) 47*4271Srie { 48*4271Srie return (in); 49*4271Srie } 50*4271Srie 51*4271Srie uint16_t 52*4271Srie htons(uint16_t in) 53*4271Srie { 54*4271Srie return (in); 55*4271Srie } 56*4271Srie 57*4271Srie uint16_t 58*4271Srie ntohs(uint16_t in) 59*4271Srie { 60*4271Srie return (in); 61*4271Srie } 62*4271Srie 63*4271Srie #endif /* _LITTLE_ENDIAN */ 64