Set num_validated_users to zero if Realloc fails.
[kai/samba.git] / source3 / namequery.doc
1 /* 
2    Unix SMB/Netbios documentation.
3    Version 0.0
4    Copyright (C) Luke Leighton  Andrew Tridgell  1996
5    
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10    
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15    
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19    
20    Document name: namequery.doc
21
22    Revision History:
23
24    0.0 - 02jul96 : lkcl@pires.co.uk
25    created
26 */
27
28 this module contains non-threaded versions of name status and name
29 query functions. if a multi-threaded nmbd was to be written, these
30 functions would be the starting point.
31
32 at the moment, the expected response queueing system is used to
33 replace these functions without needing to multi-thread nmbd.
34
35 these functions are used in smbclient and nmblookup at present to
36 avoid having the vast quantities of complex and unused code needed
37 to support even a simple name query (or providing stubs for the
38 unused side of these functions).
39
40 there is a down-side to these functions, which is all microsoft's
41 fault. microsoft machines always always reply to queries on the
42 priveleged ports, rather than following the usual tcp/ip mechanism
43 of replying on the client's port (the exception to this i am led
44 to believe is windows nt 3.50).
45
46 as a result of this, in order to receive a response to a name
47 query from a microsoft machine, we must be able to listen on
48 the priveleged netbios name server ports. this is simply not
49 possible with some versions of unix, unless you have root access.
50
51 it is also not possible if you run smbclient or nmblookup on an
52 interface that already has been claimed by the netbios name server
53 daemon nmbd.
54
55 all in all, i wish that microsoft would fix this.
56
57 a solution does exist: nmbd _does_ actually reply on the client's
58 port, so if smbclient and nmblookup were to use nmbd as a proxy
59 forwarder of queries (or to use samba's WINS capabilities) then
60 a query could be made without needing access to the priveleged
61 ports. in order to do this properly, samba must implement secured
62 netbios name server functionality (see rfc1001.txt 15.1.6).
63 (lkcl 01aug96: samba now supports secured name registration)
64
65 /*************************************************************************
66   name_query()
67   *************************************************************************/
68
69
70
71 /*************************************************************************
72   name_status()
73   *************************************************************************/
74
75
76
77 /*************************************************************************
78   _interpret_node_status()
79   *************************************************************************/
80
81
82 this is a older version of interpret_node_status().
83