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: Fri, 23 May 2008 13:45:22 +0100
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Bill Auerbach wrote:
>> From: Guido Moritz
>>
>> 1.I made it to bring DHCP up on my Board. But in which struct (to let
>> the board tell me his IP via UART) can I get my IP from and let the
>> board tell me the adress.
> 
> You can get the IP address, Netmask and Gateway from the netif you're using
> for the interface: e.g. netif->ip_addr

The proper API for this is:

#include "lwip/api.h"
struct netconn *conn;
struct ip_addr addr;
u16_t port;
err_t err;

err = netconn_addr(conn, &addr, &port);

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




reply via email to

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