別の物理ネットワーク上にある別のリモート システムにサービスがあり、そのマルチキャスト パッケージがローカル システムに到達しないため、DNS-SD 公開サービスが表示されません。
DNS-SD で検出されたサービスのみを表示するアプリケーションがそれを表示するように、手動でローカル マシンに登録する方法はありますか?
Avahi ではavahi-publish
、静的サービス ファイルを使用して一時登録を作成し、永続的な登録を作成できます。man 1 avahi-publish
前者の詳細については、後者の詳細については、を参照してくださいman 5 avahi.service
。
Bonjour では、dns-sd ツールを使用してサービスをプロキシ登録できます。
dns-sd -P <Name> <Type> <Domain> <Port> <Host> <IP> [<TXT>...]
プロキシ登録しているサービスにすでにユニキャスト DNS ホスト名がある場合、次のようなものが機能します。
$ dns-sd -P Google _http._tcp local 80 google.com google.com path=/
Registering Service Google._http._tcp.local host google.com port 80 TXT path=/
4:23:00.928 Got a reply for service Google._http._tcp.local.: Name now registered and active
^C
ホスト名がない場合は、ホストに一意の名前を使用する必要があります。
$ dns-sd -P Google _http._tcp local 80 google.local 74.125.237.144 path=/
Registering Service Google._http._tcp.local host google.local port 80 TXT path=/
4:16:48.208 Got a reply for record google.local: Name now registered and active
4:16:48.208 Got a reply for service Google._http._tcp.local.: Name now registered and active
^C