lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LwIP Support - sethostaddr


From: Enrico Murador - Research & Development - CET
Subject: Re: [lwip-users] LwIP Support - sethostaddr
Date: Fri, 09 Sep 2011 14:59:17 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Thunderbird/3.1.14

Dear Kyle,
For changing IP address "on the fly", I call netif_set_addr() passing the new ip address to my existing network interface, keeping listening pcbs (TCP in my case) running.
By looking at the code, it seems that the functions called by netif_set_addr() do some work to update existing listening pcbs, but this should be confirmed by someone more confident with LWIP than me...
I am also not so aware of what happens exactly (when IP addr change is made) to alive TCP connections, but with (connectionless) UDP I think there should be less problems...

Enrico

On 08/09/2011 23.05, Kyle Sweet wrote:
Hello,

I'm seeking support for using Lwip.  I'm not sure if this is the best way to ask a question - if not, could someone please help me direct my question?

Here goes:

I am using LwIP on a Blackfin DSP from Analog Devices.  I'm using UDP with static IP addressing and no DHCP.  But I want to be able to change the IP address on the fly.  I'm trying to use sethostaddr() to accomplish this.  I have a few specific questions:

1) Can I just call sethostaddr() at any time, wihtout having to completely re-initialize the TCP/IP stack?
2) Would I then be running with the new IP Address?
3) If I have open sockets, would I need to close them first and re-open new sockets with the new IP address?
4) Is there anything else I need to know about changing IP address in an LwIP application?

Hope to hear back from you!

Cheers,
Kyle

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


--
Enrico Murador
R&D

CET
                    Electronics logo CET Electronics
via E. Fermi, 1
31050 Zenson di Piave (TV)
Italia
Phone: +39 0421 344100
Fax: +39 0421 464042
Web: http://www.cet-electronics.com/




reply via email to

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