Amit Kumar Jain
Amit Kumar Jain

Reputation: 487

Service Type for ZeroConf

In my new project I am studying concept of ZeroConf. I am very new to this and I read a lot of articles about this on net and understood the concept. My use case is as follows: - In my project I am having a Linux based Gateway with Avahi daemon on it as Zero Conf Provider. I want to make my gateway discoverable for my clients. Clients will discover the Gateway and establish a TCP connection with the gateway. For this I have to publish a Service on my gateway. Client will search this service and resolve it and got the IP address and Port. Once client got the IPAddress and Port client can establish a TCP connection with the server.Currently I am using Mono.ZeroConf for all the implementation. Now my question is that what should be my Service Type for this service. If I register my service as

"_http._tcp 1234 EchoService" then it successfully registered a service and from client I am able to browse and resolve it. Also client can successfully connect to the TCP server running in the gateway and can communicate.

Also I want to know that whether I can create my own Service Type or not.

Thanks in advance.

Upvotes: 1

Views: 1859

Answers (1)

Vova
Vova

Reputation: 1416

It depends on protocol that is implemented by your gateway. ZeroConf's service type does say both "what" is advertised AND also "how" to use the service, i.e. which protocol to use with the service. So if your gateway implements a standard well-known protocol then you can use one of the well-known service types which you can find here and here.

For example if your gateway is a SOCKS proxy then you should advertise it as a _socks._tcp service. If your gateway implements a proprietary protocol, you may want to register a new service type. If you do not want to disclose publicly your service type name you can ask IANA to keep it private for some time. However you do not have to do this. You can just use a GUID-like service name which should guarantee uniqueness.

I recommend to read or at least to review an excellent book about ZeroConf: Zero Configuration Networking: The Definitive Guide by Stuart Cheshire and Daniel H Steinberg. BTW, Stuart Cheshire is one of the authors of ZeroConf.

Upvotes: 1

Related Questions