Chien-Lung Wu wrote:
> I defined DHCP protocol structure as following:
>
> typedef struct dhcp_s {
> u8_t dhcp_op;
> u8_t dhcp_htype;
> u8_t dhcp_hlen;
> u8_t dhcp_hops;
> u8_t dhcp_xid[4];
> u8_t dhcp_secs[2];
> u8_t dhcp_flags[2];
> u8_t dhcp_ciaddr[4];
> u8_t dhcp_yiaddr[4];
> u8_t dhcp_siaddr[4];
> u8_t dhcp_giaddr[4];
> u8_t dhcp_hwaddr[6];
> u8_t dhcp_sname[64];
> u8_t dhcp_file[128];
> u8_t dhcp_option[312];
> } dhcp_t;
>
> Everything seems fine except that dhcp_option[312] always shift 10 bytes
> ahead (overlapping with dhcp_file) when I use
Your chaddr field should be 16 bytes, not 6. See
http://tools.ietf.org/html/rfc2131#page-9
Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------ Opinions==mine
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users