|
From: | Hans Jacob Moller |
Subject: | [lwip-users] callback function args in lwip 1.3 |
Date: | Mon, 18 Feb 2008 13:55:43 -0000 |
Hello, Im all new to this list so hello every one J. Im using the release candidate of lwip 1.3, raw api. First just to make sure I haven’t misunderstood
something; The “void *arg” that you can bind to a pcb via
tcp_arg(); is a pointer to whatever instance data that you want back when your
callback functions are called e.g the callback function defined by tcp_accept().
If this is correct my problem is that I register a pointer to some instance
data after I call tcp_listen and then register a callback function with
tcp_accept. When the callback is called the arg pointer is NULL. What I do : Allocate inst pointer and fill . newpcb = tcp_listen(oldpcb); tcp_arg(newpcb,inst); tcp_accept(newpcb, acceptConnect); in err_t acceptConnect(void *arg, struct tcp_pcb
*newpcb, err_t err) arg seems to be NULL when it is called from the lwip
stack…. Any idea what could be wrong ? Thanks Hans Jacob Møller Software Engineer CSR Denmark 9220 Aalborg O Denmark Company Telephone Number +45 99
324 100 Direct
Dial +45
99 324 139 Company Fax
Number
+45 99 324 101 |
[Prev in Thread] | Current Thread | [Next in Thread] |