summaryrefslogtreecommitdiffstats
path: root/private/net/svcdlls/browser2/server/brconfig.h
blob: ca4d4f309ae30d54f747537fbb486df79de58dff (plain) (blame)
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/*++

Copyright (c) 1991  Microsoft Corporation

Module Name:

    brconfig.h

Abstract:

    Private header file to be included by Workstation service modules that
    need to load Workstation configuration information.

Author:

    Rita Wong (ritaw) 22-May-1991

Revision History:

--*/


#ifndef _BRCONFIG_INCLUDED_
#define _BRCONFIG_INCLUDED_

#define BROWSER_CONFIG_VERSION_MAJOR    3
#define BROWSER_CONFIG_VERSION_MINOR    10

typedef enum _DATATYPE {
    BooleanType,
    DWordType,
    MultiSzType,
    TriValueType        // Yes, No, Auto
} DATATYPE, *PDATATYPE;

typedef struct _BR_BROWSER_FIELDS {
    LPTSTR Keyword;
    LPDWORD FieldPtr;
    DWORD Default;
    DWORD Minimum;
    DWORD Maximum;
    DATATYPE DataType;
    DWORD Parmnum;
    VOID (*DynamicChangeRoutine) ( VOID );
} BR_BROWSER_FIELDS, *PBR_BROWSER_FIELDS;

//
// Configuration information.  Reading and writing to this global
// structure requires that the resource be acquired first.
//

typedef struct _BRCONFIGURATION_INFO {

    CRITICAL_SECTION ConfigCritSect;  // To serialize access to config fields.

    DWORD MaintainServerList;       // -1, 0, or 1 (No, Auto, Yes)
    DWORD BackupBrowserRecoveryTime;
    DWORD CacheHitLimit;            // Browse response Cache hit limit.
    DWORD NumberOfCachedResponses;  // Browse response cache size.
    DWORD DriverQueryFrequency;     // Browser driver query frequency.
    DWORD MasterPeriodicity;        // Master announce frequency (seconds)
    DWORD BackupPeriodicity;        // Backup scavange frequency (seconds)
    BOOL  IsLanmanNt;               // True if is on LM NT machine
    BOOL  IsPrimaryDomainController;// True if machine is PDC of the primary domain
    LPTSTR_ARRAY DirectHostBinding; // Direct host equivalence map.
    LPTSTR_ARRAY UnboundBindings;   // Redir bindings that aren't bound to browser
    PBR_BROWSER_FIELDS BrConfigFields;
#if DBG
    DWORD BrowserDebug;             // If non zero, indicates debug info.
    DWORD BrowserDebugFileLimit;    // File size limit on browser log size.
#endif
} BRCONFIGURATION_INFO, *PBRCONFIGURATION_INFO;

extern BRCONFIGURATION_INFO BrInfo;

#define BRBUF      BrInfo.BrConfigBuf

extern
ULONG
NumberOfServerEnumerations;

extern
ULONG
NumberOfDomainEnumerations;

extern
ULONG
NumberOfOtherEnumerations;

extern
ULONG
NumberOfMissedGetBrowserListRequests;

extern
CRITICAL_SECTION
BrowserStatisticsLock;



NET_API_STATUS
BrGetBrowserConfiguration(
    VOID
    );

VOID
BrDeleteConfiguration (
    DWORD BrInitState
    );

NET_API_STATUS
BrReadBrowserConfigFields(
    BOOL InitialCall
    );


#if DEVL
NET_API_STATUS
BrUpdateDebugInformation(
    IN LPWSTR SystemKeyName,
    IN LPWSTR ValueName,
    IN LPTSTR TransportName,
    IN LPTSTR ServerName OPTIONAL,
    IN DWORD ServiceStatus
    );

#endif

#endif