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