Resolve IPAddress by hostname

General discussion relating to the library modules supplied with the compiler

Moderators: David Barker, Jerry Messina

Post Reply
User avatar
Coccoliso
Posts: 152
Joined: Mon Feb 17, 2014 10:34 am

Resolve IPAddress by hostname

Post by Coccoliso » Tue Mar 18, 2014 9:19 am

Hello,
I have implemented a couple of pic as tcp client and server .. how can I find the IP address of the server by its netbios name? I enabled NBNS server side but on this module there is nothing that allows me to resolve the address of the server on the client side.
Someone has slammed his own head, and I can avoid losing any more time :wink: .
Thank you.

Jerry Messina
Swordfish Developer
Posts: 1469
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: Resolve IPAddress by hostname

Post by Jerry Messina » Tue Mar 18, 2014 11:28 am

In the original Microchip TCP stack (which is what David's code is based on) I don't recall seeing an NBNS client, just the server side that will respond to a name query, which is what's in NBNS.bas.

I guess they assumed the other side would be a PC, not another PIC. I'm not sure what the simplest way out is... code up an NBNS client?

Post Reply