Chapter Contents |
Previous |
Next |
res_mkquery |
Portability: | UNIX compatible |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
IMPLEMENTATION | |
RELATED FUNCTIONS |
SYNOPSIS |
#include <sys/types.h> #include <netinet/in.h> #include <arpa/nameser.h> #include <resolv.h> int res_mkquery(int op, char *dname, int class, int type, char *data, int datalen, struct rrec *newrr, char *buf, int buflen);
DESCRIPTION |
res_mkquery
makes a packet for use with an Internet domain name server
and places it in the buffer area pointed to by
buf
, with
buflen
specifying the length in bytes of the buffer. The other seven arguments
correspond directly to the fields of a domain name query:
dname
rrec
class
and
type
data
datalen
data
.
op
<arpa/nameser.h>
header file:
QUERY
|
standard query |
IQUERY
|
inverse query |
STATUS
|
name server status query. |
For information on buffer formats for Internet name
servers, as well as more detailed information about
res_mkquery
, refer to Chapter 20, "The Domain
Name System," in Internetworking with TCP/IP, Volume 1, by Douglas
E. Comer, Prentice Hall, 1991.
RETURN VALUE |
If successful,
res_mkquery
returns the size of the query. It returns a
-1
if the size of the query is greater than
buflen
.
IMPLEMENTATION |
The SAS/C version of
res_mkquery
is a direct port from the BSD UNIX
Socket Library.
RELATED FUNCTIONS |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.