Back to index

glibc  2.9
ns_netint.c
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
00003  * Copyright (c) 1996,1999 by Internet Software Consortium.
00004  *
00005  * Permission to use, copy, modify, and distribute this software for any
00006  * purpose with or without fee is hereby granted, provided that the above
00007  * copyright notice and this permission notice appear in all copies.
00008  *
00009  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
00010  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
00011  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
00012  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00013  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00014  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
00015  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00016  */
00017 
00018 #if !defined(_LIBC) && !defined(lint)
00019 static const char rcsid[] = "$BINDId: ns_netint.c,v 8.4 1999/10/13 16:39:35 vixie Exp $";
00020 #endif
00021 
00022 /* Import. */
00023 
00024 #include <arpa/nameser.h>
00025 #include <resolv.h>
00026 
00027 /* Public. */
00028 
00029 u_int
00030 ns_get16(const u_char *src) {
00031        u_int dst;
00032 
00033        NS_GET16(dst, src);
00034        return (dst);
00035 }
00036 libresolv_hidden_def (ns_get16)
00037 strong_alias (ns_get16, __ns_get16)
00038 
00039 u_long
00040 ns_get32(const u_char *src) {
00041        u_long dst;
00042 
00043        NS_GET32(dst, src);
00044        return (dst);
00045 }
00046 libresolv_hidden_def (ns_get32)
00047 strong_alias (ns_get32, __ns_get32)
00048 
00049 void
00050 ns_put16(u_int src, u_char *dst) {
00051        NS_PUT16(src, dst);
00052 }
00053 libresolv_hidden_def (ns_put16)
00054 
00055 void
00056 ns_put32(u_long src, u_char *dst) {
00057        NS_PUT32(src, dst);
00058 }
00059 libresolv_hidden_def (ns_put32)
00060 
00061