diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-01-28 08:30:36 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-01-28 08:45:17 +0900 |
commit | 18230451c03a6d20141efbc85341b6a5c6809077 (patch) | |
tree | 74ec1ba3f7e5afe9f5da687b4f3c77ad3172734d /src/resolve/resolved-dns-stream.h | |
parent | e6d31fc97af92ef59741b3948c984a7d1b2b70f3 (diff) | |
download | systemd-18230451c03a6d20141efbc85341b6a5c6809077.tar.gz |
resolve: make dns_stream_new() take on_packet and complete callbacks
And make on_packet callback mandatory.
Diffstat (limited to 'src/resolve/resolved-dns-stream.h')
-rw-r--r-- | src/resolve/resolved-dns-stream.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-stream.h b/src/resolve/resolved-dns-stream.h index 96b977f628..548b2edc9e 100644 --- a/src/resolve/resolved-dns-stream.h +++ b/src/resolve/resolved-dns-stream.h @@ -93,7 +93,16 @@ struct DnsStream { LIST_FIELDS(DnsStream, streams); }; -int dns_stream_new(Manager *m, DnsStream **s, DnsStreamType type, DnsProtocol protocol, int fd, const union sockaddr_union *tfo_address, usec_t timeout); +int dns_stream_new( + Manager *m, + DnsStream **ret, + DnsStreamType type, + DnsProtocol protocol, + int fd, + const union sockaddr_union *tfo_address, + int (on_packet)(DnsStream*), + int (complete)(DnsStream*, int), /* optional */ + usec_t connect_timeout_usec); #if ENABLE_DNS_OVER_TLS int dns_stream_connect_tls(DnsStream *s, void *tls_session); #endif |