lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] DHCP


From: Jonathan Larmour
Subject: Re: [lwip-users] DHCP
Date: Mon, 26 May 2008 02:13:32 +0100
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc3.4.legacy (X11/20060515)

address@hidden wrote:

You can get the IP address, Netmask and Gateway from the netif you're using
for the interface: e.g. netif->ip_addr

With this, you are relying on lwIP-internal data structures! While this surely works, it is strongly discouraged by the lwIP developers: The internals data structures are never guaranteed to be portable accross versions so you risk your code being valid for a specific version of lwIP only!

You also risk reading garbage if, for example, the DHCP client is in the process of updating the address from a new lease.

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.
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

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