lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] It is weired!


From: Chien-Lung Wu
Subject: [lwip-users] It is weired!
Date: Fri, 14 Dec 2007 11:05:00 -0500

Hi,

 

I am implemented DHCP client for my project based on lwIP TCP/IP stack. 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

Netbuf_ref (conn, &dhcpmessage, sizeof(dhcp_t)). (I use Ethereal to capture the packet and I observe that the dhcp_option was shifted 10 bytes.)

 

Is there anyone there having any idea and how to solve it?

 

Regards,

 

David


reply via email to

[Prev in Thread] Current Thread [Next in Thread]