buglwIP - A Lightweight TCP/IP stack - Bugs: bug #55598, Clean shutdown and restart support

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #55598: Clean shutdown and restart support

Submitter:  Ben Schwartz <bemasc>
Submitted:  Tue 29 Jan 2019 02:43:23 AM UTC
Votes: 35
 
Category:  None Severity:  3 - Normal
Item Group:  Feature Request Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
lwIP version:  git head

Wed 18 May 2022 04:59:56 PM UTC, comment #4: 

+1 for this feature.  I'm running lwIP with MQTT on iOS devices and it would be very helpful to cleanup / restart lwIP/TCP/MQTT.  I understand that keeping things simple and lightweight is a goal, but this sort of functionality would be stripped out by the linker when not used(hopefully) so I don't really see it bloating the footprint much, if at all.

Craig Broadbooks <cbroadbo>
Fri 21 Feb 2020 04:59:09 PM UTC, comment #3: 

Hmm, so as a start, we'd need a message to make tcpip_thread stop? That should not be too hard.

But then, how would you ensure that all applications are stopped? Is it enough to not call timers any more and stop TCP listening pcbs? Maybe adding an 'err' calback to TCP servers and udp/raw pcbs would do the trick? (see bug #48887)

Simon Goldschmidt <goldsimon>
Group administrator
Fri 21 Feb 2020 01:41:48 AM UTC, comment #2: 

I also would like to see this change.  Even if it was an optional configuration.  An example is we can run our application on real embedded hardware or on Windows/Linux using the tap interface.  When on the PC, the code needs to be able to exit the application and shut down.  Asan always complains about the tcpip thread memory not deallocated at shutdown, but that seem to be all that is left after closing sockets and network interfaces etc.  I guess all services would need a de-init function as well.

Ashley Duncan <ashesman>
Wed 30 Jan 2019 01:30:02 AM UTC, comment #1: 

I second Ben's request. There usage scenarios that call for re-init lwIP or even just shut it down. Currently that is not possible because there is no way to exit from tcpip_thread.

Jose Simoes <jassimoes>
Tue 29 Jan 2019 02:43:23 AM UTC, original submission:  

Currently, lwip does not offer cleanup functionality, so once it is initialized, it must remain initialized until the process terminates.  This helps keep lwip lightweight and simple, and works well in embedded environments that start lwip at boot, but it does not always work well for other use cases, such as libraries that offer functionality backed by lwip.

Those use cases would seem to be better served if lwip offered sufficient API to clean up all initialized state, and later re-initialize if needed.

Ben Schwartz <bemasc>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cbroadbo (Posted a comment)
  • -email is unavailable- added by rdiez
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by ashesman (Posted a comment)
  • -email is unavailable- added by bkausbk (Voted in favor of this item)
  • -email is unavailable- added by jassimoes (Posted a comment)
  • -email is unavailable- added by jassimoes (Voted in favor of this item)
  • -email is unavailable- added by bemasc (Submitted the item)
  •  

    There are 35 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-06-07 rdiez Carbon-Copy- Added rdiez
    2020-01-20 bkausbk Carbon-Copy- Added bkausbk
    2019-01-30 jassimoes Carbon-Copy- Added jassimoes

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code