Man page of res_mkquery
Section: C Library Functions (3)
Return to Main Contents
res_mkquery - Makes query messages for name servers
Standard C Library (libc.a)
int res_mkquery (
struct rrec *reserved,
int buf_length );
a query type. The usual type is QUERY, but the parameter
can be set to any of the query types defined in the arpa/nameser.h
the name of the domain. If the domain_name parameter points
to a single label and the
RES_DEFNAMES bit is
set, as it is by default, the function appends domain_name to
the current domain name. The current domain name is defined by the
name server in use or in the /etc/resolv.conf
one of the following parameters:
Specifies the ARPA Internet.
Specifies the Chaos network at MIT.
one of the following values:
Start of authority zone
Mailbox domain name
Mail group member
Mail rename name
NULL resource record
Well known service
Domain name pointer
Mail routing information
User (finger) information
Points to the
data that is sent to the name server as a search key. The data is
stored as a character array.
the size of the array pointed to by the data parameter.
a reserved and currently unused parameter.
a location containing the query message.
the length of the message pointed to by the buffer parameter.
The res_mkquery() function makes packets for name servers
in the Internet domain. The res_mkquery()
function makes a standard query message and places it
in the location pointed to by the buffer parameter.
The res_mkquery() function is one of a set of subroutines
that form the resolver, a set of functions
that resolve domain names. Global information that is used by the
resolver functions is kept in the _res data structure.
the _res data structure definition.
Upon successful completion, the res_mkquery() function
returns the size of the query. If the query is larger than the value
of the buf_length parameter, the function fails and returns
a value of -1.
the name server and domain name.
- RETURN VALUES
- RELATED INFORMATION
This document was created by
using the manual pages.
Time: 02:41:08 GMT, October 02, 2010