libmdns
libmdns copied to clipboard
Adding support to services subtypes
Hi.
I'm trying to use the libmdns to responde mdns and dns-sd messages to an IEEE 2030.5 client. It turns out that IEEE 2030.5 standard has several subtypes: For example, tm._sub._smartenergy._tcp.local
If I send a request for this subtypes, the answer must be something like:
tm-00000000._smartenergy._tcp.local
However, there is no subtype parameter in the register function of libmdns. So, if i declare the type as tm._sub._smartenergy._tcp.local, the server returns: tm-00000000.tm._sub._smartenergy._tcp.local
that's not the right answer.
Is there any way to implement subtypes in libmdns? If not, could you consider implementing this support?
It looks as though this is quite possibly the only offending line: https://github.com/librespot-org/libmdns/blob/v0.6.0/src/lib.rs#L173
I wonder if this would be a good reason to look at #9 as currently we'd need a separate (but extremely similar) method to register
like register_exact_name
which feels a little messy (but would be easy to do).