Netbios WINS Name Query (RFC 1002) More...
Data Structures | |
struct | WINSHEADER |
Functions | |
int | NutWinsNameQuery (char *name, uint32_t ipaddr) |
Netbios WINS Name Query (RFC 1002)
Only Query Request Client Routine sending/Positive Name Query Response receiving are implemented.
When the Netbios Name Query request UDP datagram is on the ethernet network, asking "Who is 'name'?", NutWinsNameQuery() answers with the specified 'ipaddr' Ethernut IP address.
Answer to Microsoft Windows/Internet Explorer calls by "http://name" command line (and even directly "name" as command line if "name" is not a shared folder).
Launch for example :
THREAD(wins_deamon, arg) { NutWinsNameQuery("myboard", inet_addr(MYIP)); }
int NutWinsNameQuery | ( | char * | name, |
uint32_t | ipaddr | ||
) |
Definition at line 93 of file wins.c.
References WINSHEADER::answers, calloc, WINSHEADER::class, WINSHEADER::flags, free(), htonl, htons, WINSHEADER::ip_addr, WINSHEADER::len_rep, memset(), WINSHEADER::name, WINSHEADER::namelen, WINSHEADER::node_flags, WINSHEADER::node_type, ntohs, NutUdpCreateSocket(), NutUdpReceiveFrom(), NutUdpSendTo(), WINSHEADER::quests, strcmp(), strlen(), toupper(), WINSHEADER::ttl, and WINSHEADER::type.
Referenced by main().