Enable extraction of exact local socket addresses
The Network Manager API is currently unable to expose the exact address/port that a local wildcard/TCP socket is bound to. This limits the level of detail available to all sorts of traffic-logging code (debug messages, dnstap, etc.)
This has been previously discussed (in dnstap context) in #3143 (closed). Back then, it quickly emerged that extracting the exact address that a local wildcard/TCP socket is bound to requires issuing a system call. Unfortunately, the function that would be responsible for doing this is called on a hot path. After running some performance tests, it became obvious that doing that unconditionally is a non-starter performance-wise. The proposal was scrapped and replaced with a note in documentation.
However, the problem persists and limits the capabilities of not just dnstap, but also logging code. In some cases, more detailed logging is preferred over raw performance and there should be some way for the user to express their preference in that regard.