From pemensik at redhat.com Mon Mar 13 14:17:35 2023 From: pemensik at redhat.com (=?UTF-8?B?UGV0ciBNZW7FocOtaw==?=) Date: Mon, 13 Mar 2023 15:17:35 +0100 Subject: [avahi] Inconsistent orders of TXT argument in Avahi client API In-Reply-To: References: Message-ID: I am not sure why is the order of records interesting. In general DNS records to not have set order in which they should be received. Unicast DNS even randomizes the first record. If you rely on specific order of TXT records, please don't. It would be nice to have it always processed the same way. But any application should not rely on their order. Or have I understood it wrong way? Regards, Petr On 2/14/23 09:02, Handa Wang wrote: > Hello, > > (This is the same as issue #436 > .) > > It seems that in `avahi_entry_group_add_service_strlst` the passed in > TXT argument is reversed before passing to the server: > https://github.com/lathiat/avahi/blob/master/avahi-client/entrygroup.c#L373. > In this way when we call the `avahi_entry_group_add_service_strlst` > API, we can construct the TXT string list by calling > `avahi_string_list_add` in the normal order. > > On the other hand, the TXT passed into `AvahiServiceResolverCallback` > is in the reverse order, which is different from above. When a user > receives the TXT in the callback, the user may have to reverse the TXT > string list first to get the correct order. > > Is this a bug or by design? > > Also, it seems that `avahi-browse` also doesn't reverse the TXT string > list in its callback so that it returns the TXT record in the reversed > order. This can be confirmed by following commands: > > ``` > $ sudo avahi-publish-service test1 _test._udp 1234 k1=v1 k2=v2 > ``` > > ``` > $ avahi-browse -rt ?_test._udp > ``` > > Regards, > Handa -- Petr Men??k Software Engineer, RHEL Red Hat,https://www.redhat.com/ PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB -------------- next part -------------- An HTML attachment was scrubbed... URL: From frostie.neuenhausen at gmail.com Tue Mar 21 09:48:30 2023 From: frostie.neuenhausen at gmail.com (Simon Neuenhausen) Date: Tue, 21 Mar 2023 10:48:30 +0100 Subject: [avahi] AWDL Message-ID: <90c47a23-cba6-debf-8be7-12a94132eeb9@gmail.com> Hi, I'm currently working on integrating the open wireless link project(OWL) with avahi. OWL implements apple's proprietary AWDL protocol, which handles DNS-SD on another OSI Layer. Due to this I would like to ask, if there is an API that allows one to directly make avahi aware of a service without directly receiving the announcement. Greetings Simon From pemensik at redhat.com Tue Mar 28 12:26:55 2023 From: pemensik at redhat.com (=?UTF-8?B?UGV0ciBNZW7FocOtaw==?=) Date: Tue, 28 Mar 2023 14:26:55 +0200 Subject: [avahi] AWDL In-Reply-To: <90c47a23-cba6-debf-8be7-12a94132eeb9@gmail.com> References: <90c47a23-cba6-debf-8be7-12a94132eeb9@gmail.com> Message-ID: <8b8117ff-b8d2-73c0-da61-ea0d02e92576@redhat.com> I doubt so. I think you would like to insert records with foreign IPs, where there is no other guarantee only trusted entity can 'forge' service entries this way. I think such activity can be allowed only by explicitly allowed users or groups, not by default. I do not think we have already API for that. I guess we would want such entries marked somehow. Are those services reachable over normal IP addresses after they are discovered? If it requires that OSI layer to communicate with those services too, I doubt it would be useful for common avahi clients. A pull request might be reviewed, but it seems not a small feature for current avahi state. We have pending much smaller features at the moment. I have no Apple device in my home, so I cannot check this myself. Maybe try creating issue at github requesting such feature. But expect no fast resolution. Regards, Petr On 3/21/23 10:48, Simon Neuenhausen wrote: > Hi, > > I'm currently working on integrating the open wireless link > project(OWL) with avahi. > > OWL implements apple's proprietary AWDL protocol, which handles DNS-SD > on another OSI Layer. > > Due to this I would like to ask, if there is an API that allows one to > directly make avahi aware of a service without directly receiving the > announcement. > > Greetings > > Simon > -- Petr Men??k Software Engineer, RHEL Red Hat, https://www.redhat.com/ PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB