[haiku-bugs] Re: [Haiku] #12961: Autodetection of network shares

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Thu, 23 Dec 2021 20:44:20 -0000

#12961: Autodetection of network shares
---------------------------------+----------------------------
  Reporter:  kallisti5           |      Owner:  nobody
      Type:  enhancement         |     Status:  new
  Priority:  normal              |  Milestone:  Unscheduled
 Component:  Network & Internet  |    Version:  R1/Development
Resolution:                      |   Keywords:
Blocked By:                      |   Blocking:  12097
  Platform:  All                 |
---------------------------------+----------------------------
Comment (by kallisti5):

 https://github.com/mjansson/mdns is a nice minimal mDNS ;(header-only)
 library which is public domain.

 {{{
  ./mdns_example
 Local IPv4 address: 192.168.1.100
 Local IPv6 address: fe80::df4f:8f26:811e:83e4%enp6s0
 Opened 2 sockets for DNS-SD
 Sending DNS-SD discovery
 Reading DNS-SD replies
 [fe80::211:32ff:fe25:3bb1%enp6s0]:5353 : answer _services._dns-
 sd._udp.local. PTR _smb._tcp.local. rclass 0x1 ttl 10 length 12
 [fe80::211:32ff:fe25:3bb1%enp6s0]:5353 : answer _services._dns-
 sd._udp.local. PTR _ftp._tcp.local. rclass 0x1 ttl 10 length 7
 [fe80::211:32ff:fe25:3bb1%enp6s0]:5353 : answer _services._dns-
 sd._udp.local. PTR _http._tcp.local. rclass 0x1 ttl 10 length 8
 [fe80::211:32ff:fe25:3bb1%enp6s0]:5353 : answer _services._dns-
 sd._udp.local. PTR _afpovertcp._tcp.local. rclass 0x1 ttl 10 length 14
 [fe80::211:32ff:fe25:3bb1%enp6s0]:5353 : answer _services._dns-
 sd._udp.local. PTR _device-info._tcp.local. rclass 0x1 ttl 10 length 15
 192.168.1.10:5353 : answer _services._dns-sd._udp.local. PTR
 _smb._tcp.local. rclass 0x1 ttl 10 length 12
 192.168.1.10:5353 : answer _services._dns-sd._udp.local. PTR
 _ftp._tcp.local. rclass 0x1 ttl 10 length 7
 192.168.1.10:5353 : answer _services._dns-sd._udp.local. PTR
 _http._tcp.local. rclass 0x1 ttl 10 length 8
 192.168.1.10:5353 : answer _services._dns-sd._udp.local. PTR
 _afpovertcp._tcp.local. rclass 0x1 ttl 10 length 14
 192.168.1.10:5353 : answer _services._dns-sd._udp.local. PTR _device-
 info._tcp.local. rclass 0x1 ttl 10 length 15
 192.168.1.191:5353 : answer _services._dns-sd._udp.local. PTR
 _airplay._tcp.local. rclass 0x1 ttl 10 length 16
 192.168.1.191:5353 : answer _services._dns-sd._udp.local. PTR
 _raop._tcp.local. rclass 0x1 ttl 10 length 8
 192.168.1.229:5353 : answer _services._dns-sd._udp.local. PTR
 _airplay._tcp.local. rclass 0x1 ttl 10 length 16
 192.168.1.153:5353 : answer _services._dns-sd._udp.local. PTR _spotify-
 connect._tcp.local. rclass 0x1 ttl 10 length 24
 192.168.1.153:5353 : answer _services._dns-sd._udp.local. PTR
 _airplay._tcp.local. rclass 0x1 ttl 10 length 11
 192.168.1.143:5353 : answer _services._dns-sd._udp.local. PTR
 _http._tcp.local. rclass 0x1 ttl 10 length 13
 192.168.1.143:5353 : answer _services._dns-sd._udp.local. PTR
 _ipp._tcp.local. rclass 0x1 ttl 10 length 7
 192.168.1.143:5353 : answer _services._dns-sd._udp.local. PTR _pdl-
 datastream._tcp.local. rclass 0x1 ttl 10 length 18
 192.168.1.143:5353 : answer _services._dns-sd._udp.local. PTR
 _printer._tcp.local. rclass 0x1 ttl 10 length 11
 [fe80::9e93:4eff:fe39:e027%enp6s0]:5353 : answer _services._dns-
 sd._udp.local. PTR _http._tcp.local. rclass 0x1 ttl 10 length 13
 [fe80::9e93:4eff:fe39:e027%enp6s0]:5353 : answer _services._dns-
 sd._udp.local. PTR _ipp._tcp.local. rclass 0x1 ttl 10 length 7
 [fe80::9e93:4eff:fe39:e027%enp6s0]:5353 : answer _services._dns-
 sd._udp.local. PTR _pdl-datastream._tcp.local. rclass 0x1 ttl 10 length 18
 [fe80::9e93:4eff:fe39:e027%enp6s0]:5353 : answer _services._dns-
 sd._udp.local. PTR _printer._tcp.local. rclass 0x1 ttl 10 length 11
 192.168.1.187:5353 : answer _services._dns-sd._udp.local. PTR
 _ssh._tcp.local. rclass 0x1 ttl 10 length 12
 192.168.1.187:5353 : answer _services._dns-sd._udp.local. PTR _sftp-
 ssh._tcp.local. rclass 0x1 ttl 10 length 12
 192.168.1.187:5353 : answer _services._dns-sd._udp.local. PTR
 _workstation._tcp.local. rclass 0x1 ttl 10 length 15
 192.168.1.226:5353 : answer _services._dns-sd._udp.local. PTR
 _m2m._tcp.local. rclass 0x1 ttl 255 length 17
 }}}

 If we had some network tracker interface, this would be a really
 interesting platform-agnostic way to connect to local services on the
 network.

 Looking in the example above, Haiku could show multiple web servers, ssh
 servers, printers, in Tracker.   We could open _http._tcp.local devices as
 http://... in WebPositive, _ssh._tcp.local in a terminal SSH session, etc.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/12961#comment:5>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: