Another crazy idea which I am mulling over, very much half-baked, which may or may not be useful and which may already have been done in part or whole, and I have a few questions that people could help me with. Service discovery systems already exist and there is some substantial similarity there with the current idea. One undoubtedly worthy use-case would be as an aid for network traffic analysis and examining the state of the comms subsystem of an o/s.
With DNS, a query mostly has a domain name parameter, returns an IP address and that’s it. There are other types of queries too. I was wondering about a similar service for looking up L4 ports by name or the reverse. You could also have an IP protocol number as an additional parameter and we should have an exceptional value of *. Would be nice to also allow range parameters and sparse multi-range parameters so you could for example query "tell me what TCP ports 20-30 are called" or "on what port numbers is https delivered".
A set of static fixed tables wouldn’t be very interesting. It would basically just end up being a copy of IANA. However something that updated itself dynamically in a situation where ports etc were allocated could be more interesting. I don’t know of a realistic use case like that but perhaps there is one somewhere and I defer to those with more expertise. A reverse lookup of source ports might or might not be useful, I don’t know, and I don’t know how practical it would be to implement such a thing. Software components or processes or apps might register their own friendly names or maybe some o/s has or could have an interface to permit self-description of processes. That would be nice because often an o/s knows what port values are in use by which process and no registration is required. This information might be available a bit too late though as the truth is only revealed when the process accesses the network, and the user might want to query this much earlier.
In the case of QUIC, currently the protocol software component is implemented in a library or bound into a process rather than being in the o/s. QUIC is made acceptable to systems that are suspicious of new protocols by being disguised as a mere arbitrary UDP application. You would expect perhaps in an ideal world that QUIC would have its own IP-proto number allocated. The proposed information-publishing software component would need to somehow interface with QUIC to get information about the allocation and usage of ports etc in QUIC apps. This would not be easy to implement in political and organisational terms.
The biggest challenge would be how to add this to existing systems, I feel.