dualserver.h
上传用户:raihanchen
上传日期:2022-08-07
资源大小:129k
文件大小:18k
- /**************************************************************************
- * Copyright (C) 2005 by Achal Dhir *
- * achaldhir@gmail.com *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
- //This file defines all structures and constants
- //for both DHCP and DNS Servers
- #define MAX_SERVERS 8
- #ifndef LOG_MAKEPRI
- #define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
- #endif
- #ifndef SIOCGIFCONF
- #include <sys/sockio.h>
- #endif
- #ifndef _UIO_H_
- #include <sys/uio.h>
- #endif
- /*
- //#ifndef _LINUX_IN_H
- //#ifndef _NETINET_IN_H
- struct in_pktinfo
- {
- unsigned int ipi_ifindex; // Interface index
- struct in_addr ipi_spec_dst; // Local address
- struct in_addr ipi_addr; // Header Destination address
- };
- typedef struct in_pktinfo IN_PKTINFO;
- //#endif
- //#endif
- */
- #ifndef INADDR_NONE
- #define INADDR_NONE ULONG_MAX
- #endif
- #ifndef IFF_DYNAMIC
- #define IFF_DYNAMIC 0x8000
- #endif
- #define WORD unsigned short
- #define BYTE unsigned char
- #define DWORD unsigned long
- #define SOCKET_ERROR -1
- #define INVALID_SOCKET -1
- #define SOCKADDR_IN sockaddr_in
- #define SOCKADDR sockaddr
- #define SOCKET int
- #define BOOL bool
- #define LPSOCKADDR sockaddr*
- #define closesocket close
- #define RCODE_NOERROR 0
- #define RCODE_FORMATERROR 1
- #define RCODE_SERVERFAIL 2
- #define RCODE_NAMEERROR 3
- #define RCODE_NOTIMPL 4
- #define RCODE_REFUSED 5
- #define RCODE_YXDOMAIN 6
- #define RCODE_YXRRSET 7
- #define RCODE_NXRRSET 8
- #define RCODE_NOTAUTH 9
- #define RCODE_NOTZONE 10
- #define OPCODE_STANDARD_QUERY 0
- #define OPCODE_INVERSE_QUERY 1
- #define OPCODE_SRVR_STAT_REQ 2
- #define OPCODE_NOTIFY 4
- #define OPCODE_DYNAMIC_UPDATE 5
- #define DNS_TYPE_A 1
- #define DNS_TYPE_NS 2
- #define DNS_TYPE_MD 3
- #define DNS_TYPE_MF 4
- #define DNS_TYPE_CNAME 5
- #define DNS_TYPE_SOA 6
- #define DNS_TYPE_MB 7
- #define DNS_TYPE_MG 8
- #define DNS_TYPE_MR 9
- #define DNS_TYPE_NULL 10
- #define DNS_TYPE_WKS 11
- #define DNS_TYPE_PTR 12
- #define DNS_TYPE_HINFO 13
- #define DNS_TYPE_MINFO 14
- #define DNS_TYPE_MX 15
- #define DNS_TYPE_TXT 16
- #define DNS_TYPE_AAAA 28
- #define DNS_TYPE_IXFR 251
- #define DNS_TYPE_AXFR 252
- #define DNS_TYPE_MAILB 253
- #define DNS_TYPE_MAILA 254
- #define DNS_TYPE_ANY 255
- #define DNS_CLASS_IN 1
- #define DNS_CLASS_CS 2
- #define DNS_CLASS_CH 3
- #define DNS_CLASS_HS 4
- #define DNS_CLASS_NONE 254
- #define DNS_CLASS_ANY 255
- #define IPPORT_DNS 53
- struct dnsHeader
- {
- WORD xid;
- union
- {
- WORD flags;
- struct
- {
- BYTE rd: 1; //Recusion Desired
- BYTE tc: 1; //Truncated
- BYTE aa: 1; //Authoritative Answer
- BYTE opcode: 4; //OpCode
- BYTE qr: 1; //Query/Response
- BYTE rcode: 4; //rcode
- BYTE at: 1; //Answer Authenticated
- BYTE z: 1; //Filler
- BYTE filler: 1; //Not Used
- BYTE ra: 1; //Resusion Available
- };
- };
- union {
- struct {
- WORD qdcount;
- WORD ancount;
- WORD nscount;
- WORD adcount;
- };
- struct {
- WORD zcount;
- WORD prcount;
- WORD ucount;
- WORD arcount;
- };
- };
- };
- struct dnsPacket
- {
- struct dnsHeader header;
- char data;
- };
- struct data6
- {
- char zone[256];
- WORD zLen;
- DWORD dns[2];
- BYTE currentDNS;
- };
- struct data16
- {
- char wildcard[256];
- DWORD ip;
- };
- struct data7 //cache
- {
- char *mapname;
- time_t expiry;
- union
- {
- struct
- {
- BYTE dataType;
- BYTE filler1;
- BYTE sockInd;
- BYTE dnsIndex;
- };
- struct
- {
- unsigned no_route: 1;
- unsigned fixed: 1;
- unsigned bitmask: 5;
- unsigned active: 1;
- char rangeInd;
- WORD dhcpInd;
- };
- };
- union
- {
- int bytes;
- SOCKADDR_IN *addr;
- BYTE *options;
- DWORD serial;
- DWORD source;
- };
- union
- {
- BYTE *response;
- char *hostname;
- char *query;
- DWORD ip;
- };
- };
- typedef multimap<string, data7*> hostMap;
- typedef map<string, data7*> dhcpMap;
- typedef multimap<time_t, data7*> expiryMap;
- struct data5 //dns request
- {
- dnsPacket *dnsp;
- char raw[2048];
- char temp[2048];
- char *data;
- char query[256];
- char cname[256];
- char mapname[256];
- WORD qLen;
- data7 cache;
- hostMap::iterator iterBegin;
- SOCKET sock;
- SOCKADDR_IN target;
- SOCKADDR_IN addr;
- socklen_t sockLen;
- linger ling;
- int bytes;
- WORD qtype;
- WORD qclass;
- BYTE localCode;
- BYTE sockInd;
- BYTE dnsInd;
- };
- enum
- {
- NONE,
- LOCAL_A,
- LOCAL_PTR_AUTH,
- LOCAL_PTR_NAUTH,
- LOCALHOST_A,
- LOCALHOST_PTR,
- SERVER_A,
- SERVER_PTR_AUTH,
- SERVER_PTR_NAUTH,
- LOCAL_CNAME,
- EXT_CNAME,
- STATIC_A_AUTH,
- STATIC_PTR_AUTH,
- STATIC_A_NAUTH,
- STATIC_PTR_NAUTH,
- MX,
- NS,
- SOA,
- AXFR,
- CACHED,
- NON_CACHED,
- QUEUE,
- DNS_CHECK,
- DHCP
- };
- struct data12 //dns range
- {
- DWORD rangeStart;
- DWORD rangeEnd;
- };
- struct dns_rr
- {
- char *name;
- WORD type, _class;
- DWORD ttl;
- WORD rdlength;
- char *rdata;
- union {
- struct
- {
- long address;
- } a;
- struct
- {
- char *cname;
- } cname;
- struct
- {
- char *cpu, *os;
- } hinfo;
- struct
- {
- char *madname;
- } mb;
- struct
- {
- char *madname;
- } md;
- struct
- {
- char *madname;
- } mf;
- struct
- {
- char *mgmname;
- } mg;
- struct
- {
- char *rmailbx, *emailbx;
- } minfo;
- struct
- {
- char *newname;
- } mr;
- struct
- {
- int preference;
- char *exchange;
- } mx;
- struct
- {
- char *nsdname;
- } ns;
- struct
- {
- char *data;
- } null;
- struct
- {
- char *ptrdname;
- } ptr;
- struct
- {
- char *mname, *rname;
- unsigned serial, refresh, retry, expire, minimum;
- } soa;
- struct
- {
- char **txt_data;
- } txt;
- struct
- {
- int address;
- BYTE protocol;
- int bitmapsize;
- char *bitmap;
- } wks;
- } data;
- };
- struct data11
- {
- char hostname[256];
- WORD pref;
- };
- struct ConnType
- {
- SOCKET sock;
- SOCKADDR_IN addr;
- DWORD server;
- WORD port;
- };
- #define BOOTP_REQUEST 1
- #define BOOTP_REPLY 2
- #define DHCP_MESS_NONE 0
- #define DHCP_MESS_DISCOVER 1
- #define DHCP_MESS_OFFER 2
- #define DHCP_MESS_REQUEST 3
- #define DHCP_MESS_DECLINE 4
- #define DHCP_MESS_ACK 5
- #define DHCP_MESS_NAK 6
- #define DHCP_MESS_RELEASE 7
- #define DHCP_MESS_INFORM 8
- // DHCP OPTIONS
- #define DHCP_OPTION_PAD 0
- #define DHCP_OPTION_NETMASK 1
- #define DHCP_OPTION_TIMEOFFSET 2
- #define DHCP_OPTION_ROUTER 3
- #define DHCP_OPTION_TIMESERVER 4
- #define DHCP_OPTION_NAMESERVER 5
- #define DHCP_OPTION_DNS 6
- #define DHCP_OPTION_LOGSERVER 7
- #define DHCP_OPTION_COOKIESERVER 8
- #define DHCP_OPTION_LPRSERVER 9
- #define DHCP_OPTION_IMPRESSSERVER 10
- #define DHCP_OPTION_RESLOCSERVER 11
- #define DHCP_OPTION_HOSTNAME 12
- #define DHCP_OPTION_BOOTFILESIZE 13
- #define DHCP_OPTION_MERITDUMP 14
- #define DHCP_OPTION_DOMAINNAME 15
- #define DHCP_OPTION_SWAPSERVER 16
- #define DHCP_OPTION_ROOTPATH 17
- #define DHCP_OPTION_EXTSPATH 18
- #define DHCP_OPTION_IPFORWARD 19
- #define DHCP_OPTION_NONLOCALSR 20
- #define DHCP_OPTION_POLICYFILTER 21
- #define DHCP_OPTION_MAXREASSEMBLE 22
- #define DHCP_OPTION_IPTTL 23
- #define DHCP_OPTION_PATHMTUAGING 24
- #define DHCP_OPTION_PATHMTUPLATEAU 25
- #define DHCP_OPTION_INTERFACEMTU 26
- #define DHCP_OPTION_SUBNETSLOCAL 27
- #define DHCP_OPTION_BCASTADDRESS 28
- #define DHCP_OPTION_MASKDISCOVERY 29
- #define DHCP_OPTION_MASKSUPPLIER 30
- #define DHCP_OPTION_ROUTERDISCOVERY 31
- #define DHCP_OPTION_ROUTERSOLIC 32
- #define DHCP_OPTION_STATICROUTE 33
- #define DHCP_OPTION_TRAILERENCAPS 34
- #define DHCP_OPTION_ARPTIMEOUT 35
- #define DHCP_OPTION_ETHERNETENCAPS 36
- #define DHCP_OPTION_TCPTTL 37
- #define DHCP_OPTION_TCPKEEPALIVEINT 38
- #define DHCP_OPTION_TCPKEEPALIVEGRBG 39
- #define DHCP_OPTION_NISDOMAIN 40
- #define DHCP_OPTION_NISSERVERS 41
- #define DHCP_OPTION_NTPSERVERS 42
- #define DHCP_OPTION_VENDORSPECIFIC 43
- #define DHCP_OPTION_NETBIOSNAMESERV 44
- #define DHCP_OPTION_NETBIOSDGDIST 45
- #define DHCP_OPTION_NETBIOSNODETYPE 46
- #define DHCP_OPTION_NETBIOSSCOPE 47
- #define DHCP_OPTION_X11FONTS 48
- #define DHCP_OPTION_X11DISPLAYMNGR 49
- #define DHCP_OPTION_REQUESTEDIPADDR 50
- #define DHCP_OPTION_IPADDRLEASE 51
- #define DHCP_OPTION_OVERLOAD 52
- #define DHCP_OPTION_MESSAGETYPE 53
- #define DHCP_OPTION_SERVERID 54
- #define DHCP_OPTION_PARAMREQLIST 55
- #define DHCP_OPTION_MESSAGE 56
- #define DHCP_OPTION_MAXDHCPMSGSIZE 57
- #define DHCP_OPTION_RENEWALTIME 58
- #define DHCP_OPTION_REBINDINGTIME 59
- #define DHCP_OPTION_VENDORCLASSID 60
- #define DHCP_OPTION_CLIENTID 61
- #define DHCP_OPTION_NISPLUSDOMAIN 64
- #define DHCP_OPTION_NISPLUSSERVERS 65
- #define DHCP_OPTION_TFTPSERVER 66
- #define DHCP_OPTION_BOOTFILE 67
- #define DHCP_OPTION_MOBILEIPHOME 68
- #define DHCP_OPTION_SMTPSERVER 69
- #define DHCP_OPTION_POP3SERVER 70
- #define DHCP_OPTION_NNTPSERVER 71
- #define DHCP_OPTION_WWWSERVER 72
- #define DHCP_OPTION_FINGERSERVER 73
- #define DHCP_OPTION_IRCSERVER 74
- #define DHCP_OPTION_STSERVER 75
- #define DHCP_OPTION_STDASERVER 76
- #define DHCP_OPTION_USERCLASS 77
- #define DHCP_OPTION_SLPDIRAGENT 78
- #define DHCP_OPTION_SLPDIRSCOPE 79
- #define DHCP_OPTION_CLIENTFQDN 81
- #define DHCP_OPTION_RELAYAGENTINFO 82
- #define DHCP_OPTION_NDSSERVERS 85
- #define DHCP_OPTION_NDSTREENAME 86
- #define DHCP_OPTION_NDSCONTEXT 87
- #define DHCP_OPTION_AUTHENTICATION 90
- #define DHCP_OPTION_CLIENTSYSTEM 93
- #define DHCP_OPTION_CLIENTNDI 94
- #define DHCP_OPTION_LDAP 95
- #define DHCP_OPTION_UUID_GUID 97
- #define DHCP_OPTION_USER_AUTH 98
- #define DHCP_OPTION_NETINFOADDRESS 112
- #define DHCP_OPTION_NETINFOTAG 113
- #define DHCP_OPTION_URL 114
- #define DHCP_OPTION_AUTO_CONFIG 116
- #define DHCP_OPTION_NAMESERVICESEARCH 117
- #define DHCP_OPTION_SUBNETSELECTION 118
- #define DHCP_OPTION_DOMAINSEARCH 119
- #define DHCP_OPTION_SIPSERVERSDHCP 120
- #define DHCP_OPTION_CLASSLESSSTATICROUTE 121
- #define DHCP_OPTION_CCC 122
- #define DHCP_OPTION_GEOCONF 123
- #define DHCP_OPTION_V_IVENDORCLASS 124
- #define DHCP_OPTION_V_IVENDOR_SPECIFIC 125
- #define DHCP_OPTION_TFPTSERVERIPADDRESS 128
- #define DHCP_OPTION_CALLSERVERIPADDRESS 129
- #define DHCP_OPTION_DISCRIMINATIONSTRING 130
- #define DHCP_OPTION_REMOTESTATISTICSSERVER 131
- #define DHCP_OPTION_802_1PVLANID 132
- #define DHCP_OPTION_802_1QL2PRIORITY 133
- #define DHCP_OPTION_DIFFSERVCODEPOINT 134
- #define DHCP_OPTION_HTTPPROXYFORPHONE_SPEC 135
- #define DHCP_OPTION_SERIAL 253
- #define DHCP_OPTION_NEXTSERVER 254
- #define DHCP_OPTION_END 255
- //#define DHCP_VENDORDATA_SIZE 272
- //#define DHCP_VENDORDATA_SIZE 64
- //#define DHCP_VENDORDATA_SIZE 784
- //#define DHCP_PACKET_SIZE 1024
- //#define DHCP_MIN_SIZE 44
- //#define DHCP_MAX_CLIENTS 254
- #define IPPORT_DHCPS 67
- #define IPPORT_DHCPC 68
- #define VM_STANFORD 0x5354414EUL
- #define VM_RFC1048 0x63825363UL
- struct data3
- {
- BYTE opt_code;
- BYTE size;
- BYTE value[256];
- };
- struct data13 //dhcp range
- {
- BYTE rangeSetInd;
- DWORD rangeStart;
- DWORD rangeEnd;
- DWORD mask;
- BYTE *options;
- time_t *expiry;
- data7 **dhcpEntry;
- };
- struct data14 //rangeSet
- {
- BYTE active;
- BYTE *macStart[32];
- BYTE *macEnd[32];
- BYTE macSize[32];
- BYTE *vendClass[32];
- BYTE vendClassSize[32];
- BYTE *userClass[32];
- BYTE userClassSize[32];
- };
- struct data19
- {
- SOCKET sock;
- SOCKADDR_IN addr;
- socklen_t sockLen;
- linger ling;
- int bytes;
- char *buffer;
- };
- struct data20
- {
- BYTE *options;
- DWORD ip;
- DWORD mask;
- BYTE rangeSetInd;
- };
- struct msg_control
- {
- uint cmsg_len;
- int cmsg_level;
- int cmsg_type;
- in_pktinfo pktinfo;
- };
- struct dhcp_header
- {
- BYTE bp_op;
- BYTE bp_htype;
- BYTE bp_hlen;
- BYTE bp_hops;
- DWORD bp_xid;
- WORD bp_secs;
- BYTE bp_broadcast;
- BYTE bp_spare;
- DWORD bp_ciaddr;
- DWORD bp_yiaddr;
- DWORD bp_siaddr;
- DWORD bp_giaddr;
- BYTE bp_chaddr[16];
- char bp_sname[64];
- BYTE bp_file[128];
- BYTE bp_magic_num[4];
- };
- struct dhcp_packet
- {
- dhcp_header header;
- BYTE vend_data[1024 - sizeof(dhcp_header)];
- };
- struct data1 //dhcpRequst
- {
- DWORD lease;
- union
- {
- char raw[sizeof(dhcp_packet)];
- dhcp_packet dhcpp;
- };
- char hostname[256];
- DWORD server;
- DWORD reqIP;
- int bytes;
- SOCKADDR_IN addr;
- SOCKADDR_IN target;
- socklen_t sockLen;
- WORD messsize;
- BYTE *vp;
- data7 *dhcpEntry;
- data3 agentOption;
- data3 clientId;
- DWORD serial;
- BYTE vendClass[256];
- BYTE userClass[256];
- BYTE vendClassSize;
- BYTE userClassSize;
- msghdr msg;
- iovec iov[1];
- msg_control msgcontrol;
- BYTE paramreqlist[256];
- BYTE opAdded[256];
- BYTE req_type;
- BYTE resp_type;
- BYTE sockInd;
- };
- struct DhcpConnType
- {
- SOCKET sock;
- SOCKADDR_IN addr;
- DWORD server;
- DWORD mask;
- int reUseVal;
- int reUseSize;
- union
- {
- int broadCastVal;
- bool pktinfoVal;
- };
- union
- {
- int broadCastSize;
- unsigned int pktinfoSize;
- };
- };
- struct data8 //client
- {
- WORD dhcpInd;
- BYTE bp_hlen;
- BYTE active;
- DWORD source;
- DWORD ip;
- time_t expiry;
- BYTE bp_chaddr[16];
- char hostname[64];
- };
- struct data2
- {
- DhcpConnType dhcpListener;
- DhcpConnType dhcpConn[MAX_SERVERS];
- ConnType dhcpReplConn;
- ConnType dnsUdpConn[MAX_SERVERS];
- ConnType forwConn;
- ConnType dnsTcpConn[MAX_SERVERS];
- ConnType httpConn;
- char zoneSmall[256];
- char zone[256];
- BYTE zLen;
- char authority[256];
- BYTE aLen;
- char ns[256];
- DWORD nsIP;
- DWORD mask;
- char servername[128];
- char servername_fqn[256];
- DWORD dns[MAX_SERVERS];
- DWORD allServers[MAX_SERVERS];
- DWORD listenServers[MAX_SERVERS];
- DWORD listenMasks[MAX_SERVERS];
- DWORD staticServers[MAX_SERVERS];
- DWORD staticMasks[MAX_SERVERS];
- DWORD zoneServers[MAX_SERVERS];
- data11 mxServers[2][5];
- BYTE mxCount[2];
- DWORD lease;
- DWORD serial1;
- DWORD serial2;
- DWORD refresh;
- DWORD retry;
- DWORD expire;
- DWORD minimum;
- WORD minCache;
- WORD maxCache;
- time_t expireTime;
- SOCKET maxFD;
- data6 dnsRoutes[32];
- data16 wildHosts[32];
- data12 dnsRanges[32];
- data13 dhcpRanges[32];
- data14 rangeSet[32];
- BYTE macArray[32];
- BYTE vendArray[32];
- BYTE userArray[32];
- DWORD rangeStart;
- DWORD rangeEnd;
- WORD dhcpIndex;
- WORD dhcpSize;
- BYTE *options;
- FILE *logfile;
- BYTE currentDNS;
- //BYTE queriesFailed;
- BYTE dhcpLogLevel;
- BYTE dnsLogLevel;
- BYTE authorized;
- BYTE replication;
- BYTE hasFilter;
- };
- struct data4
- {
- char opName[40];
- BYTE opTag;
- BYTE opType;
- };
- struct data15
- {
- union
- {
- //DWORD ip;
- unsigned ip:32;
- BYTE octate[4];
- };
- };
- //Function Prototypes
- bool addServer(DWORD*, DWORD);
- bool checkMask(DWORD);
- bool checkRange(BYTE, bool, bool, bool);
- bool chkQu(char*);
- bool getSection(char*, char*, BYTE, char*);
- bool isInt(char*);
- bool isIP(char*);
- bool wildcmp(char *string, char *wild);
- BYTE fromBase64(BYTE*, char*);
- BYTE fromUUE(BYTE*, char*);
- BYTE getBaseValue(BYTE);
- BYTE makeLocal(char*);
- BYTE makeLocal(DWORD);
- BYTE pIP(void*, DWORD);
- BYTE pULong(void*, DWORD);
- BYTE pUShort(void*, WORD);
- BYTE *loadOptions(char*, char*, DWORD*, DWORD*, char*);
- char *IP62String(char*, BYTE*);
- char getRangeInd(DWORD);
- char *cloneString(char*);
- char *getHexValue(BYTE*, char*, BYTE*);
- char *getResult(data5*);
- char *hex2String(char*, BYTE*, BYTE, char);
- char *IP2String(char*, DWORD);
- char *myGetToken(char*, BYTE);
- char *myLower(char *string);
- char *myTrim(char*, char*);
- char *myUpper(char *string);
- char *strqtype(char*, BYTE);
- char *toBase64(BYTE*, BYTE);
- char *toUUE(char*, BYTE*, BYTE);
- data7 *findEntry(BYTE, char*);
- data7 *findEntry(BYTE, char*, BYTE);
- DWORD alad(data1*);
- DWORD calcMask(DWORD, DWORD);
- DWORD chad(data1*);
- DWORD fIP(void*);
- DWORD fULong(void*);
- DWORD getClassNetwork(DWORD);
- DWORD getRefresh(BYTE, char*);
- DWORD getSerial(char*);
- DWORD my_inet_addr(char*);
- DWORD resad(data1*);
- DWORD sdmess(data1*);
- DWORD sendRepl(data1*);
- DWORD sendRepl(data7*);
- DWORD updateDHCP(data1*);
- DWORD *findServer(DWORD*, DWORD);
- int getIndex(char, DWORD);
- void *updateStateFile(void*);
- void addAuth(data5*);
- void addDHCPRange(char*);
- void addMacRange(BYTE, char*);
- void addVendClass(BYTE, char*, BYTE);
- void addUserClass(BYTE, char*, BYTE);
- void addEntry(BYTE, data7*);
- void addOptions(data1*);
- void addRRA(data5*);
- void addRRAAFXR(data5*);
- void addRRAd(data5*);
- void addRRCNAFXR(data5*);
- void addRRExt(data5*);
- void addRRLocalhostA(data5*);
- void addRRLocalhostPtr(data5*);
- void addRRMX(data5*);
- void addRRMXAFXR(data5*);
- void addRRMXOne(data5*, BYTE);
- void addRRNone(data5*);
- void addRRNSA(data5*);
- void addRRNSPtr(data5*);
- void addRRPtr(data5*);
- void addRRPtrAFXR(data5*);
- void addRRServerA(data5*);
- void addRRSOA(data5*, DWORD);
- void addRRSTAAFXR(data5*);
- void addToCache(BYTE, BYTE, char*, DWORD, time_t, BYTE, BYTE, DWORD);
- void calcRangeLimits(DWORD, DWORD, DWORD*, DWORD*);
- void catch_int(int);
- void checkDNS(BYTE);
- void checkSize(BYTE);
- void closeConn();
- void delDnsEntry(BYTE, data7*);
- void getDServ();
- void getSecondary();
- void getServ();
- void init();
- void logMess(char*, BYTE);
- void logDHCPMess(char*, BYTE);
- void logDNSMess(char*, BYTE);
- void logDNSMess(data5*, char*, BYTE);
- void logTCPMess(data5*, char*, BYTE);
- void mySplit(char*, char*, char*, char);
- void *sendHTTP(void*);
- void procHTTP(data19*);
- void procTCP(void*);
- void pvdata(data1*, data3*);
- void recvRepl(data1*);
- void setLeaseExpiry(data7*, time_t, bool);
- void setLeaseExpiry(DWORD, time_t);
- void *refresh(void*);
- WORD fdnmess(data5*);
- WORD fQu(char*, dnsPacket*, char*);
- WORD frdnmess(data5*);
- WORD fUShort(void*);
- WORD gdmess(data1*, BYTE);
- WORD gdnmess(data5*, BYTE);
- WORD listSections(char*, int, char*);
- WORD myTokenize(char*, char*, char*, bool);
- WORD pQu(char*, char*);
- WORD qLen(char*);
- WORD recvTcpDnsMess(SOCKET, char*, bool);
- WORD scanloc(data5*);
- WORD sdnmess(data5*);
- WORD sTCPmess(data5 *req);