OCT 1. 修正代码检查警告
This commit is contained in:
parent
3cbbb839a6
commit
a62f7436a8
|
@ -298,7 +298,7 @@ int dhcpd_main(int daemon, const char *pInifile, const char *pStatusFile, const
|
|||
}
|
||||
#endif
|
||||
|
||||
verbatim = (daemon > 0) ? true : false;
|
||||
verbatim = (daemon > 0);
|
||||
|
||||
if (pInifile && strlen(pInifile) > 0) {
|
||||
strcpy(iniFile, pInifile);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "cppcoreguidelines-pro-type-member-init"
|
||||
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
|
||||
#pragma ide diagnostic ignored "OCUnusedMacroInspection"
|
||||
#pragma ide diagnostic ignored "cppcoreguidelines-pro-type-member-init"
|
||||
/**************************************************************************
|
||||
* Copyright (C) 2005 by Achal Dhir *
|
||||
* achaldhir@gmail.com *
|
||||
|
@ -132,6 +134,7 @@ enum {
|
|||
QTYPE_CHILDZONE
|
||||
};
|
||||
|
||||
#if 0
|
||||
struct data10 {
|
||||
char zone[256];
|
||||
MYWORD zLen;
|
||||
|
@ -149,6 +152,7 @@ struct data16 {
|
|||
char wildcard[256];
|
||||
MYDWORD ip;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct data7 //cache
|
||||
{
|
||||
|
@ -209,10 +213,12 @@ struct data71 //Lump
|
|||
|
||||
typedef std::map<string, data7 *> dhcpMap;
|
||||
|
||||
#if 0
|
||||
struct data11 {
|
||||
char hostname[256];
|
||||
MYWORD pref;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct ConnType {
|
||||
SOCKET sock;
|
||||
|
@ -695,89 +701,74 @@ struct data15 {
|
|||
};
|
||||
|
||||
//Function Prototypes
|
||||
bool checkIP(data9 *req, data17 *rangeData, MYDWORD ip);
|
||||
bool checkMask(MYDWORD);
|
||||
bool checkRange(data17 *, char);
|
||||
bool detectChange();
|
||||
bool getSection(const char *, char *, MYBYTE, char *);
|
||||
bool isInt(char *);
|
||||
bool isIP(char *);
|
||||
FILE *openSection(const char *, MYBYTE);
|
||||
MYBYTE pIP(void *, MYDWORD);
|
||||
MYBYTE pInt(void *, MYDWORD);
|
||||
MYBYTE pUInt(void *raw, MYDWORD data);
|
||||
MYBYTE pUShort(void *, MYWORD);
|
||||
MYBYTE addServer(MYDWORD *, MYBYTE, MYDWORD);
|
||||
int getRangeInd(MYDWORD);
|
||||
char *myTrim(char *, char *);
|
||||
char *myGetToken(char *, MYBYTE);
|
||||
char *cloneString(char *);
|
||||
char *getHexValue(MYBYTE *, char *, MYBYTE *);
|
||||
char *genHostName(char *, const MYBYTE *, MYBYTE);
|
||||
char *hex2String(char *, const MYBYTE *, MYBYTE);
|
||||
char *IP2String(char *, MYDWORD);
|
||||
char *IP2arpa(char *, MYDWORD);
|
||||
char *IP62String(char *, MYBYTE *);
|
||||
char *myUpper(char *string);
|
||||
char *myLower(char *string);
|
||||
char *readSection(char *, FILE *);
|
||||
data7 *findDHCPEntry(char *);
|
||||
data7 *createCache(data71 *pLump);
|
||||
MYDWORD alad(data9 *);
|
||||
MYDWORD calcMask(MYDWORD, MYDWORD);
|
||||
MYDWORD chaddr(data9 *);
|
||||
MYDWORD resad(data9 *);
|
||||
MYDWORD sdmess(data9 *);
|
||||
MYDWORD sendRepl(data9 *req);
|
||||
MYDWORD *findServer(MYDWORD *, MYBYTE, MYDWORD);
|
||||
int getIndex(char, MYDWORD);
|
||||
int addDHCPRange(char *dp);
|
||||
void addVendClass(MYBYTE rangeSetInd, char *vendClass, MYBYTE vendClassSize);
|
||||
void addUserClass(MYBYTE rangeSetInd, char *userClass, MYBYTE userClassSize);
|
||||
void addMacRange(MYBYTE rangeSetInd, char *macRange);
|
||||
void addOptions(data9 *req);
|
||||
void calcRangeLimits(MYDWORD, MYDWORD, MYDWORD *, MYDWORD *);
|
||||
void catch_int(int sig_num);
|
||||
void checkSize(MYBYTE);
|
||||
void closeConn();
|
||||
void debug(const char *mess, int i);
|
||||
bool getInterfaces(data1 *pNetwork);
|
||||
void getSecondary();
|
||||
void *init(void *);
|
||||
void lockOptions(FILE *);
|
||||
void loadOptions(FILE *, const char *, data20 *);
|
||||
void mySplit(char *, char *, const char *, char);
|
||||
void *sendHTTP(void *);
|
||||
void procHTTP(data19 *);
|
||||
void pvdata(data9 *, data3 *);
|
||||
void recvRepl(data9 *);
|
||||
void runProg();
|
||||
void lockIP(MYDWORD);
|
||||
void sendScopeStatus(data19 *req);
|
||||
void sendStatus(data19 *req);
|
||||
void setTempLease(data7 *);
|
||||
void setLeaseExpiry(data7 *);
|
||||
void setLeaseExpiry(data7 *, MYDWORD);
|
||||
void *updateStateFile(void *);
|
||||
MYWORD fUShort(void *);
|
||||
MYWORD gdmess(data9 *, MYBYTE);
|
||||
MYWORD myTokenize(char *, char *, const char *, bool);
|
||||
MYWORD pQu(char *, char *);
|
||||
MYWORD qLen(char *);
|
||||
MYDWORD fIP(void *raw);
|
||||
MYDWORD fUInt(void *raw);
|
||||
const char *getRequestMethod(const char *buffer);
|
||||
void prepareUserHtmlRespStatus(data19 *req);
|
||||
void opendhcp_init_http_server();
|
||||
void opendhcp_set_replication_svr();
|
||||
void opendhcp_add_ip_pool_set();
|
||||
void opendhcp_add_mac_filter();
|
||||
int process_iptv_multicast(const unsigned char *p, int size, const char *mac);
|
||||
int opendhcp_add_listener();
|
||||
unsigned int opendhcp_set_lease_time();
|
||||
void sendUserList(data19 *req, const char *pRequest, dhcpMap *dhcpCache, data2 *cfig, time_t t);
|
||||
void sendAllLists(data19 *req, bool kRunning, dhcpMap *dhcpCache, data2 *cfig);
|
||||
int getHwAddr(char *buff, char *mac);
|
||||
int arpSet(const char *ifname, char *ipStr, char *mac);
|
||||
sockaddr_in get_cliAddr(char *nicif, char *tempbuff, data9 *req);
|
||||
bool checkIP(data9 *req, data17 *rangeData, MYDWORD ip);
|
||||
bool checkMask(MYDWORD);
|
||||
bool checkRange(data17 *, char);
|
||||
bool detectChange();
|
||||
bool getSection(const char *, char *, MYBYTE, char *);
|
||||
bool isInt(char *);
|
||||
bool isIP(char *);
|
||||
FILE *openSection(const char *, MYBYTE);
|
||||
MYBYTE pIP(void *, MYDWORD);
|
||||
MYBYTE pUInt(void *raw, MYDWORD data);
|
||||
MYBYTE pUShort(void *, MYWORD);
|
||||
MYBYTE addServer(MYDWORD *, MYBYTE, MYDWORD);
|
||||
int getRangeInd(MYDWORD);
|
||||
char *myTrim(char *, char *);
|
||||
char *myGetToken(char *, MYBYTE);
|
||||
char *cloneString(char *);
|
||||
char *getHexValue(MYBYTE *, char *, MYBYTE *);
|
||||
char *genHostName(char *, const MYBYTE *, MYBYTE);
|
||||
char *hex2String(char *, const MYBYTE *, MYBYTE);
|
||||
char *IP2String(char *, MYDWORD);
|
||||
char *myUpper(char *string);
|
||||
char *myLower(char *string);
|
||||
char *readSection(char *, FILE *);
|
||||
data7 *findDHCPEntry(char *);
|
||||
data7 *createCache(data71 *pLump);
|
||||
MYDWORD alad(data9 *);
|
||||
MYDWORD resad(data9 *);
|
||||
MYDWORD sdmess(data9 *);
|
||||
MYDWORD sendRepl(data9 *req);
|
||||
MYDWORD *findServer(MYDWORD *, MYBYTE, MYDWORD);
|
||||
int getIndex(char, MYDWORD);
|
||||
int addDHCPRange(char *dp);
|
||||
void addVendClass(MYBYTE rangeSetInd, char *vendClass, MYBYTE vendClassSize);
|
||||
void addUserClass(MYBYTE rangeSetInd, char *userClass, MYBYTE userClassSize);
|
||||
void addMacRange(MYBYTE rangeSetInd, char *macRange);
|
||||
void addOptions(data9 *req);
|
||||
void calcRangeLimits(MYDWORD, MYDWORD, MYDWORD *, MYDWORD *);
|
||||
void closeConn();
|
||||
void debug(const char *mess, int i);
|
||||
bool getInterfaces(data1 *pNetwork);
|
||||
void *init(void *);
|
||||
void lockOptions(FILE *);
|
||||
void loadOptions(FILE *, const char *, data20 *);
|
||||
void mySplit(char *, char *, const char *, char);
|
||||
void *sendHTTP(void *);
|
||||
void procHTTP(data19 *);
|
||||
void pvdata(data9 *, data3 *);
|
||||
void recvRepl(data9 *);
|
||||
void lockIP(MYDWORD);
|
||||
void sendStatus(data19 *req);
|
||||
void setTempLease(data7 *);
|
||||
void setLeaseExpiry(data7 *);
|
||||
void setLeaseExpiry(data7 *, MYDWORD);
|
||||
void *updateStateFile(void *);
|
||||
MYWORD fUShort(void *);
|
||||
MYWORD gdmess(data9 *, MYBYTE);
|
||||
MYWORD myTokenize(char *, char *, const char *, bool);
|
||||
MYDWORD fIP(void *raw);
|
||||
MYDWORD fUInt(void *raw);
|
||||
void prepareUserHtmlRespStatus(data19 *req);
|
||||
void opendhcp_init_http_server();
|
||||
void opendhcp_set_replication_svr();
|
||||
void opendhcp_add_ip_pool_set();
|
||||
void opendhcp_add_mac_filter();
|
||||
int process_iptv_multicast(const unsigned char *p, int size, const char *mac);
|
||||
int opendhcp_add_listener();
|
||||
unsigned int opendhcp_set_lease_time();
|
||||
int getHwAddr(char *buff, char *mac);
|
||||
int arpSet(const char *ifname, char *ipStr, char *mac);
|
||||
sockaddr_in get_cliAddr(char *nicif, char *tempbuff, data9 *req);
|
||||
#pragma clang diagnostic pop
|
Loading…
Reference in New Issue