lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] DHCP + LWIP_NETIF_HOSTNAME =1 for IP retrieving


From: address@hidden
Subject: Re: [lwip-users] DHCP + LWIP_NETIF_HOSTNAME =1 for IP retrieving
Date: Fri, 05 Feb 2010 11:43:49 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

Bill Auerbach wrote:

Perhaps a feature that would be nice here is to map the DHCP host name to the netbios name.

No problem:

#define NETBIOS_LWIP_NAME (ip_current_netif() != NULL ? ip_current_netif()->hostname != NULL ? ip_current_netif()->hostname : "" : "")

The define is a bit lengthy only because of the null-pointer check. You have to take care though that the netif's hostname is upper case since netbios.c compares it case sensitive. I'll fix that.

>  I mentioned once that a get and set_host_name on a netif would be good

That's a good idea, indeed.


Simon

reply via email to

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