2N/A/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2N/A * Copyright 2004 by the Massachusetts Institute of Technology. 2N/A * All Rights Reserved. 2N/A * Export of this software from the United States of America may 2N/A * require a specific license from the United States Government. 2N/A * It is the responsibility of any person or organization contemplating 2N/A * export to obtain such a license before exporting. 2N/A * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 2N/A * distribute this software and its documentation for any purpose and 2N/A * without fee is hereby granted, provided that the above copyright 2N/A * notice appear in all copies and that both that copyright notice and 2N/A * this permission notice appear in supporting documentation, and that 2N/A * the name of M.I.T. not be used in advertising or publicity pertaining 2N/A * to distribution of the software without specific, written prior 2N/A * permission. Furthermore if you modify this software you must label 2N/A * your software as modified software and not distribute it in such a 2N/A * fashion that it might be confused with the original M.I.T. software. 2N/A * M.I.T. makes no representations about the suitability of 2N/A * this software for any purpose. It is provided "as is" without express 2N/A * or implied warranty. 2N/A * Glue layer for DNS resolver, to make parsing of replies easier 2N/A * whether we are using BIND 4, 8, or 9. 2N/A * BIND 4 doesn't have the ns_initparse() API, so we need to do some 2N/A * manual parsing via the HEADER struct. BIND 8 does have 2N/A * ns_initparse(), but has enums for the various protocol constants 2N/A * rather than the BIND 4 macros. BIND 9 (at least on Mac OS X 2N/A * Panther) appears to disable res_nsearch() if BIND_8_COMPAT is 2N/A * defined (which is necessary to obtain the HEADER struct). 2N/A * We use ns_initparse() if available at all, and never define 2N/A * BIND_8_COMPAT. If there is no ns_initparse(), we do manual parsing 2N/A * by using the HEADER struct. 2N/A * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A#
endif /* WSHELPER */ 2N/A * Solaris 7 has ns_rr_cl rather than ns_rr_class. 2N/A * Some BIND 8 / BIND 9 implementations disable the BIND 4 style 2N/A#
else /* !HAVE_RES_NSEARCH */ 2N/A * Some BIND implementations might be old enough to lack these. 2N/A#
endif /* HAVE_RES_NSEARCH */ 2N/A * Given moving pointer PTR offset from BASE, return true if adding 2N/A * INCR to PTR doesn't move it PTR than MAX bytes from BASE. 2N/A * Given PTR offset from BASE, if at least INCR bytes are safe to 2N/A * read, get network byte order uint16 into S, and increment PTR. On 2N/A * failure, goto LABEL. 2N/A/* Solaris Kerberos: p should be ptr */ 2N/A (s) = (
unsigned short)(
ptr)[0] <<
8 \
2N/A const unsigned char **,
int *);
2N/A const unsigned char *,
char *,
int);
2N/A#
endif /* KRB5_DNS_LOOKUP */ 2N/A#
endif /* !defined(KRB5_DNSGLUE_H) */