Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/r/res_send.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/r/res_send.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/r/res_send.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/r/res_send.html on line 8
Send a preformatted Internet domain name query
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
int res_send( const u_char * msg,
int msglen,
u_char * answer,
int anslen );
- msg
- The preformatted Internet domain name query that you want to send.
- msglen
- The length of the message.
- answer
- A pointer to a buffer where the function can store the answer to the
query.
- anslen
- The length of the buffer.
libsocket
Use the -l socket option to
qcc
to link against this library.
The res_send() function is a low-level routine that's
used by res_query()
to send a preformatted Internet domain name query and return an answer.
It calls
res_init()
if RES_INIT isn't set, sends the query
to the local name server, and handles timeouts and retries.
The resolver routines are used for making, sending, and
interpreting query and reply messages with Internet domain
name servers.
Global configuration and state information used by the resolver
routines is kept in the structure _res.
For more information on the options, see
res_init().
The length of a reply message, in bytes; or -1 if an error occurs.
- ECONNREFUSED
- No name servers found.
- ETIMEDOUT
- No answer obtained.
- /etc/resolv.conf
- Resolver configuration file.
- LOCALDOMAIN
- When set, LOCALDOMAIN contains a domain name that overrides the
current domain name.
Unix
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
dn_comp(),
dn_expand(),
gethostbyname(),
res_init(),
res_mkquery(),
res_query(),
res_querydomain(),
res_search()
hostname,
/etc/resolv.conf
in the Utilities Reference
Based on
RFC 974, RFC 1032, RFC 1033, RFC 1034, RFC 1035
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/r/res_send.html on line 201
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/r/res_send.html on line 201