lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] dns_gethostbyname


From: Krzysztof Wesołowski
Subject: Re: [lwip-users] dns_gethostbyname
Date: Fri, 8 May 2015 23:18:21 +0200

On Tue, May 5, 2015 at 11:27 AM, Sandra Gilge <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]