[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Changed IP address during runtime but TCP PCB stuck tim
From: |
uaz |
Subject: |
Re: [lwip-users] Changed IP address during runtime but TCP PCB stuck time wait state |
Date: |
Wed, 19 Dec 2018 20:29:26 -0700 (MST) |
Hi all,
Would like to update, my device can now change ip address during runtime
thanks to Ivan's suggestion. Here is my steps (roughly):
1. netif_set_addr() //to change ip address
2. netconn_close(old_netconn)
3. netconn_delete(old_netconn)
4. new_netconn = netconn_new()
5. ip_set_option([new_netconn]->pcb.ip_pcb, SOF_REUSEADDR)
6. netconn_bind(new_netconn, NULL, your_socket)
7. netconn_listen(new_netconn)
--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html