BlinkenArea - GitList
Repositories
Blog
Wiki
flaneth
Code
Commits
Branches
Tags
Search
Tree:
d48e86e
Branches
Tags
master
flaneth
firmware
dhcp.h
header fix
Stefan Schuermans
commited
d48e86e
at 2012-05-02 18:39:39
dhcp.h
Blame
History
Raw
/* flaneth - flash and ethernet Copyright (C) 2007-2012 Stefan Schuermans <stefan@schuermans.info> Copyleft: GNU public license V2 - http://www.gnu.org/copyleft/gpl.html a BlinkenArea project - http://www.blinkenarea.org/ */ #ifndef INC_dhcp #define INC_dhcp #include "ethernet.h" #include "ip.h" #include "udp.h" // header of an DHCP packet struct DhcpHeader { unsigned char Op; unsigned char HType; unsigned char HLen; unsigned char HOps; unsigned long XId; unsigned int Secs; unsigned int Flags; unsigned char CIAddr[4]; unsigned char YIAddr[4]; unsigned char SIAddr[4]; unsigned char GIAddr[4]; unsigned char CHAddr[16]; unsigned char SName[64]; unsigned char File[128]; unsigned long MCookie; }; // a DHCP packet struct DhcpPacket { struct EthernetHeader EthHdr; struct IpHeader IpHdr; struct UdpHeader UdpHdr; struct DhcpHeader DhcpHdr; }; // tick procedure - call every 200ms extern void DhcpTick200(void); // process a received UDP packet extern void DhcpRecv(unsigned char *pData, unsigned short Length); #endif // #ifdef INC_dhcp