On Tue, May 5, 2015 at 11:27 AM, Sandra Gilge <[email protected]> wrote:

> Hallo Christoph,
>
> I think the tcpip_callback_with_block is the right solution for me. Many
> thanks for that hint.
>
> But I wonder how I can pass several parameters to dns_gethostbyname then.
> Is
> it done in a struct?
> Dns_gethostbyname has four parameters:
> dns_gethostbyname (const char *hostname, struct ip_addr *addr,
> dns_found_callback  found,
>                 void *callback_arg)
>
> As far as I understand a message is sent to tcpip_thread with
> functionpointer and pointer to parameter as payload of that message.
>

Hello,

Yes you can use struct to pass multiple arguments via void * argument.
struct can be global or dynamically allocated, or if you use blocking
version ( tcpip_callback_with_block (,,1)) you can place struct on stack in
calling thread.

Regards,
Krzysztof Wesolowski
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to