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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
this module deals with general maintenance of NetBIOS names.
/*************************************************************************
query_refresh_names()
*************************************************************************/
this function is responsible for polling all names registered in the
WINS database. it is planned to enable this function should samba
detect an inconsistency on the network, which could occur if the
samba NetBIOS daemon dies and is restarted.
polling is done very infrequently, but all names will be covered
within a period NAME_POLL_REFRESH_TIME. a group of at most ten names
will be queried at once, at intervals of NAME_POLL_INTERVAL seconds.
if the total number of names queried in this way will take too long,
then the time that an individual name will next be polled is
increased accordingly.
name query polling is functionality over-and-above the normal
requirement (see rfc1001.txt 15.1.7 point 7). it is normally the
responsibility of the owner of a name to re-register the name at
regular intervals.
/*************************************************************************
refresh_my_names()
*************************************************************************/
this function is responsible for refreshing samba's names that have
been registered with other servers on a local subnet, or with another
WINS server if samba is using one.
samba's names' refresh_time will be updated through the use of the function
add_my_name_entry().
/*************************************************************************
remove_my_names()
*************************************************************************/
this function is responsible for removing all samba's SELF names. it
is used when samba receives a SIG_TERM. samba at present does not wait
for the WINS server to reply to the name releases sent out.
/*************************************************************************
add_my_names()
*************************************************************************/
this function is responsible for adding and registering if necessary all
samba's SELF names, on each of its local subnets and with another WINS
server if samba is using one.
/*************************************************************************
add_my_name_entry()
*************************************************************************/
this function is responsible for registering or re-registering one of
samba's names, either on the local subnet or with another WINS server
if samba is using one.
if the name is already in samba's database, then it is re-registered,
otherwise it is simply registered.
if samba registers its name with another WINS server, then the function
response_name_reg() is responsible for updating samba's name database
to reflect the claim or otherwise of the name.
expire_netbios_response_entries() is responsible for taking further action
if no response to the registration is received.
/*************************************************************************
remove_name_entry()
*************************************************************************/
this function is responsible for removing a NetBIOS name. if the name
being removed is registered on a local subnet, a name release should be
broadcast on the local subnet.
if samba has registered the name with a WINS server, it must send a
name release to the WINS server it is using. once it receives a reply,
it can proceed (see response_name_rel())
expire_netbios_response_entries() is responsible for taking further action
if no response to the name release is received.
/*************************************************************************
load_netbios_names()
*************************************************************************/
this function is responsible for loading any NetBIOS names that samba,
in its WINS capacity, has written out to disk. all the relevant details
are recorded in this file, including the time-to-live. should the
time left to live be small, the name is not added back in to samba's
WINS database.
|