lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] It is weired!


From: Frédéric BERNON
Subject: Re: [lwip-users] It is weired!
Date: Fri, 14 Dec 2007 17:31:06 +0100

Do you know there is already a DHCP client in lwIP ?
 
----- Original Message -----
Sent: Friday, December 14, 2007 5:05 PM
Subject: [lwip-users] It is weired!

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


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

reply via email to

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