Commit Graph

174 Commits

Author SHA1 Message Date
Rasmus Lerdorf
de90c602e1 Use HOST_NAME_MAX constant here instead for the gethostname() func 2011-08-10 17:40:56 +00:00
Rasmus Lerdorf
14948624af Use HOST_NAME_MAX constant here instead for the gethostname() func 2011-08-10 17:40:56 +00:00
Ilia Alshanetsky
9fd373d8b6 Fix win32 build 2011-08-10 15:59:32 +00:00
Ilia Alshanetsky
e4a64006ab Fix win32 build 2011-08-10 15:59:32 +00:00
Ilia Alshanetsky
d091516c31 Minimize stack usage and added missing dtors 2011-08-09 13:10:57 +00:00
Ilia Alshanetsky
8c846a6f74 Minimize stack usage and added missing dtors 2011-08-09 13:10:57 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Gustavo André dos Santos Lopes
40c3aefafb - Removed redundant local variable in dns_get_record.
- (5.3) Fixed bug in the Windows implementation of
  dns_get_record, where the two last parameters wouldn't be
  filled unless the type were DNS_ANY (Gustavo).
2010-10-11 03:07:03 +00:00
Gustavo André dos Santos Lopes
17dc181117 - Removed redundant local variable in dns_get_record.
- (5.3) Fixed bug in the Windows implementation of
  dns_get_record, where the two last parameters wouldn't be
  filled unless the type were DNS_ANY (Gustavo).
2010-10-11 03:07:03 +00:00
Gustavo André dos Santos Lopes
91f64706c2 - [DOC] Added a 5th parameter to dns_get_record, a boolean that tells whether to activate
"raw mode". In this mide, $type (2nd parameter) is the numeric type of the record, and
  the responses are not parsed -- the "type" element will be numeric and there will be
  a "data" element with the raw data of the response buffer, which the programmer will
  have to parse.
- Fixed bug in the Win32 implementation of dns_get_record, where the 3rd and 4th arguments
  would only be filled if the 2nd ($type) was DNS_ANY.
- [DOC] The 3rd and 4th parameters can now be NULL (changed their arginfo).
2010-10-11 02:48:23 +00:00
Gustavo André dos Santos Lopes
b1d5cf7348 - Added numeric record type and raw data for unknown DNS
record types.
2010-10-08 23:02:37 +00:00
Sebastian Bergmann
de93d96de4 sed -i "s#1997-2008#1997-2010#g" **/*.c **/*.h 2010-01-07 11:02:39 +00:00
Jani Taskinen
d0a956c2b7 - Tune the fix for bug #50508 and make it work with MacOSX, bug #50541. 2009-12-21 15:22:40 +00:00
Jani Taskinen
52f83608d8 - Fixed bug #50508 (compile fails: Conflicting HEADER type declarations)
# NEVER ever include nameser_compat.h, it's included in various ways in different OSes by nameser.h if needed
2009-12-18 11:02:07 +00:00
Scott MacVicar
76d875278c Part fix for bug #49224 2009-10-16 02:10:52 +00:00
Scott MacVicar
050653466f Merge chanes from head to improve DNS on OSX and allow usage of bind9 stuff with the bind8 compatibility layer. 2009-08-11 22:07:35 +00:00
Scott MacVicar
af5df4c813 Change dns.h to php_dns.h, part of my dns cleanup 2009-08-05 23:20:17 +00:00
Jani Taskinen
d5455551a5 - Sync with HEAD (thanks Hannes :) 2009-05-20 12:44:19 +00:00
Jani Taskinen
9a4069529c MFH: Fix non-windows builds 2009-05-20 12:15:39 +00:00
Kalle Sommer Nielsen
31a1dbe2df MFH: Fix Windows build, dns_get_record is defined in dns_win32.c, not here 2009-05-20 08:18:48 +00:00
Jani Taskinen
e36c8c49c3 MFH: Unify macros 2009-05-19 11:12:20 +00:00
Felipe Pena
47a8643e71 - Reverted my previous commit to avoid unnecessary BC.
[DOC] Added new entry to the array returned by dns_get_record(), 'entries', which contains the separated value from TXT value. (so 'txt' kept the concatenated version) (Pierre)
2009-01-12 20:07:28 +00:00
Scott MacVicar
8911ba1c62 Add support for the older style bind 8 functions, this adds support for OS X to use all of the dns_* functions. 2009-01-11 23:37:16 +00:00
Felipe Pena
cc50663b56 MFH:
- Improved fix for #47035 (win32 part by Henrique M. Decaria)
[DOC] The TXT part needs be returned as an array of strings. (dns_get_record())
2009-01-11 18:47:17 +00:00
Felipe Pena
b5182d7aff - MFH: Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT record) 2009-01-08 17:19:50 +00:00
Pierre Joye
4f70499923 - fix regression introduced by the move to the new parsing api (thx Bjori) 2009-01-07 13:49:53 +00:00
Pierre Joye
4b91d9b57a - fix parameter parsing options 2009-01-07 13:46:13 +00:00
Pierre Joye
6f1a0edb11 - these ifdefs are a mess, fix build on win 2009-01-06 23:37:28 +00:00
Pierre Joye
8afdcba444 - fix build 2009-01-06 21:47:13 +00:00
Pierre Joye
3c967db4a1 - [MFH]
- [DOC] add support for all DNS function on Windows
  - dns_check_record  (and its alias  checkdnsrr)
  - dns_get_record
   - IPV6 specific info not available yet:
     . AAAA info is available only on vista/2k8 for now
     . A6 info is not available
  - dns_get_mx (and its alias getmxrr)
2009-01-06 20:48:21 +00:00
Antony Dovgal
85af2a05db MFH: don't use WRONG_PARAM_COUNT with new param parsing API 2008-12-31 15:48:18 +00:00
Ilia Alshanetsky
540242dc2d [DOC]
Added gethostname() to return the current system host name.
2008-12-31 14:30:38 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Felipe Pena
7e25733927 - MFH: Fixed bug #42855 (dns_get_record() doesn't return all text from TXT record)
patch by: misc at e2007 dot cynergi dot com
2008-11-03 11:35:11 +00:00
Pierre Joye
2620304003 - MFH:
- drop bindlib usage on windows
 - inet_pton, inet_ntop and inet_aton are always available (VC9 uses the CRT implementation, VC6 our own)
2008-08-23 19:22:10 +00:00
Matt Wilmas
cd62ae78b6 MFH: Fixed Windows build now that HAVE_INET_PTON is defined 2008-05-23 09:40:44 +00:00
Etienne Kneuss
8664b5dc68 MFH: Fix dns_check_proto (related to #44723) 2008-04-14 16:50:11 +00:00
Ilia Alshanetsky
ba3245e12e Fixed bug #43871 (crash inside dns_get_record) 2008-01-17 14:12:12 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Derick Rethans
a6fbf1b083 - MFH: Fixed weights array, which was broken with:
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.80&r2=1.81
  and merged to head with:
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.70.2.7.2.5&r2=1.70.2.7.2.5.2.1
2007-11-22 10:20:09 +00:00
Jani Taskinen
a0b0d132fe MFH: Sync 2007-11-05 13:42:33 +00:00
Antony Dovgal
58ac8d559d MFH: fix #41795 (checkdnsrr does not support DNS_TXT type)
patch by lucas at facebook dot com
2007-06-26 11:04:55 +00:00
Antony Dovgal
725260ea0f fix CS 2007-05-14 11:33:34 +00:00
Scott MacVicar
e7577d57cd Fixed bug #41347 (checkdnsrr() segfaults on empty hostname). 2007-05-10 13:16:54 +00:00
Marcus Boerger
50ea26760d - Avoid sprintf, even when checked copy'n'paste or changes lead to errors 2007-02-24 02:17:47 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
bbe1f9d280 MFH 2005-12-05 22:21:56 +00:00
Antony Dovgal
e415260868 MFH: apply workaround for the leak only when GLIBC is used 2005-10-25 14:57:14 +00:00
Antony Dovgal
a0c8d5d80a MFH: fix problem with garbage appearing in hostnames 2005-10-25 08:19:33 +00:00
Antony Dovgal
0a7b720094 MFH: fix #34938 (dns_get_record() doesn't resolve long hostnames and leaks) 2005-10-23 18:34:26 +00:00
Ilia Alshanetsky
76ad7425ad Fixed memory leak on error. 2005-10-23 15:29:09 +00:00
Antony Dovgal
b260064bbf MFH: fix possible crash in dns_get_record()
cleanup code a bit
(partly fixes #34938)
2005-10-21 13:49:01 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Sara Golemon
d1341b1c15 Add A6 support, fix IPv6 address parsing, and improve define compatability 2004-08-06 18:38:35 +00:00
Sara Golemon
dd28c137f6 Cleanup, minor refactor, and CS 2004-03-19 22:21:53 +00:00
Sara Golemon
75268270d6 Bug Fix #27657: TXT records longer than MAXHOSTNAMELEN cause segfaults. 2004-03-19 21:42:29 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
foobar
36b255fa66 ws 2003-12-07 18:19:30 +00:00
Marko Karppinen
074ca45399 Workaround for bug #25955
Generalized a Darwin check in dns.c to a check for inet_pton() (kalowsky)
2003-10-24 17:09:36 +00:00
Hartmut Holzgraefe
075e66cc08 signed/unsigned compiler warning fixes 2003-09-26 08:09:56 +00:00
Sara Golemon
29664d9322 MFB: Plug leak when invalid domain name provided. 2003-09-01 22:38:40 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Sara Golemon
451cd602f6 HINFO RDATA is <label><label> not <nshort><nshort> 2003-05-06 19:51:46 +00:00
Sara Golemon
5d3a8e4ce7 Add support for SRV and NAPTR records to dns_get_record() and dns_check_record()
Feature Request #23407
2003-04-29 22:02:01 +00:00
Hartmut Holzgraefe
dbe4f2238c proto fixes 2003-03-17 13:11:19 +00:00
foobar
c87c4c7bd7 Extra paranoia checks if dn_skipname/dn_expand exist or not 2003-02-24 00:09:18 +00:00
foobar
b420beba61 - Fixed bug: #22339
# No NEWS, this was bug introduced by Marcus a while ago..
# Not present in php4.3.x branch
2003-02-21 08:45:58 +00:00
foobar
6043ee22e8 - Fixed bug #22299 (gethostbyname() crash with non-existing domain on MacOSX) 2003-02-20 05:34:58 +00:00
Wez Furlong
0a18a9d744 A add much more useful select(2) implementation than is provided by
windows sockets.  The winsock implementation will only work with sockets;
our implementation works with sockets and file descriptors.
By association, stream_select() will now operate correctly with files, pipes and sockets.

This change required linking against the winsock2 library.  In terms of
compatibility, only older versions of windows 95 do not have winsock2
installed by default.  It is available as a redistributable file, and is most likely installed by any OS patches (eg: Internet Explorer) applied by the user.

Also, add a win32 compatible pipe test when opening a stream from a pipe.  This test will only work on NT, win2k and XP platforms.  Without this test, interleaved fread() and select() calls would cause the read buffer to be clobbered.  I will be working on a fix for this issue for win9x.
2003-02-16 03:48:49 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Marcus Boerger
426cf8eb57 fix state-machine in cases T_AAAA is not available 2002-12-30 11:59:22 +00:00
Sara Golemon
13308b5a94 Minor clarification in meaning of bitmask constants
/* PHP_DNS_xx = 1<<(T_xx-1) */
T_CNAME = 5 ergo PHP_DNS_CNAME should be 0x00000010.
T_SOA = 6 ergo PHP_DNS_CNAME should be 0x00000020.
2002-12-20 18:34:56 +00:00
foobar
085f362ae3 T_AAAA is not always available. 2002-12-09 11:50:15 +00:00
Moriyoshi Koizumi
8d1b2bf8a5 Prevented return_value from being freed() twice 2002-12-08 09:54:30 +00:00
Sara Golemon
a4d6863ee5 Bug #17174 Added IPv6 (AAAA record) support to dns_check_record() also added support to dns_get_record 2002-12-08 08:14:43 +00:00
Ilia Alshanetsky
c668055159 Remove pointless checks for array_init() return values. 2002-12-05 22:28:02 +00:00
Sara Golemon
e9047df607 New function dns_get_record(): close resolver socket after use.
fix to internal func php_parserr(): correct bug in return state.
2002-11-23 01:09:07 +00:00
Marcus Boerger
3ca6344e57 -rename checkdnsrr to dns_check_record, keep old name as alias
-rename getmxrr to dns_get_mx, keep old name as alias
-added dns_get_record
@Added dns_get_record() which allows to retrieve DNS information about
@a host. (Marcus, Pollita)
2002-11-19 02:34:13 +00:00
foobar
4821b2f301 ws fixes 2002-10-18 22:08:23 +00:00
Anantha Kesari H Y
8b8f1e0590 NetWare related additions/modifications 2002-09-05 14:25:07 +00:00
Ilia Alshanetsky
7a7497e21b Fixed the \0 check in previous patch. 2002-08-29 15:58:33 +00:00
Ilia Alshanetsky
337448322f Fixed bug #18966 2002-08-29 15:44:00 +00:00
Marcus Boerger
149ad05b4f php_error_docref
#New conversion available at: http://docref.txt.marcus-boerger.de
2002-08-24 01:19:28 +00:00
Derick Rethans
728f2de442 Unify error messages 2002-07-08 12:52:22 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Dan Kalowsky
b76eb3ae40 Making PHP compile again on MacOSX 10.1
# 10.1 does not have inet_pton support yet it seems so disabling it.
2001-12-27 15:42:05 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Stig Venaas
926d1506e0 Added IPv6 support to gethostbyaddr()
@- Added IPv6 support to gethostbyaddr()
@  (Patch by Matthias Wimmer <matthias@charente.de> and venaas)
2001-09-19 18:08:15 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Zeev Suraski
c0404f4631 Whitespace 2001-08-11 17:03:37 +00:00
foobar
52e3b4a44f Cleanup. Also make gethostnamel() to return FALSE on error and not just empty array. 2001-08-10 02:19:05 +00:00
Zeev Suraski
b0224d51da Zend compatibility patch 2001-07-30 05:36:18 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
foobar
ab560941ee This should fix problems in systems without libbind. 2001-03-16 07:13:06 +00:00
foobar
6795032cb8 HAVE_BINDLIB --> HAVE_LIBBIND 2001-03-11 03:49:21 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Stephen van Egmond
b10273781a Added tests for arpa/*.h and resolv.h which don't exist on the BeOS.
The dns functions on BeOS come from socket.h
2001-02-06 00:07:21 +00:00