buglwIP - A Lightweight TCP/IP stack - Bugs: bug #56593, Add callback object storage to...

 
 

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

bug #56593: Add callback object storage to struct netconn

Submitter:  Wilfred <will>
Submitted:  Mon 08 Jul 2019 08:32:22 PM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  Feature Request Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  2.1.1

Sat 13 Jul 2019 06:47:40 PM UTC, comment #4: 

I've just pushed a patch that adds support for this.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 11 Jul 2019 08:26:19 PM UTC, comment #3: 


Yes, this sounds like a good suggestion. Thank you.
Sorry for the extra posts.

comment #1:

> Seems what you need for your own app is what the socket layer uses struct netconn's 'socket' member for. A correct solution to me would be to change this member 'int socket' into a union providing both 'int socket' and 'void *callback_arg', what do you think?

Wilfred <will>
Thu 11 Jul 2019 08:23:01 PM UTC, comment #2: 

comment #1:

> Seems what you need for your own app is what the socket layer uses struct netconn's 'socket' member for. A correct solution to me would be to change this member 'int socket' into a union providing both 'int socket' and 'void *callback_arg', what do you think?


comment #1:

> Seems what you need for your own app is what the socket layer uses struct netconn's 'socket' member for. A correct solution to me would be to change this member 'int socket' into a union providing both 'int socket' and 'void *callback_arg', what do you think?

Wilfred <will>
Tue 09 Jul 2019 06:49:39 PM UTC, comment #1: 

Seems what you need for your own app is what the socket layer uses struct netconn's 'socket' member for. A correct solution to me would be to change this member 'int socket' into a union providing both 'int socket' and 'void *callback_arg', what do you think?

Simon Goldschmidt <goldsimon>
Group administrator
Mon 08 Jul 2019 08:32:22 PM UTC, original submission:  


Please add "void* callbackData;" to struct netconn

I use the Netconn callback API for my application and for each new lwIP version I have added the following to the end of struct netconn, just after netconn_callback:

  netconn_callback callback;
  void* callbackData; /* FIX needed for object storage */

I need my own object per connection and I need to store a reference to this object in the netconn structure. I would otherwise not be able to reference my own object when the netconn_callback triggers.

Thank you,
Will


Wilfred <will>

 

(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 goldsimon (Posted a comment)
  • -email is unavailable- added by will (Submitted the item)
  •  

    There are 0 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
    2019-07-13 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code