Please review and comment on the following proposal to add support for service discovery in inetd. Please provide your comments preferably by eod Friday 2/2.
Thanks, Rishi Service discovery support in inetd Background: Multicast DNS (mDNS) is an extension to the DNS protocol to perform DNS operations on the local-link using multicast. Multicast DNS also supports DNS operations to discover and advertise network services on the network (as specified in the DNS-SD Internet draft). The service discovery component of the NWAM project will integrate the framework and tools from the Apple "Bonjour" project to allow applications to advertise and discover network services using Multicast DNS on Solaris. Part of the framework includes the mDNS daemon service performing the DNS operations and a public service discovery library: libdns_sd(3LIB) for applications to register and advertise services by issuing requests to the mDNS daemon. As part of this proposal the inetd SMF delegated restarter will utilize the service discovery framework and provide support to advertise services on Solaris. Proposal: This proposal adds service discovery support in inetd(1M), an SMF delegated restarter, to advertise services on the network using mDNS. By adding this support in the inetd restarter, all services managed by inetd both currently and in the future can utilize the support and advertise the service on the local link. We propose to modify the ftp and telnet services to utilize this support in inetd first. When ftp or telnet service is enabled inetd will use the mDNS service on Solaris to advertise the service on the network. inetd connects to the mDNS daemon via IPC using unix domain sockets. If the connection to the mDNS daemon fails inetd periodically tries to connect to the mDNS service and advertise the service. The inetd restarter advertises the service name, transport protocol (TCP/UDP) and port number of services that have turned on service advertisement option. The service name is the application name stored in the 'inetd/name' service property. The application name also is used to lookup the service port number to advertise from the /etc/services file (or another source in nsswitch.conf for the services database). In the future we could add a new property to customize the advertised service name. No other information is advertised by the inetd restarter and the advertisement is restricted to the local link only. In the future a service property for inetd managed services can be introduced to provide the inetd restarter with any additional information about the service to advertise. For example an audio streaming service could additionally advertise information about the stream such as the audio codec. inetd controlled services using 'rpc' transport are not advertised via mDNS. DNS-SD Internet draft requires the transport protocol of the service to be either TCP or UDP. Administration & Configuration: To enable/disable service advertisement of an inetd managed service using mDNS, administrators should use the inetadm(1M) tool to modify the value of the new service advertised property: 'inetd/advertised'. The new boolean property 'advertised' in the property group 'inetd' is introduced by this proposed work for services controlled by the inetd restarter. The new property indicates whether the service should be advertised using mDNS. The property value is of type boolean and is false by default. inetadm(1M) will be updated to support modifying and listing this new property. ftp and telnet services will have the property set to 'true'. Setting the property to 'true' does not guarantee the service is advertised. The mDNS service on Solaris must be enabled and online before services on the machine are advertised. Any inetd.conf(4) entries converted by inetconv(1M) to SMF services have the service advertised property value initially set to 'false'. SMF service dependencies: Integrating this feature in the inetd SMF delegated restarter does not add a dependency between the new mdns service (svc:/network/mdns:default) and inetd (svc:/network/inetd:default). inetd managed services wishing to advertise using mDNS should not add the mdns service as a dependency. A dependency is not needed, because disabling the mDNS service on the system does not affect the functionality of inetd or inetd managed applications advertised using mDNS. The inetd controlled service is advertised by the inetd restarter only when the target service is online. When the advertised service goes offline/disabled the inetd restarter ends the advertisement. If the mDNS service is offline/disabled the inetd restarter periodically tries to successfully connect to the mDNS service before issuing new inet service advertisement requests. Usage example: The following example shows how users can advertise an inetd controlled service on the network: # Advertising an inetd controlled service using mDNS > svcadm enable vnc > inetadm -m svc:/network/vnc:default advertised=true > svcadm refresh svc:/network/vnc:default # Verifying the advertisement. Browsing for "vnc" service types on the local link. > dns-sd -B _vnc._tcp local. Browsing for _vnc._tcp.local. Timestamp A/R Flags if Domain Service Type Instance Name 16:32:43.343 Add 2 2 local. _vnc._tcp. whitestar1-a # Looking up the service instance returns host and port information. > dns-sd -L whitestar1-a _vnc._tcp local. Lookup waltair._vnc._tcp.local. 16:34:18.705 whitestar1-a._vnc._tcp.local. can be reached at whitestar1-a.local.:5900 Future work: The master SMF restarter svc.startd(1M) could also be updated to support advertising network services using mDNS. There are currently no plans to add service discovery support in the master SMF restarter. Additional properties could be introduced for inetd controlled services to customize the advertised service name and to advertise additional information about the service. Open question: Considering the above future work to include this support in the master SMF restarter and new properties introduced to customize the service advertisement is it better to create the 'advertised' property under a new property group 'mdns' that is not specific to a restarter? References: * www.apple.com/bonjour * www.dns-sd.org * www.multicastdns.org