xref: /onnv-gate/usr/src/lib/libresolv2/common/nameser/ns_netint.c (revision 11038:74b12212b8a2)
10Sstevel@tonic-gate /*
2*11038SRao.Shoaib@Sun.COM  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
30Sstevel@tonic-gate  * Copyright (c) 1996,1999 by Internet Software Consortium.
40Sstevel@tonic-gate  *
50Sstevel@tonic-gate  * Permission to use, copy, modify, and distribute this software for any
60Sstevel@tonic-gate  * purpose with or without fee is hereby granted, provided that the above
70Sstevel@tonic-gate  * copyright notice and this permission notice appear in all copies.
80Sstevel@tonic-gate  *
9*11038SRao.Shoaib@Sun.COM  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
10*11038SRao.Shoaib@Sun.COM  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*11038SRao.Shoaib@Sun.COM  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
12*11038SRao.Shoaib@Sun.COM  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*11038SRao.Shoaib@Sun.COM  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*11038SRao.Shoaib@Sun.COM  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15*11038SRao.Shoaib@Sun.COM  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
160Sstevel@tonic-gate  */
170Sstevel@tonic-gate 
180Sstevel@tonic-gate #ifndef lint
19*11038SRao.Shoaib@Sun.COM static const char rcsid[] = "$Id: ns_netint.c,v 1.3 2005/04/27 04:56:40 sra Exp $";
200Sstevel@tonic-gate #endif
210Sstevel@tonic-gate 
220Sstevel@tonic-gate /* Import. */
230Sstevel@tonic-gate 
240Sstevel@tonic-gate #include "port_before.h"
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #include <arpa/nameser.h>
270Sstevel@tonic-gate 
280Sstevel@tonic-gate #include "port_after.h"
290Sstevel@tonic-gate 
300Sstevel@tonic-gate /* Public. */
310Sstevel@tonic-gate 
320Sstevel@tonic-gate u_int
ns_get16(const u_char * src)330Sstevel@tonic-gate ns_get16(const u_char *src) {
340Sstevel@tonic-gate 	u_int dst;
350Sstevel@tonic-gate 
360Sstevel@tonic-gate 	NS_GET16(dst, src);
370Sstevel@tonic-gate 	return (dst);
380Sstevel@tonic-gate }
390Sstevel@tonic-gate 
400Sstevel@tonic-gate u_long
ns_get32(const u_char * src)410Sstevel@tonic-gate ns_get32(const u_char *src) {
420Sstevel@tonic-gate 	u_long dst;
430Sstevel@tonic-gate 
440Sstevel@tonic-gate 	NS_GET32(dst, src);
450Sstevel@tonic-gate 	return (dst);
460Sstevel@tonic-gate }
470Sstevel@tonic-gate 
480Sstevel@tonic-gate void
ns_put16(u_int src,u_char * dst)490Sstevel@tonic-gate ns_put16(u_int src, u_char *dst) {
500Sstevel@tonic-gate 	NS_PUT16(src, dst);
510Sstevel@tonic-gate }
520Sstevel@tonic-gate 
530Sstevel@tonic-gate void
ns_put32(u_long src,u_char * dst)540Sstevel@tonic-gate ns_put32(u_long src, u_char *dst) {
550Sstevel@tonic-gate 	NS_PUT32(src, dst);
560Sstevel@tonic-gate }
57*11038SRao.Shoaib@Sun.COM 
58*11038SRao.Shoaib@Sun.COM /*! \file */
59