BlinkenArea - GitList
Repositories
Blog
Wiki
mips_sys
Code
Commits
Branches
Tags
Search
Tree:
902aa40
Branches
Tags
master
mips_sys
fw
dhcp.h
replace email address in headers with blinkenarea address
Stefan Schuermans
commited
902aa40
at 2012-05-21 17:42:50
dhcp.h
Blame
History
Raw
/* MIPS I system * Copyright 2011-2012 Stefan Schuermans <stefan@blinkenarea.org> * Copyleft GNU public license V2 or later * http://www.gnu.org/copyleft/gpl.html */ #ifndef DHCP_H #define DHCP_H #include "ethernet.h" #include "ip.h" #include "udp.h" /// header of DHCP packet struct dhcp_header { unsigned char op; unsigned char h_type; unsigned char h_len; unsigned char h_ops; unsigned long x_id; unsigned short secs; unsigned short flags; unsigned char ci_addr[4]; unsigned char yi_addr[4]; unsigned char si_addr[4]; unsigned char gi_addr[4]; unsigned char ch_addr[16]; unsigned char s_name[64]; unsigned char file[128]; unsigned long m_cookie; } __attribute__((packed)); /// DHCP packet struct dhcp_packet { struct ethernet_header eth_hdr; struct ip_header ip_hdr; struct udp_header udp_hdr; struct dhcp_header dhcp_hdr; } __attribute__((packed)); /// tick procedure - call every 200ms void dhcp_tick200(void); /** * @brief process a received DHCP packet * @param[in] ptr pointer to data of packet * @param[in] sz size of packet */ void dhcp_recv(void *ptr, unsigned int sz); #endif // #ifdef DHCP_H