1999-04-17 08:37:12 +08:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2004-01-09 01:33:29 +08:00
|
|
|
| PHP Version 5 |
|
1999-04-17 08:37:12 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2009-01-07 04:48:21 +08:00
|
|
|
| Copyright (c) 1997-2008 The PHP Group |
|
1999-04-17 08:37:12 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 20:51:34 +08:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
2000-07-24 09:40:02 +08:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-11 04:04:29 +08:00
|
|
|
| available through the world-wide-web at the following url: |
|
2006-01-01 20:51:34 +08:00
|
|
|
| http://www.php.net/license/3_01.txt |
|
2000-07-24 09:40:02 +08:00
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
1999-04-17 08:37:12 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2002-11-19 10:34:13 +08:00
|
|
|
| Authors: The typical suspects |
|
|
|
|
| Marcus Boerger <helly@php.net> |
|
|
|
|
| Pollita <pollita@php.net> |
|
1999-04-17 08:37:12 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2000-07-24 09:40:02 +08:00
|
|
|
*/
|
1999-04-17 08:37:12 +08:00
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
2000-07-03 07:46:51 +08:00
|
|
|
#ifndef DNS_H
|
|
|
|
#define DNS_H
|
1999-04-17 08:37:12 +08:00
|
|
|
|
2009-01-12 07:37:16 +08:00
|
|
|
#if HAVE_RES_MKQUERY && !defined(HAVE_RES_NMKQUERY) && HAVE_RES_SEND && !defined(HAVE_RES_NSEND)
|
|
|
|
#define HAVE_DEPRECATED_DNS_FUNCS 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAVE_DEPRECATED_DNS_FUNCS
|
|
|
|
#define res_nmkquery(res, op, dname, class, type, data, datalen, newrr, buf, buflen) \
|
|
|
|
res_mkquery(op, dname, class, type, data, datalen, newrr, buf, buflen)
|
|
|
|
#define res_nsend(res, msg, msglen, answer, anslen) \
|
|
|
|
res_send(msg, msglen, answer, anslen);
|
|
|
|
#define res_nclose(res) /* noop */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ((HAVE_RES_NMKQUERY && HAVE_RES_NSEND) || HAVE_DEPRECATED_DNS_FUNCS) && HAVE_DN_EXPAND && HAVE_DN_SKIPNAME
|
2002-11-19 10:34:13 +08:00
|
|
|
#define HAVE_DNS_FUNCS 1
|
|
|
|
#endif
|
|
|
|
|
1999-05-16 19:19:26 +08:00
|
|
|
PHP_FUNCTION(gethostbyaddr);
|
|
|
|
PHP_FUNCTION(gethostbyname);
|
|
|
|
PHP_FUNCTION(gethostbynamel);
|
2001-03-16 22:45:46 +08:00
|
|
|
|
2008-12-31 22:30:38 +08:00
|
|
|
#ifdef HAVE_GETHOSTNAME
|
|
|
|
PHP_FUNCTION(gethostname);
|
|
|
|
#endif
|
|
|
|
|
2009-01-07 04:48:21 +08:00
|
|
|
#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(NETWARE)))
|
2002-11-19 10:34:13 +08:00
|
|
|
|
2009-01-07 04:48:21 +08:00
|
|
|
# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND)
|
2003-02-21 16:45:58 +08:00
|
|
|
PHP_FUNCTION(dns_get_mx);
|
2009-01-07 04:48:21 +08:00
|
|
|
PHP_FUNCTION(dns_check_record);
|
2003-02-24 08:09:18 +08:00
|
|
|
# endif
|
2002-11-19 10:34:13 +08:00
|
|
|
|
2009-01-07 04:48:21 +08:00
|
|
|
#if defined(PHP_WIN32) || HAVE_DNS_FUNCS
|
2002-11-19 10:34:13 +08:00
|
|
|
PHP_FUNCTION(dns_get_record);
|
|
|
|
PHP_MINIT_FUNCTION(dns);
|
|
|
|
# endif
|
2009-01-07 04:48:21 +08:00
|
|
|
|
|
|
|
#endif /* defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(NETWARE))) */
|
1999-04-17 08:37:12 +08:00
|
|
|
|
|
|
|
#ifndef INT16SZ
|
|
|
|
#define INT16SZ 2
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef INT32SZ
|
|
|
|
#define INT32SZ 4
|
|
|
|
#endif
|
|
|
|
|
2000-07-03 07:46:51 +08:00
|
|
|
#endif /* DNS_H */
|