Re: How to poll hostname from local name server with wildcard



On Jan 4, 3:52 pm, Chris Davies <chris-use...@xxxxxxxxxxxx> wrote:
Like2Learn <like2le...@xxxxxxx> wrote:
I am developing a cross-platform application for Windows and Linux. I
would like the application to poll all computers/devices connected to
a LAN and with host names beginning with a special string, say
"SpecialDevice", for example "SpecialDevice_SN1" and
"SpecialDevice_SN2".

Architectural question time.

Do you have control over these "special devices" (or any application
software that runs on them)?


Yes I have fully control on the devices, since I will write the
firmware as well.

If so, you may be better off having these devices listen for an
application-specific "are you out there?" broadcast request and get them
to reply to that. Take a look at zeroconf or CUPS (IPP) for examples of
how this can be performed on a LAN, and investigate multicast for one
option of handling this on a WAN.


Zeroconf is definitely a solution. However, I am looking for something
even simplier, better existing already. I believe for each LAN, the
DNS server and the DHCP server are almost always available. The DNS
server, or the local name server, shall save the host names already.
Thus if I know the host name (which is determined by the device's S/
N), then I shall be able to retrieve the IP (or hardware address) out
of the DNS server. What do you think?


Alternatively, have your cross-platform application registered in the
local DNS (a SRV record might be good for this) and have your "special
devices" register with the application directly. You can use any user
defined port if it's a internal application, but you should consider
registering the port with IANA [*] if it's for public/external use.


I think I am lost. The application will run at a PC (either Windows or
Linux), while the device firmware will run at a device, which is a
Linux box. They shall be registered separately, not together, right?

Chris

[*] Or whoever controls port allocations these days

Thank you!
.