[ldns-users] function call backs in ldns_resolver_send*?

Miek Gieben miek at miek.nl
Tue Dec 14 13:10:18 UTC 2010


Hello,

How hard would it be to extend the ldns library with 2 new functions
that support callbacks? So to make asynchronous sending of queries
possible?

I was thinking about the following prototypes:

ldns_resolver_send_callback(cb_func, ldns_resolver *r, const 
        ldns_rdf *name, ldns_rr_type t, ldns_rr_class c, uint16_t flags);
ldns_resolver_send_pkt_callback(cb_func, ldns_resolver *r, ldns_pkt *query_pkt);

The cb_func prototype should be able to fill a ldns_pkt struct, so it
might be:
ldns_status cb_func(ldns_pkt *k)

I have never dealt with callback functions, so I don't know if this is
a viable proposal and how it impacts the rest of the ldns design.

grtz,

--
 Miek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.nlnetlabs.nl/pipermail/ldns-users/attachments/20101214/0cc6828f/attachment.bin>


More information about the ldns-users mailing list