0

I am looking for a definition of the function dns_stream_ref() in the source tree of systemd. The declaration was found in resolved-dns-stream.h, this function is called from some source files. However, there isn't any definition of this function in resolved-dns-stream.c. Moreover, I couldn't see the definition of this function anywhere in the sources.

Does anyone know where and how the function dns_stream_ref() is defined?

1 Answers1

0

It's defined by the use of the DEFINE_TRIVIAL_REF_UNREF_FUNC macro in resolved-dns-stream.c. That will expand to code which implements the _ref and _unref functions, which count using the n_ref member of DnsStream.

Paul Wright
  • 204
  • 2
  • 5