1#include <sys/types.h>
2#include <sys/socket.h>
3#include <netinet/in.h>
4
5#ifndef DPROXY_H
6#define DPROXY_H
7
8#define PORT 53
9#define NAME_SIZE 256		/* 255--> 256 CMC: 2001/12/27 */
10#define MAX_PACKET_SIZE 512
11#define BUF_SIZE NAME_SIZE
12
13typedef u_int16_t uint16;
14typedef u_int32_t uint32;
15
16#include "dns.h"
17
18#ifndef DNS_TIMEOUT
19#define DNS_TIMEOUT 240
20#endif
21#ifndef NAME_SERVER_DEFAULT
22//#define NAME_SERVER_DEFAULT "198.95.251.10"
23//#define NAME_SERVER_DEFAULT "140.113.1.1"
24//JYWeng 20031215:
25#define NAME_SERVER_DEFAULT "168.95.1.1"
26#endif
27#ifndef CONFIG_FILE_DEFAULT
28#define CONFIG_FILE_DEFAULT "/etc/dproxy.conf"
29#endif
30#ifndef DENY_FILE_DEFAULT
31#define DENY_FILE_DEFAULT "/etc/dproxy.deny"
32#endif
33#ifndef CACHE_FILE_DEFAULT
34#define CACHE_FILE_DEFAULT "/var/cache/dproxy.cache"
35#endif
36#ifndef HOSTS_FILE_DEFAULT
37#define HOSTS_FILE_DEFAULT "/etc/hosts"
38#endif
39#ifndef PURGE_TIME_DEFAULT
40//#define PURGE_TIME_DEFAULT 48 * 60 * 60
41#define PURGE_TIME_DEFAULT (60 * 60)
42#endif
43#ifndef PPP_DEV_DEFAULT
44#define PPP_DEV_DEFAULT "/var/run/ppp0.pid"
45#endif
46#ifndef DHCP_LEASES_DEFAULT
47#define DHCP_LEASES_DEFAULT "/var/state/dhcp/dhcpd.leases"
48#endif
49#ifndef PPP_DETECT_DEFAULT
50//#define PPP_DETECT_DEFAULT 1
51#define PPP_DETECT_DEFAULT 0
52#endif
53#ifndef DEBUG_FILE_DEFAULT
54#define DEBUG_FILE_DEFAULT "/var/log/dproxy.debug.log"
55#endif
56
57/* Added by CMC 8/4/2001 */
58#define DNS_DEBUG		0
59#define DNS_TICK_TIME		10	/* sec. */
60#define CACHE_CHECK_TIME	30	/* sec. */
61#define MAX_CACHE_NUM		400	/* 400 cache names */
62#define MAX_LIST_SIZE		150	/* 908k = 6052 * 150 */
63
64void debug_perror( char * msg );
65void debug(char *fmt, ...);
66
67#endif
68