OstreeRepoFinderAvahi 3 OSTREE Library
OstreeRepoFinderAvahi Finds remote repositories from ref names by looking at adverts of refs from peers on the local network

## Stability Level

Unstable, unless otherwise indicated

## Types and Values

| OstreeRepoFinderAvahi

## Includes

    #include <libostree/ostree-repo-finder-avahi.h>

## Description

OstreeRepoFinderAvahi is an implementation of OstreeRepoFinder which looks for refs being hosted by peers on the local network.

Any ref which matches by collection ID and ref name is returned as a result, with no limitations on the peers which host them, as long as they are accessible over the local network, and their adverts reach this machine via DNS-SD/mDNS.

For each repository which is found, a result will be returned for the intersection of the refs being searched for, and the refs in `refs/mirrors` in the remote repository.

DNS-SD resolution is performed using Avahi, which will continue to scan for matching peers throughout the lifetime of the process. It’s recommended that `ostree_repo_finder_avahi_start()` be called early on in the process’ lifetime, and the GMainContext which is passed to `ostree_repo_finder_avahi_new()` continues to be iterated until `ostree_repo_finder_avahi_stop()` is called.

The values stored in DNS-SD TXT records are stored as big-endian whenever endianness is relevant.

Internally, OstreeRepoFinderAvahi has an Avahi client, browser and resolver which work in the background to track all available peers on the local network. Whenever a resolve request is made using `ostree_repo_finder_resolve_async()`, the request is blocked until the background tracking is in a consistent state (typically this only happens at startup), and is then answered using the current cache of background data. The Avahi client tracks the OstreeRepoFinderAvahi’s connection with the Avahi D-Bus service. The browser looks for DNS-SD peers on the local network; and the resolver is used to retrieve information about services advertised by each peer, including the services’ TXT records.

## Functions

## Types and Values

### OstreeRepoFinderAvahi

    typedef struct _OstreeRepoFinderAvahi OstreeRepoFinderAvahi;

OstreeRepoFinderAvahi