1 /* 2 * Copyright (c) 1997-2000 by Sun Microsystems, Inc. 3 * All rights reserved. 4 */ 5 6 /* 7 * Copyright (c) 1996,1999 by Internet Software Consortium. 8 * 9 * Permission to use, copy, modify, and distribute this software for any 10 * purpose with or without fee is hereby granted, provided that the above 11 * copyright notice and this permission notice appear in all copies. 12 * 13 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS 14 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES 15 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE 16 * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 17 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 18 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 19 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 20 * SOFTWARE. 21 */ 22 23 #pragma ident "%Z%%M% %I% %E% SMI" 24 25 #ifndef lint 26 static const char rcsid[] = "$Id: ns_netint.c,v 8.4 1999/10/13 16:39:35 vixie Exp $"; 27 #endif 28 29 /* Import. */ 30 31 #include "port_before.h" 32 33 #include <arpa/nameser.h> 34 35 #include "port_after.h" 36 37 /* Public. */ 38 39 u_int 40 ns_get16(const u_char *src) { 41 u_int dst; 42 43 NS_GET16(dst, src); 44 return (dst); 45 } 46 47 u_long 48 ns_get32(const u_char *src) { 49 u_long dst; 50 51 NS_GET32(dst, src); 52 return (dst); 53 } 54 55 void 56 ns_put16(u_int src, u_char *dst) { 57 NS_PUT16(src, dst); 58 } 59 60 void 61 ns_put32(u_long src, u_char *dst) { 62 NS_PUT32(src, dst); 63 } 64