"Fossies" - the Fresh Open Source Software Archive

Member "opendhcp/opendhcpd.h" (10 Sep 2021, 15881 Bytes) of package /linux/misc/opendhcpV1.80.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "opendhcpd.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: V1.75_vs_V1.80.

    1 /**************************************************************************
    2 *   Copyright (C) 2005 by Achal Dhir                                      *
    3 *   achaldhir@gmail.com                                                   *
    4 *                                                                         *
    5 *   This program is free software; you can redistribute it and/or modify  *
    6 *   it under the terms of the GNU General Public License as published by  *
    7 *   the Free Software Foundation; either version 2 of the License, or     *
    8 *   (at your option) any later version.                                   *
    9 *                                                                         *
   10 *   This program is distributed in the hope that it will be useful,       *
   11 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
   12 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
   13 *   GNU General Public License for more details.                          *
   14 *                                                                         *
   15 *   You should have received a copy of the GNU General Public License     *
   16 *   along with this program; if not, write to the                         *
   17 *   Free Software Foundation, Inc.,                                       *
   18 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
   19 ***************************************************************************/
   20 //This file defines all structures and constants
   21 //for both DHCP and DNS Servers
   22 #define MAX_SERVERS 125
   23 #define MAX_DHCP_RANGES 125
   24 #define MAX_RANGE_SETS 125
   25 #define MAX_RANGE_FILTERS 32
   26 
   27 #ifndef LOG_MAKEPRI
   28 #define LOG_MAKEPRI(fac, pri)   (((fac) << 3) | (pri))
   29 #endif
   30 
   31 #ifndef SIOCGIFCONF
   32 #include <sys/sockio.h>
   33 #endif
   34 
   35 #ifndef _UIO_H_
   36 #include <sys/uio.h>
   37 #endif
   38 
   39 /*
   40 //#ifndef _LINUX_IN_H
   41 //#ifndef _NETINET_IN_H
   42 struct in_pktinfo
   43 {
   44     unsigned int   ipi_ifindex;  // Interface index
   45     struct in_addr ipi_spec_dst; // Local address
   46     struct in_addr ipi_addr;     // Header Destination address
   47 };
   48 typedef struct in_pktinfo IN_PKTINFO;
   49 //#endif
   50 //#endif
   51 */
   52 
   53 #ifndef INADDR_NONE
   54 #define INADDR_NONE ULONG_MAX
   55 #endif
   56 
   57 #ifndef IFF_DYNAMIC
   58 #define IFF_DYNAMIC 0x8000
   59 #endif
   60 
   61 #define MYBYTE unsigned char
   62 #define MYWORD unsigned short
   63 #define MYDWORD unsigned int
   64 #define SOCKET_ERROR -1
   65 #define INVALID_SOCKET -1
   66 #define SOCKADDR_IN sockaddr_in
   67 #define SOCKADDR sockaddr
   68 #define SOCKET int
   69 #define BOOL bool
   70 #define LPSOCKADDR sockaddr*
   71 #define closesocket close
   72 
   73 struct data7 //cache
   74 {
   75     char *mapname;
   76     time_t expiry;
   77     union
   78     {
   79         struct
   80         {
   81             MYBYTE cType;
   82             MYBYTE dnsType;
   83             MYBYTE sockInd;
   84             MYBYTE dnsIndex;
   85         };
   86         struct
   87         {
   88             unsigned fixed: 1;
   89             unsigned local: 1;
   90             unsigned display: 1;
   91             unsigned subnetFlg: 1;
   92             signed rangeInd: 8;
   93             unsigned dhcpInd: 20;
   94         };
   95     };
   96     union
   97     {
   98         char *name;
   99         MYBYTE *options;
  100     };
  101     union
  102     {
  103         int bytes;
  104         MYDWORD ip;
  105         SOCKADDR_IN *addr;
  106     };
  107     union
  108     {
  109         MYBYTE *response;
  110         char *hostname;
  111         char *query;
  112     };
  113     MYBYTE data;
  114 };
  115 
  116 struct data71 //Lump
  117 {
  118     char *mapname;
  119     MYBYTE *response;
  120     char *hostname;
  121     char *query;
  122     SOCKADDR_IN *addr;
  123     MYBYTE *options;
  124     MYWORD optionSize;
  125     int bytes;
  126     MYBYTE cType;
  127     MYBYTE dnsType;
  128 };
  129 
  130 typedef multimap<string, data7*> hostMap;
  131 typedef multimap<time_t, data7*> expiryMap;
  132 typedef map<string, data7*> dhcpMap;
  133 
  134 struct ConnType
  135 {
  136     SOCKET sock;
  137     SOCKADDR_IN addr;
  138     MYDWORD server;
  139     MYWORD port;
  140     bool loaded;
  141     bool ready;
  142 };
  143 
  144 #define BOOTP_REQUEST  1
  145 #define BOOTP_REPLY    2
  146 
  147 #define DHCP_MESS_NONE       0
  148 #define DHCP_MESS_DISCOVER   1
  149 #define DHCP_MESS_OFFER      2
  150 #define DHCP_MESS_REQUEST    3
  151 #define DHCP_MESS_DECLINE    4
  152 #define DHCP_MESS_ACK        5
  153 #define DHCP_MESS_NAK        6
  154 #define DHCP_MESS_RELEASE    7
  155 #define DHCP_MESS_INFORM     8
  156 
  157 
  158 // DHCP OPTIONS
  159 #define DHCP_OPTION_PAD                     0
  160 #define DHCP_OPTION_NETMASK                 1
  161 #define DHCP_OPTION_TIMEOFFSET              2
  162 #define DHCP_OPTION_ROUTER                  3
  163 #define DHCP_OPTION_TIMESERVER              4
  164 #define DHCP_OPTION_NAMESERVER              5
  165 #define DHCP_OPTION_DNS                     6
  166 #define DHCP_OPTION_LOGSERVER               7
  167 #define DHCP_OPTION_COOKIESERVER            8
  168 #define DHCP_OPTION_LPRSERVER               9
  169 #define DHCP_OPTION_IMPRESSSERVER           10
  170 #define DHCP_OPTION_RESLOCSERVER            11
  171 #define DHCP_OPTION_HOSTNAME                12
  172 #define DHCP_OPTION_BOOTFILESIZE            13
  173 #define DHCP_OPTION_MERITDUMP               14
  174 #define DHCP_OPTION_DOMAINNAME              15
  175 #define DHCP_OPTION_SWAPSERVER              16
  176 #define DHCP_OPTION_ROOTPATH                17
  177 #define DHCP_OPTION_EXTSPATH                18
  178 #define DHCP_OPTION_IPFORWARD               19
  179 #define DHCP_OPTION_NONLOCALSR              20
  180 #define DHCP_OPTION_POLICYFILTER            21
  181 #define DHCP_OPTION_MAXREASSEMBLE           22
  182 #define DHCP_OPTION_IPTTL                   23
  183 #define DHCP_OPTION_PATHMTUAGING            24
  184 #define DHCP_OPTION_PATHMTUPLATEAU          25
  185 #define DHCP_OPTION_INTERFACEMTU            26
  186 #define DHCP_OPTION_SUBNETSLOCAL            27
  187 #define DHCP_OPTION_BCASTADDRESS            28
  188 #define DHCP_OPTION_MASKDISCOVERY           29
  189 #define DHCP_OPTION_MASKSUPPLIER            30
  190 #define DHCP_OPTION_ROUTERDISCOVERY         31
  191 #define DHCP_OPTION_ROUTERSOLIC             32
  192 #define DHCP_OPTION_STATICROUTE             33
  193 #define DHCP_OPTION_TRAILERENCAPS           34
  194 #define DHCP_OPTION_ARPTIMEOUT              35
  195 #define DHCP_OPTION_ETHERNETENCAPS          36
  196 #define DHCP_OPTION_TCPTTL                  37
  197 #define DHCP_OPTION_TCPKEEPALIVEINT         38
  198 #define DHCP_OPTION_TCPKEEPALIVEGRBG        39
  199 #define DHCP_OPTION_NISDOMAIN               40
  200 #define DHCP_OPTION_NISSERVERS              41
  201 #define DHCP_OPTION_NTPSERVERS              42
  202 #define DHCP_OPTION_VENDORSPECIFIC          43
  203 #define DHCP_OPTION_NETBIOSNAMESERV         44
  204 #define DHCP_OPTION_NETBIOSDGDIST           45
  205 #define DHCP_OPTION_NETBIOSNODETYPE         46
  206 #define DHCP_OPTION_NETBIOSSCOPE            47
  207 #define DHCP_OPTION_X11FONTS                48
  208 #define DHCP_OPTION_X11DISPLAYMNGR          49
  209 #define DHCP_OPTION_REQUESTEDIPADDR         50
  210 #define DHCP_OPTION_IPADDRLEASE             51
  211 #define DHCP_OPTION_OVERLOAD                52
  212 #define DHCP_OPTION_MESSAGETYPE             53
  213 #define DHCP_OPTION_SERVERID                54
  214 #define DHCP_OPTION_PARAMREQLIST            55
  215 #define DHCP_OPTION_MESSAGE                 56
  216 #define DHCP_OPTION_MAXDHCPMSGSIZE          57
  217 #define DHCP_OPTION_RENEWALTIME             58
  218 #define DHCP_OPTION_REBINDINGTIME           59
  219 #define DHCP_OPTION_VENDORCLASSID           60
  220 #define DHCP_OPTION_CLIENTID                61
  221 #define DHCP_OPTION_NETWARE_IPDOMAIN        62
  222 #define DHCP_OPTION_NETWARE_IPOPTION        63
  223 #define DHCP_OPTION_NISPLUSDOMAIN           64
  224 #define DHCP_OPTION_NISPLUSSERVERS          65
  225 #define DHCP_OPTION_TFTPSERVER              66
  226 #define DHCP_OPTION_BOOTFILE                67
  227 #define DHCP_OPTION_MOBILEIPHOME            68
  228 #define DHCP_OPTION_SMTPSERVER              69
  229 #define DHCP_OPTION_POP3SERVER              70
  230 #define DHCP_OPTION_NNTPSERVER              71
  231 #define DHCP_OPTION_WWWSERVER               72
  232 #define DHCP_OPTION_FINGERSERVER            73
  233 #define DHCP_OPTION_IRCSERVER               74
  234 #define DHCP_OPTION_STSERVER                75
  235 #define DHCP_OPTION_STDASERVER              76
  236 #define DHCP_OPTION_USERCLASS               77
  237 #define DHCP_OPTION_SLPDIRAGENT             78
  238 #define DHCP_OPTION_SLPDIRSCOPE             79
  239 #define DHCP_OPTION_CLIENTFQDN              81
  240 #define DHCP_OPTION_RELAYAGENTINFO          82
  241 #define DHCP_OPTION_I_SNS                   83
  242 #define DHCP_OPTION_NDSSERVERS              85
  243 #define DHCP_OPTION_NDSTREENAME             86
  244 #define DHCP_OPTION_NDSCONTEXT              87
  245 #define DHCP_OPTION_AUTHENTICATION          90
  246 #define DHCP_OPTION_CLIENTSYSTEM            93
  247 #define DHCP_OPTION_CLIENTNDI               94
  248 #define DHCP_OPTION_LDAP                    95
  249 #define DHCP_OPTION_UUID_GUID               97
  250 #define DHCP_OPTION_USER_AUTH               98
  251 #define DHCP_OPTION_P_CODE                  100
  252 #define DHCP_OPTION_T_CODE                  101
  253 #define DHCP_OPTION_NETINFOADDRESS          112
  254 #define DHCP_OPTION_NETINFOTAG              113
  255 #define DHCP_OPTION_URL                     114
  256 #define DHCP_OPTION_AUTO_CONFIG             116
  257 #define DHCP_OPTION_NAMESERVICESEARCH       117
  258 #define DHCP_OPTION_SUBNETSELECTION         118
  259 #define DHCP_OPTION_DOMAINSEARCH            119
  260 #define DHCP_OPTION_SIPSERVERSDHCP          120
  261 #define DHCP_OPTION_CLASSLESSSTATICROUTE    121
  262 #define DHCP_OPTION_CCC                     122
  263 #define DHCP_OPTION_GEOCONF                 123
  264 #define DHCP_OPTION_V_IVENDORCLASS          124
  265 #define DHCP_OPTION_V_IVENDOR_SPECIFIC      125
  266 #define DHCP_OPTION_TFPTSERVERIPADDRESS     128
  267 #define DHCP_OPTION_CALLSERVERIPADDRESS     129
  268 #define DHCP_OPTION_DISCRIMINATIONSTRING    130
  269 #define DHCP_OPTION_REMOTESTATISTICSSERVER  131
  270 #define DHCP_OPTION_802_1PVLANID            132
  271 #define DHCP_OPTION_802_1QL2PRIORITY        133
  272 #define DHCP_OPTION_DIFFSERVCODEPOINT       134
  273 #define DHCP_OPTION_HTTPPROXYFORPHONE_SPEC  135
  274 #define DHCP_OPTION_SERIAL                  252
  275 #define DHCP_OPTION_BP_FILE                 253
  276 #define DHCP_OPTION_NEXTSERVER              254
  277 #define DHCP_OPTION_END                     255
  278 
  279 //#define DHCP_VENDORDATA_SIZE       272
  280 //#define DHCP_VENDORDATA_SIZE       64
  281 //#define DHCP_VENDORDATA_SIZE       784
  282 //#define DHCP_PACKET_SIZE          1024
  283 //#define DHCP_MIN_SIZE              44
  284 //#define DHCP_MAX_CLIENTS           254
  285 #define IPPORT_DHCPS   67
  286 #define IPPORT_DHCPC   68
  287 #define VM_STANFORD  0x5354414EUL
  288 #define VM_RFC1048   0x63825363UL
  289 
  290 struct data3
  291 {
  292     MYBYTE opt_code;
  293     MYBYTE size;
  294     MYBYTE value[256];
  295 };
  296 
  297 struct data4
  298 {
  299     char opName[40];
  300     MYBYTE opTag;
  301     MYBYTE opType;
  302     bool permitted;
  303 };
  304 
  305 #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
  306 #define MY_MAX_TIME UINT_MAX
  307 struct data8 //client
  308 {
  309     union
  310     {
  311         MYDWORD filler;
  312         struct
  313         {
  314             unsigned dhcpInd: 20;
  315             unsigned bp_hlen: 8;
  316             unsigned fixed: 1;
  317             unsigned local: 1;
  318             unsigned display: 1;
  319             unsigned subnetFlg: 1;
  320         };
  321     };
  322     MYDWORD ip;
  323     time_t expiry;
  324     MYBYTE bp_chaddr[16];
  325     char hostname[64];
  326 };
  327 #else
  328 #define MY_MAX_TIME INT_MAX
  329 struct data8 //client
  330 {
  331     union
  332     {
  333         MYDWORD filler;
  334         struct
  335         {
  336             unsigned dhcpInd: 20;
  337             unsigned bp_hlen: 8;
  338             unsigned fixed: 1;
  339             unsigned local: 1;
  340             unsigned display: 1;
  341             unsigned subnetFlg: 1;
  342         };
  343     };
  344     MYDWORD ip;
  345     time_t expiry;
  346     MYDWORD filler1;
  347     MYBYTE bp_chaddr[16];
  348     char hostname[64];
  349 };
  350 #endif
  351 
  352 struct msg_control
  353 {
  354     ulong cmsg_len;
  355     int cmsg_level;
  356     int cmsg_type;
  357     in_pktinfo pktinfo;
  358 };
  359 
  360 struct dhcp_header
  361 {
  362     MYBYTE bp_op;
  363     MYBYTE bp_htype;
  364     MYBYTE bp_hlen;
  365     MYBYTE bp_hops;
  366     MYDWORD bp_xid;
  367     MYWORD bp_secs;
  368     MYBYTE bp_broadcast;
  369     MYBYTE bp_spare;
  370     MYDWORD bp_ciaddr;
  371     MYDWORD bp_yiaddr;
  372     MYDWORD bp_siaddr;
  373     MYDWORD bp_giaddr;
  374     MYBYTE bp_chaddr[16];
  375     char bp_sname[64];
  376     MYBYTE bp_file[128];
  377     MYBYTE bp_magic_num[4];
  378 };
  379 
  380 struct dhcp_packet
  381 {
  382     dhcp_header header;
  383     MYBYTE vend_data[1024 - sizeof(dhcp_header)];
  384 };
  385 
  386 struct data13 //dhcp range
  387 {
  388     MYBYTE rangeSetInd;
  389     MYDWORD rangeStart;
  390     MYDWORD rangeEnd;
  391     MYDWORD mask;
  392     MYBYTE *options;
  393     time_t *expiry;
  394     data7 **dhcpEntry;
  395 };
  396 
  397 struct data14 //rangeSet
  398 {
  399     MYBYTE active;
  400     MYBYTE *macStart[MAX_RANGE_FILTERS];
  401     MYBYTE *macEnd[MAX_RANGE_FILTERS];
  402     MYBYTE macSize[MAX_RANGE_FILTERS];
  403     MYBYTE *vendClass[MAX_RANGE_FILTERS];
  404     MYBYTE vendClassSize[MAX_RANGE_FILTERS];
  405     MYBYTE *userClass[MAX_RANGE_FILTERS];
  406     MYBYTE userClassSize[MAX_RANGE_FILTERS];
  407     MYDWORD subnetIP[MAX_RANGE_FILTERS];
  408     MYDWORD targetIP;
  409 };
  410 
  411 struct data15
  412 {
  413     union
  414     {
  415         //MYDWORD ip;
  416         unsigned ip:32;
  417         MYBYTE octate[4];
  418     };
  419 };
  420 
  421 struct data17
  422 {
  423     MYBYTE macArray[MAX_RANGE_SETS];
  424     MYBYTE vendArray[MAX_RANGE_SETS];
  425     MYBYTE userArray[MAX_RANGE_SETS];
  426     MYBYTE subnetArray[MAX_RANGE_SETS];
  427     bool macFound;
  428     bool vendFound;
  429     bool userFound;
  430     bool subnetFound;
  431 };
  432 
  433 struct data19
  434 {
  435     SOCKET sock;
  436     socklen_t sockLen;
  437     SOCKADDR_IN remote;
  438     linger ling;
  439     int memSize;
  440     int bytes;
  441     char *dp;
  442 };
  443 
  444 struct data20
  445 {
  446     MYBYTE options[sizeof(dhcp_packet)];
  447     MYWORD optionSize;
  448     MYDWORD ip;
  449     MYDWORD mask;
  450     MYBYTE rangeSetInd;
  451 };
  452 
  453 struct data9 //dhcpRequst
  454 {
  455     MYDWORD lease;
  456     union
  457     {
  458         char raw[sizeof(dhcp_packet)];
  459         dhcp_packet dhcpp;
  460     };
  461     char hostname[256];
  462     char chaddr[64];
  463     MYDWORD server;
  464     MYDWORD reqIP;
  465     int bytes;
  466     SOCKADDR_IN remote;
  467     socklen_t sockLen;
  468     MYWORD messsize;
  469     msghdr msg;
  470     iovec iov[1];
  471     msg_control msgcontrol;
  472     MYBYTE *vp;
  473     data7 *dhcpEntry;
  474     data3 agentOption;
  475     data3 clientId;
  476     data3 subnet;
  477     data3 vendClass;
  478     data3 userClass;
  479     MYDWORD subnetIP;
  480     MYDWORD targetIP;
  481     MYDWORD rebind;
  482     MYBYTE paramreqlist[256];
  483     MYBYTE opAdded[256];
  484     MYBYTE req_type;
  485     MYBYTE resp_type;
  486     MYBYTE sockInd;
  487 };
  488 
  489 struct DhcpConnType
  490 {
  491     SOCKET sock;
  492     SOCKADDR_IN addr;
  493     MYDWORD server;
  494     MYWORD port;
  495     bool loaded;
  496     bool ready;
  497     MYDWORD mask;
  498     int reUseVal;
  499     int reUseSize;
  500     union
  501     {
  502         int broadCastVal;
  503         bool pktinfoVal;
  504     };
  505     union
  506     {
  507         int broadCastSize;
  508         unsigned int pktinfoSize;
  509     };
  510 };
  511 
  512 struct data1
  513 {
  514     DhcpConnType dhcpConn[MAX_SERVERS];
  515     DhcpConnType dhcpListener;
  516     ConnType httpConn;
  517     MYDWORD allServers[MAX_SERVERS];
  518     MYDWORD allMasks[MAX_SERVERS];
  519     MYDWORD listenServers[MAX_SERVERS];
  520     MYDWORD listenMasks[MAX_SERVERS];
  521     MYDWORD staticServers[MAX_SERVERS];
  522     SOCKET maxFD;
  523     time_t dhcpRepl;
  524     bool ready;
  525     bool busy;
  526 };
  527 
  528 struct data2
  529 {
  530     char servername[128];
  531     char servername_fqn[256];
  532     char zone[256];
  533     MYBYTE zLen;
  534     MYDWORD failureCount;
  535     MYDWORD failureCycle;
  536     bool ifspecified;
  537     ConnType dhcpReplConn;
  538     MYDWORD oldservers[MAX_SERVERS];
  539     MYDWORD specifiedServers[MAX_SERVERS];
  540     MYDWORD zoneServers[2];
  541     MYDWORD httpClients[8];
  542     char logFileName[256];
  543     data13 dhcpRanges[MAX_DHCP_RANGES];
  544     data14 rangeSet[MAX_RANGE_SETS];
  545     MYDWORD mask;
  546     MYDWORD lease;
  547     SOCKET fixedSocket;
  548     MYDWORD serial;
  549     MYDWORD dhcpSize;
  550     time_t dhcpRepl;
  551     MYDWORD rangeStart;
  552     MYDWORD rangeEnd;
  553     MYBYTE *options;
  554     MYWORD dhcpInd;
  555     MYBYTE replication;
  556     MYBYTE dhcpLogLevel;
  557     struct ifreq IfcBuf[MAX_SERVERS];
  558     MYBYTE ifc_len;
  559     pid_t ppid;
  560     bool hasFilter;
  561     char rangeCount;
  562 };
  563 
  564 
  565 //Function Prototypes
  566 bool checkIP(data9 *req, data17 *rangeData, MYDWORD ip);
  567 bool checkMask(MYDWORD);
  568 bool checkRange(data17*, char);
  569 bool detectChange();
  570 bool getSection(const char*, char*, MYBYTE, char*);
  571 bool isInt(char*);
  572 bool isIP(char*);
  573 FILE *openSection(const char*, MYBYTE);
  574 MYBYTE pIP(void*, MYDWORD);
  575 MYBYTE pUInt(void*, MYDWORD);
  576 MYBYTE pUShort(void*, MYWORD);
  577 MYBYTE addServer(MYDWORD*, MYBYTE, MYDWORD);
  578 char getRangeInd(MYDWORD);
  579 char* myTrim(char*, char*);
  580 char* myGetToken(char*, MYBYTE);
  581 char* cloneString(char*);
  582 char* getHexValue(MYBYTE*, char*, MYBYTE*);
  583 char* genHostName(char*, MYBYTE*, MYBYTE);
  584 char* hex2String(char*, MYBYTE*, MYBYTE);
  585 char* IP2String(char*, MYDWORD);
  586 char* IP2arpa(char*, MYDWORD);
  587 char* IP62String(char*, MYBYTE*);
  588 char* myUpper(char* string);
  589 char* myLower(char* string);
  590 char* readSection(char*, FILE*);
  591 data7* findDHCPEntry(char*);
  592 data7 *createCache(data71 *lump);
  593 MYDWORD alad(data9*);
  594 MYDWORD calcMask(MYDWORD, MYDWORD);
  595 MYDWORD chaddr(data9*);
  596 MYDWORD resad(data9*);
  597 MYDWORD fUInt(void *raw);
  598 MYDWORD sdmess(data9*);
  599 MYDWORD sendRepl(data9 *req);
  600 MYDWORD* findServer(MYDWORD*, MYBYTE, MYDWORD);
  601 int getIndex(char, MYDWORD);
  602 void addDHCPRange(char *dp);
  603 void addVendClass(MYBYTE rangeSetInd, char *vendClass, MYBYTE vendClassSize);
  604 void addUserClass(MYBYTE rangeSetInd, char *userClass, MYBYTE userClassSize);
  605 void addMacRange(MYBYTE rangeSetInd, char *macRange);
  606 void addOptions(data9 *req);
  607 void calcRangeLimits(MYDWORD, MYDWORD, MYDWORD*, MYDWORD*);
  608 void catch_int(int sig_num);
  609 void checkSize(MYBYTE);
  610 void closeConn();
  611 void getInterfaces(data1*);
  612 void getSecondary();
  613 void *init(void*);
  614 void lockOptions(FILE*);
  615 void loadOptions(FILE*, const char*, data20*);
  616 void logDHCPMess(char*, MYBYTE);
  617 void mySplit(char*, char*, char*, char);
  618 void *sendHTTP(void*);
  619 void procHTTP(data19*);
  620 void pvdata(data9*, data3*);
  621 void recvRepl(data9*);
  622 void runProg();
  623 void lockIP(MYDWORD);
  624 void sendScopeStatus(data19 *req);
  625 void sendStatus(data19 *req);
  626 void setTempLease(data7*);
  627 void setLeaseExpiry(data7*);
  628 void setLeaseExpiry(data7*, MYDWORD);
  629 void *updateStateFile(void*);
  630 MYWORD fUShort(void*);
  631 MYWORD gdmess(data9*, MYBYTE);
  632 MYWORD myTokenize(char*, char*, const char*, bool);
  633 MYWORD pQu(char*, char*);
  634 MYWORD qLen(char*);
  635