summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/nsap_addr.c
diff options
context:
space:
mode:
authordownsj <>1997-03-13 19:07:41 +0000
committerdownsj <>1997-03-13 19:07:41 +0000
commit05882f672fb3bf8797e68cc2d68f8406e1cb7b07 (patch)
treef9cdfe48f1a2f821eb8d11d33976f3f19cd834db /src/lib/libc/net/nsap_addr.c
parentb0e0ca363d82adf8768f67857659b9590e0e6954 (diff)
downloadopenbsd-05882f672fb3bf8797e68cc2d68f8406e1cb7b07.tar.gz
openbsd-05882f672fb3bf8797e68cc2d68f8406e1cb7b07.tar.bz2
openbsd-05882f672fb3bf8797e68cc2d68f8406e1cb7b07.zip
Integrate BIND 4.9.5 resolver and associated routines.
Includes the DNS aware getnetby*() routines and IPv6 support.
Diffstat (limited to 'src/lib/libc/net/nsap_addr.c')
-rw-r--r--src/lib/libc/net/nsap_addr.c55
1 files changed, 20 insertions, 35 deletions
diff --git a/src/lib/libc/net/nsap_addr.c b/src/lib/libc/net/nsap_addr.c
index ce0a60a7d8..e62d952a07 100644
--- a/src/lib/libc/net/nsap_addr.c
+++ b/src/lib/libc/net/nsap_addr.c
@@ -1,40 +1,31 @@
1/* $OpenBSD: nsap_addr.c,v 1.3 1997/03/13 19:07:34 downsj Exp $ */
2
1/* 3/*
2 * Copyright (c) 1989, 1993 4 * Copyright (c) 1996 by Internet Software Consortium.
3 * The Regents of the University of California. All rights reserved.
4 * 5 *
5 * Redistribution and use in source and binary forms, with or without 6 * Permission to use, copy, modify, and distribute this software for any
6 * modification, are permitted provided that the following conditions 7 * purpose with or without fee is hereby granted, provided that the above
7 * are met: 8 * copyright notice and this permission notice appear in all copies.
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
20 * 9 *
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 10 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 11 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 12 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 13 * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 16 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 17 * SOFTWARE.
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */ 18 */
33 19
34#if defined(LIBC_SCCS) && !defined(lint) 20#if defined(LIBC_SCCS) && !defined(lint)
35static char rcsid[] = "$OpenBSD: nsap_addr.c,v 1.2 1996/08/19 08:29:32 tholo Exp $"; 21#if 0
22static char rcsid[] = "$From: nsap_addr.c,v 8.3 1996/08/05 08:31:35 vixie Exp $";
23#else
24static char rcsid[] = "$OpenBSD: nsap_addr.c,v 1.3 1997/03/13 19:07:34 downsj Exp $";
25#endif
36#endif /* LIBC_SCCS and not lint */ 26#endif /* LIBC_SCCS and not lint */
37 27
28#include <sys/types.h>
38#include <sys/param.h> 29#include <sys/param.h>
39#include <sys/socket.h> 30#include <sys/socket.h>
40#include <netinet/in.h> 31#include <netinet/in.h>
@@ -49,12 +40,6 @@ xtob(c)
49 return (c - (((c >= '0') && (c <= '9')) ? '0' : '7')); 40 return (c - (((c >= '0') && (c <= '9')) ? '0' : '7'));
50} 41}
51 42
52/* These have to be here for BIND and its utilities (DiG, nslookup, et al)
53 * but should not be promulgated since the calling interface is not pretty.
54 * (They do, however, implement the RFC standard way of representing ISO NSAPs
55 * and as such, are preferred over the more general iso_addr.c routines.
56 */
57
58u_int 43u_int
59inet_nsap_addr(ascii, binary, maxlen) 44inet_nsap_addr(ascii, binary, maxlen)
60 const char *ascii; 45 const char *ascii;