lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Setting the netif hostname without using DHCP


From: Karthik Vadambacheri Manian
Subject: [lwip-users] Setting the netif hostname without using DHCP
Date: Mon, 5 Jul 2010 16:55:08 -0400

Hi all,

I am trying to set the ip & hostname for a netif as below in
tcpip_thread() as below:


tcpip_thread()
{

    ................
    ................

    rtl8139_netif = netif_find("ne0");
    rtl8139_netif->ip_addr.addr = 0x0101a8c0;
    rtl8139_netif->netmask.addr = 0x00ffffff;
    rtl8139_netif->gw.addr = 0xfe01a881;
    rtl8139_netif->hostname = "mylwip";
    netif_set_default(rtl8139_netif);
    netif_set_up(rtl8139_netif);

    ...................
    ...................
}

I am trying to use lwip in a lightweight kernel called kitten running
in a VM. When the VM comes up I could ping it using the statically
defined IP but not using hostname.
I checked on the lwip archive for previous discussions on this topic.
Few threads adviced to use the contrib/apps/netbios/netbios.c file.
They asked to set NETBIOS_LWIP_NAME to the host name and call
netbios_init().
I have set the NETBIOS_LWIP_NAME to the required hostname and called
netbios_init() after tcpip_init(). But still I could not ping using
hostname but I can ping using statically defined IP. Kindly let me
know what I am missing here?

Thanks,
karthik



reply via email to

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