µTasker Forum

µTasker Forum => µTasker general => Topic started by: Lukas on August 26, 2008, 08:18:56 AM

Title: connectin with name instead of ip
Post by: Lukas on August 26, 2008, 08:18:56 AM
Hallo.
I have implemented the Netbios an it works. Clients can connect to my Serverapplication using the Netbios-name.
But is it also possible to connect to a server from my uTasker-Board with an name?
For example
fnTCP_connect(my_socket, SERVERNAME, port_number, 0, 0);

And for "SERVERNAME" I want to use the Netbiosname instead of the IP.
Thanks
Title: Re: connectin with name instead of ip
Post by: mark on August 26, 2008, 12:43:32 PM
Hi

Unfortunately this is not supported in the project.

To add such a service is probably not that difficult though. It will have to maintain a table of NAME<-> IP matches for look up and can directly insert the IP if the name is already in the table. If the name is not in the table it will need to start a NETBios resolve (the reverse of the present sequence), which is in fact very similar to the operation of ARP, which maintains a table of IP<->MAC matches. Once the result of the NETBios resolve is known, the connection can be completed or else a failure can be reported.

Whereas ARP uses broadcasts to request information from the destination, NETBios uses a sub-net broadcast (usually UDP) which doesn't cross to other sub-nets in an Infranet. This needs LMHOSTS or a Windows Internet Name Service (WIMS) server if it is to work across multiple sub-nets - I know nothing about configuring these but mention it since my reference book says it is so...

Regards

Mark