dnsserver

Defines

#define REQ_SZ   512

Functions

static void lookup (const char *buf)
static void usage (void)
void squid_res_setservers (int reset)
int main (int argc, char *argv[])

Detailed Description

Because the standard gethostbyname() library call blocks, Squid must use external processes to actually make these calls. Typically there will be ten dnsserver processes spawned from Squid. Communication occurs via TCP sockets bound to the loopback interface. The functions in dns.cc are primarily concerned with starting and stopping the dnsservers. Reading and writing to and from the dnsservers occurs in the IP and FQDN cache modules.

Command Line Interface

usage: dnsserver -Dhv -s nameserver
	-D             Enable resolver RES_DEFNAMES and RES_DNSRCH options
	-h             Help
	-v             Version
	-s nameserver  Specify alternate name server(s).  'nameserver'
	               must be an IP address, -s option may be repeated
 

Define Documentation

#define REQ_SZ   512

Definition at line 171 of file dnsserver.cc.

Referenced by main().


Function Documentation

static void lookup ( const char *  buf  )  [static]
int main ( int  argc,
char *  argv[] 
)

This is the external dnsserver process.

Definition at line 448 of file dnsserver.cc.

References c, getopt(), lookup(), NULL, REQ_SZ, request, squid_res_setservers(), and usage().

void squid_res_setservers ( int  reset  ) 

Override the system DNS nameservers with some local ones. Equivalent to the bind res_setservers() call but for any system where we can find the needed _res fields.

Definition at line 367 of file dnsserver.cc.

References optarg.

Referenced by main().

static void usage ( void   )  [static]

Definition at line 340 of file dnsserver.cc.

Search

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors