summaryrefslogtreecommitdiff
path: root/source/namequery.doc
blob: 77a75714e53fc819e1e1336e391b29c6f59862f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
this module contains non-threaded versions of name status and name
query functions. if a multi-threaded nmbd was to be written, these
functions would be the starting point.

at the moment, the expected response queueing system is used to
replace these functions without needing to multi-thread nmbd.

these functions are used in smbclient and nmblookup at present to
avoid having the vast quantities of complex and unused code needed
to support even a simple name query (or providing stubs for the
unused side of these functions).

there is a down-side to these functions, which is all microsoft's
fault. microsoft machines always always reply to queries on the
priveleged ports, rather than following the usual tcp/ip mechanism
of replying on the client's port (the exception to this i am led
to believe is windows nt 3.50).

as a result of this, in order to receive a response to a name
query from a microsoft machine, we must be able to listen on
the priveleged netbios name server ports. this is simply not
possible with some versions of unix, unless you have root access.

it is also not possible if you run smbclient or nmblookup on an
interface that already has been claimed by the netbios name server
daemon nmbd.

all in all, i wish that microsoft would fix this.

a solution does exist: nmbd _does_ actually reply on the client's
port, so if smbclient and nmblookup were to use nmbd as a proxy
forwarder of queries (or to use samba's WINS capabilities) then
a query could be made without needing access to the priveleged
ports. in order to do this properly, samba must implement secured
netbios name server functionality (see rfc1001.txt 15.1.6).


/*************************************************************************
  name_query()
  *************************************************************************/



/*************************************************************************
  name_status()
  *************************************************************************/



/*************************************************************************
  _interpret_node_status()
  *************************************************************************/


this is a older version of interpret_node_status().