-
Notifications
You must be signed in to change notification settings - Fork 1
/
dhcpsv.h
40 lines (28 loc) · 903 Bytes
/
dhcpsv.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// dhcpsv.h - interface for dhcpsv
//
// Copyright (C) 2011 Chris Poole - chris@hackernet.co.uk
//
#pragma once
class CLogBase;
class CServerConfig;
class CDhcpServer
{
public:
static const int PortDhcp = 67;
static const int PortInfo = 68;
static const int RBufLen = 1024;
int Initialize(); // do any one time initialization
int Validate(); // validate parameters, also called automatically by Start to validate before starting
int Cleanup(); // do any one time teardown
int Start(); // attempt a start, includes validating params
int Run(); // main loop, returns when server exits
int Terminate(); // request termination of Run function
int SetConf(char *sEntry, unsigned long ulValue);
int SetConf(char *sEntry, char *szValue);
int SetLog(CLogBase *pLog);
private:
CLogBase *pLog;
bool exitflag;
int readoptions(char *pkt, void *buf, int len);
int locateadapterconf();
};