A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.

Dependents:   oldheating gps motorhome heating

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers dhcp.h Source File

dhcp.h

00001 #include <stdint.h>
00002 #include <stdbool.h>
00003 
00004 extern bool DhcpTrace;
00005 
00006 extern uint32_t DhcpGetElapsedLife(void);
00007 
00008 extern uint32_t DhcpLeaseTime;
00009 extern uint32_t DhcpServerIp;
00010 extern uint32_t DhcpRouterIp;
00011 extern uint32_t DhcpSubnetMask;
00012 extern uint32_t DhcpNtpIp;
00013 extern uint32_t DhcpRenewalT1;
00014 extern uint32_t DhcpRenewalT2;
00015 extern uint32_t DhcpBroadcastIp;
00016 extern uint32_t DhcpLocalIp;
00017 extern uint32_t DhcpDnsServerIp;
00018 extern char     DhcpDomainName[];
00019 extern char     DhcpHostName[];
00020 
00021 extern bool     DhcpIpNeedsToBeRouted(uint32_t ip);
00022 
00023 extern int      DhcpHandleResponse(void (*traceback)(void), int sizeRx, void* pPacketRx, int* pSizeTx, void* pPacketTx);
00024 extern int      DhcpPollForRequestToSend(void* pPacket, int* pSize);
00025 
00026 #define DHCP_SERVER_PORT 67
00027 #define DHCP_CLIENT_PORT 68