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] |
Definition at line 177 of file dnsserver.cc.
References freeaddrinfo, gai_strerror, getaddrinfo, getnameinfo, i, inet_ntop, MAX_IPSTRLEN, and NULL.
Referenced by Ip::Intercept::IpfwInterception(), main(), neighborsDigestSelect(), and Ip::Intercept::NetfilterInterception().
| 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
- About Squid
- Why Squid?
- Squid Developers
- How to Help Out
- Getting Squid
- Donate
- Squid Deployment Case-Studies
Documentation
- FAQ | Wiki | Book
- Configuration Reference
- Configuration Guide - Visolve
- Configuration Examples
- Users guide
- Non-English
- Security Advisories
- More...
Support
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products
