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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
|
/*++ BUILD Version: 0001 // Increment this if a change has global effects
Copyright (c) 1991-1995 Microsoft Corporation
Module Name:
lmrpl.h
Abstract:
This file contains structures, function prototypes, and definitions
for the Remote (Initial) Program Load service.
Environment:
User Mode - Win32
Portable to any flat, 32-bit environment. (Uses Win32 typedefs.)
Requires ANSI C extensions: slash-slash comments, long external names.
Revision History:
27-July-1993
Created from NT RPL API spec which was influenced by LM2.1 RPL product,
header files and specs.
--*/
#ifdef __cplusplus
extern "C" {
#endif
#define RPL_MAX_WKSTA_NAME_LENGTH MAX_COMPUTERNAME_LENGTH
#define RPL_MAX_PROFILE_NAME_LENGTH 16
#define RPL_MAX_CONFIG_NAME_LENGTH RPL_MAX_PROFILE_NAME_LENGTH
#define RPL_MAX_BOOT_NAME_LENGTH 12
#define RPL_ADAPTER_NAME_LENGTH 12 // count of hex digits in network id
#define RPL_VENDOR_NAME_LENGTH 6 // leading digits of network id
#define RPL_MAX_STRING_LENGTH 126 // driven by jet < 255 byte limit
//
// Data Structures
//
//
// NetRplGetInfo & NetRplSetInfo
//
//
// Pass these flags in AdapterPolicy to cause these special actions
// to occur. This will not change the adapter policy.
//
#define RPL_REPLACE_RPLDISK 0x80000000
#define RPL_CHECK_SECURITY 0x40000000
#define RPL_CHECK_CONFIGS 0x20000000
#define RPL_CREATE_PROFILES 0x10000000
#define RPL_BACKUP_DATABASE 0x08000000
#define RPL_SPECIAL_ACTIONS \
( RPL_REPLACE_RPLDISK | \
RPL_CHECK_SECURITY | \
RPL_CHECK_CONFIGS | \
RPL_CREATE_PROFILES | \
RPL_BACKUP_DATABASE )
typedef struct _RPL_INFO_0 {
DWORD Flags;
} RPL_INFO_0, *PRPL_INFO_0, *LPRPL_INFO_0;
//
// NetRplBootEnum & NetRplBootAdd
//
typedef struct _RPL_BOOT_INFO_0 {
LPTSTR BootName;
LPTSTR BootComment;
} RPL_BOOT_INFO_0, *PRPL_BOOT_INFO_0, *LPRPL_BOOT_INFO_0;
//
//
// BOOT_FLAGS_FINAL_ACKNOWLEDGMENT_* describe whether acknowledgment of the
// last remote boot frame will be requested from the client.
//
#define BOOT_FLAGS_FINAL_ACKNOWLEDGMENT_TRUE ((DWORD)0x00000001)
#define BOOT_FLAGS_FINAL_ACKNOWLEDGMENT_FALSE ((DWORD)0x00000002)
#define BOOT_FLAGS_MASK_FINAL_ACKNOWLEDGMENT \
( BOOT_FLAGS_FINAL_ACKNOWLEDGMENT_TRUE | \
BOOT_FLAGS_FINAL_ACKNOWLEDGMENT_FALSE )
typedef struct _RPL_BOOT_INFO_1 {
LPTSTR BootName;
LPTSTR BootComment;
DWORD Flags;
LPTSTR VendorName;
} RPL_BOOT_INFO_1, *PRPL_BOOT_INFO_1, *LPRPL_BOOT_INFO_1;
typedef struct _RPL_BOOT_INFO_2 {
LPTSTR BootName;
LPTSTR BootComment;
DWORD Flags;
LPTSTR VendorName;
LPTSTR BbcFile;
DWORD WindowSize;
} RPL_BOOT_INFO_2, *PRPL_BOOT_INFO_2, *LPRPL_BOOT_INFO_2;
//
// NetRplConfigEnum & NetRplConfigAdd
//
typedef struct _RPL_CONFIG_INFO_0 {
LPTSTR ConfigName;
LPTSTR ConfigComment;
} RPL_CONFIG_INFO_0, *PRPL_CONFIG_INFO_0, *LPRPL_CONFIG_INFO_0;
//
// CONFIG_FLAGS_ENABLED_* describe whether configuration is enabled (admin
// has copied all the necessary files to use such configuration) or disabled
//
#define CONFIG_FLAGS_ENABLED_TRUE ((DWORD)0x00000001) // enabled
#define CONFIG_FLAGS_ENABLED_FALSE ((DWORD)0x00000002) // disabled
#define CONFIG_FLAGS_MASK_ENABLED \
( CONFIG_FLAGS_ENABLED_TRUE | \
CONFIG_FLAGS_ENABLED_FALSE )
typedef struct _RPL_CONFIG_INFO_1 {
LPTSTR ConfigName;
LPTSTR ConfigComment;
DWORD Flags;
} RPL_CONFIG_INFO_1, *PRPL_CONFIG_INFO_1, *LPRPL_CONFIG_INFO_1;
typedef struct _RPL_CONFIG_INFO_2 {
LPTSTR ConfigName;
LPTSTR ConfigComment;
DWORD Flags;
LPTSTR BootName;
LPTSTR DirName;
LPTSTR DirName2;
LPTSTR DirName3;
LPTSTR DirName4;
LPTSTR FitShared;
LPTSTR FitPersonal;
} RPL_CONFIG_INFO_2, *PRPL_CONFIG_INFO_2, *LPRPL_CONFIG_INFO_2;
//
// NetRplProfileEnum, NetRplProfileGetInfo, NetRplProfileSetInfo &
// NetRplProfileAdd
//
typedef struct _RPL_PROFILE_INFO_0 {
LPTSTR ProfileName;
LPTSTR ProfileComment;
} RPL_PROFILE_INFO_0, *PRPL_PROFILE_INFO_0, *LPRPL_PROFILE_INFO_0;
typedef struct _RPL_PROFILE_INFO_1 {
LPTSTR ProfileName;
LPTSTR ProfileComment;
DWORD Flags;
} RPL_PROFILE_INFO_1, *PRPL_PROFILE_INFO_1, *LPRPL_PROFILE_INFO_1;
typedef struct _RPL_PROFILE_INFO_2 {
LPTSTR ProfileName;
LPTSTR ProfileComment;
DWORD Flags;
LPTSTR ConfigName;
LPTSTR BootName;
LPTSTR FitShared;
LPTSTR FitPersonal;
} RPL_PROFILE_INFO_2, *PRPL_PROFILE_INFO_2, *LPRPL_PROFILE_INFO_2;
//
// NetRplVendorEnum
//
typedef struct _RPL_VENDOR_INFO_0 {
LPTSTR VendorName;
LPTSTR VendorComment;
} RPL_VENDOR_INFO_0, *PRPL_VENDOR_INFO_0, *LPRPL_VENDOR_INFO_0;
typedef struct _RPL_VENDOR_INFO_1 {
LPTSTR VendorName;
LPTSTR VendorComment;
DWORD Flags;
} RPL_VENDOR_INFO_1, *PRPL_VENDOR_INFO_1, *LPRPL_VENDOR_INFO_1;
//
// NetRplAdapterEnum
//
typedef struct _RPL_ADAPTER_INFO_0 {
LPTSTR AdapterName;
LPTSTR AdapterComment;
} RPL_ADAPTER_INFO_0, *PRPL_ADAPTER_INFO_0, *LPRPL_ADAPTER_INFO_0;
typedef struct _RPL_ADAPTER_INFO_1 {
LPTSTR AdapterName;
LPTSTR AdapterComment;
DWORD Flags;
} RPL_ADAPTER_INFO_1, *PRPL_ADAPTER_INFO_1, *LPRPL_ADAPTER_INFO_1;
//
// NetRplWkstaEnum, NetRplWkstaGetInfo, NetRplWkstaSetInfo &
// NetRplWkstaAdd
//
// WKSTA_FLAGS_LOGON_INPUT_* describe username/password policy during rpl logon
// on the client side. Depending on the value of this field, user input for
// username/password during RPL logon will be:
//
#define WKSTA_FLAGS_LOGON_INPUT_REQUIRED ((DWORD)0x00000001) // L'P', user input is required
#define WKSTA_FLAGS_LOGON_INPUT_OPTIONAL ((DWORD)0x00000002) // L'N', user input is optional
#define WKSTA_FLAGS_LOGON_INPUT_IMPOSSIBLE ((DWORD)0x00000004) // L'D', user input is not solicited
#define WKSTA_FLAGS_MASK_LOGON_INPUT \
( WKSTA_FLAGS_LOGON_INPUT_REQUIRED | \
WKSTA_FLAGS_LOGON_INPUT_OPTIONAL | \
WKSTA_FLAGS_LOGON_INPUT_IMPOSSIBLE )
//
// WKSTA_FLAGS_SHARING_* describe whether workstation shares or does not share its
// remote boot disk (i.e. "does it have shared or personal profile").
//
#define WKSTA_FLAGS_SHARING_TRUE ((DWORD)0x00000008) // L'S', shares remote boot disk
#define WKSTA_FLAGS_SHARING_FALSE ((DWORD)0x00000010) // L'P', does not share remote boot disk
#define WKSTA_FLAGS_MASK_SHARING \
( WKSTA_FLAGS_SHARING_TRUE | \
WKSTA_FLAGS_SHARING_FALSE )
//
// WKSTA_FLAGS_DHCP_* describe whether workstation uses DHCP or not. Note
// that these flags are relevant only if TCP/IP itself is enabled (i.e. changes
// to boot block configuration file, config.sys & autoexec.bat have been made).
//
#define WKSTA_FLAGS_DHCP_TRUE ((DWORD)0x00000020) // use DHCP
#define WKSTA_FLAGS_DHCP_FALSE ((DWORD)0x00000040) // do not use DHCP
#define WKSTA_FLAGS_MASK_DHCP \
( WKSTA_FLAGS_DHCP_TRUE | \
WKSTA_FLAGS_DHCP_FALSE )
//
// WKSTA_FLAGS_DELETE_ACCOUNT_* describes whether the corresponding user
// account was created by Remoteboot Manager, and thus, should be deleted
// when the workstation is deleted. This flag is actually used by
// Remoteboot Manager rather than RPL Service.
//
#define WKSTA_FLAGS_DELETE_TRUE ((DWORD)0x00000080) // delete user acct
#define WKSTA_FLAGS_DELETE_FALSE ((DWORD)0x00000100) // do not delete
#define WKSTA_FLAGS_MASK_DELETE \
( WKSTA_FLAGS_DELETE_TRUE | \
WKSTA_FLAGS_DELETE_FALSE )
#define WKSTA_FLAGS_MASK \
( WKSTA_FLAGS_MASK_LOGON_INPUT | \
WKSTA_FLAGS_MASK_SHARING | \
WKSTA_FLAGS_MASK_DHCP | \
WKSTA_FLAGS_MASK_DELETE )
typedef struct _RPL_WKSTA_INFO_0 {
LPTSTR WkstaName;
LPTSTR WkstaComment;
} RPL_WKSTA_INFO_0, *PRPL_WKSTA_INFO_0, *LPRPL_WKSTA_INFO_0;
typedef struct _RPL_WKSTA_INFO_1 {
LPTSTR WkstaName;
LPTSTR WkstaComment;
DWORD Flags;
LPTSTR ProfileName;
} RPL_WKSTA_INFO_1, *PRPL_WKSTA_INFO_1, *LPRPL_WKSTA_INFO_1;
typedef struct _RPL_WKSTA_INFO_2 {
LPTSTR WkstaName;
LPTSTR WkstaComment;
DWORD Flags;
LPTSTR ProfileName;
LPTSTR BootName;
LPTSTR FitFile;
LPTSTR AdapterName;
DWORD TcpIpAddress;
DWORD TcpIpSubnet;
DWORD TcpIpGateway;
} RPL_WKSTA_INFO_2, *PRPL_WKSTA_INFO_2, *LPRPL_WKSTA_INFO_2;
//
// RPL RPC Context Handle (Opaque form).
//
typedef HANDLE RPL_HANDLE;
typedef RPL_HANDLE * PRPL_HANDLE;
typedef PRPL_HANDLE LPRPL_HANDLE;
//
// Function Prototypes
//
//
// Service apis
//
NET_API_STATUS NET_API_FUNCTION
NetRplClose(
IN RPL_HANDLE ServerHandle
);
NET_API_STATUS NET_API_FUNCTION
NetRplGetInfo(
IN RPL_HANDLE ServerHandle,
IN DWORD InfoLevel,
OUT LPBYTE * PointerToBuffer
);
NET_API_STATUS NET_API_FUNCTION
NetRplOpen(
IN LPTSTR ServerName,
OUT LPRPL_HANDLE ServerHandle
);
NET_API_STATUS NET_API_FUNCTION
NetRplSetInfo(
IN RPL_HANDLE ServerHandle,
IN DWORD InfoLevel,
IN LPBYTE Buffer,
OUT LPDWORD ErrorParameter OPTIONAL
);
//
// ADAPTER apis
//
NET_API_STATUS NET_API_FUNCTION
NetRplAdapterAdd(
IN RPL_HANDLE ServerHandle,
IN DWORD InfoLevel,
IN LPBYTE Buffer,
OUT LPDWORD ErrorParameter OPTIONAL
);
//
// NetRplAdapterDel: if AdapterName is NULL then all adapters will be deleted.
//
NET_API_STATUS NET_API_FUNCTION
NetRplAdapterDel(
IN RPL_HANDLE ServerHandle,
IN LPTSTR AdapterName OPTIONAL
);
NET_API_STATUS NET_API_FUNCTION
NetRplAdapterEnum(
IN RPL_HANDLE ServerHandle,
IN DWORD InfoLevel,
OUT LPBYTE * PointerToBuffer,
IN DWORD PrefMaxLength,
OUT LPDWORD EntriesRead,
OUT LPDWORD TotalEntries,
OUT LPDWORD ResumeHandle
);
//
// BOOT block apis
//
NET_API_STATUS NET_API_FUNCTION
NetRplBootAdd(
IN RPL_HANDLE ServerHandle,
IN DWORD InfoLevel,
IN LPBYTE Buffer,
OUT LPDWORD ErrorParameter OPTIONAL
);
NET_API_STATUS NET_API_FUNCTION
NetRplBootDel(
IN RPL_HANDLE ServerHandle,
IN LPTSTR BootName,
IN LPTSTR VendorName
);
NET_API_STATUS NET_API_FUNCTION
NetRplBootEnum(
IN RPL_HANDLE ServerHandle,
IN DWORD InfoLevel,
OUT LPBYTE * PointerToBuffer,
IN DWORD PrefMaxLength,
OUT LPDWORD EntriesRead,
OUT LPDWORD TotalEntries,
OUT LPDWORD ResumeHandle
);
//
// CONFIG apis
//
NET_API_STATUS NET_API_FUNCTION
NetRplConfigAdd(
IN RPL_HANDLE ServerHandle,
IN DWORD InfoLevel,
IN LPBYTE Buffer,
OUT LPDWORD ErrorParameter OPTIONAL
);
NET_API_STATUS NET_API_FUNCTION
NetRplConfigDel(
IN RPL_HANDLE ServerHandle,
IN LPTSTR ConfigName
);
NET_API_STATUS NET_API_FUNCTION
NetRplConfigEnum(
IN RPL_HANDLE ServerHandle,
IN LPTSTR AdapterName,
IN DWORD InfoLevel,
OUT LPBYTE * PointerToBuffer,
IN DWORD PrefMaxLength,
OUT LPDWORD EntriesRead,
OUT LPDWORD TotalEntries,
OUT LPDWORD ResumeHandle
);
//
// PROFILE apis
//
NET_API_STATUS NET_API_FUNCTION
NetRplProfileAdd(
IN RPL_HANDLE ServerHandle,
IN DWORD InfoLevel,
IN LPBYTE Buffer,
OUT LPDWORD ErrorParameter OPTIONAL
);
NET_API_STATUS NET_API_FUNCTION
NetRplProfileClone(
IN RPL_HANDLE ServerHandle,
IN LPTSTR SourceProfileName,
IN LPTSTR TargetProfileName,
IN LPTSTR TargetProfileComment OPTIONAL
);
NET_API_STATUS NET_API_FUNCTION
NetRplProfileDel(
IN RPL_HANDLE ServerHandle,
IN LPTSTR ProfileName
);
NET_API_STATUS NET_API_FUNCTION
NetRplProfileEnum(
IN RPL_HANDLE ServerHandle,
IN LPTSTR AdapterName,
IN DWORD InfoLevel,
OUT LPBYTE * PointerToBuffer,
IN DWORD PrefMaxLength,
OUT LPDWORD EntriesRead,
OUT LPDWORD TotalEntries,
OUT LPDWORD ResumeHandle
);
NET_API_STATUS NET_API_FUNCTION
NetRplProfileGetInfo(
IN RPL_HANDLE ServerHandle,
IN LPTSTR ProfileName,
IN DWORD InfoLevel,
OUT LPBYTE * PointerToBuffer
);
NET_API_STATUS NET_API_FUNCTION
NetRplProfileSetInfo(
IN RPL_HANDLE ServerHandle,
IN LPTSTR ProfileName,
IN DWORD InfoLevel,
IN LPBYTE Buffer,
OUT LPDWORD ErrorParameter OPTIONAL
);
//
// VENDOR apis
//
NET_API_STATUS NET_API_FUNCTION
NetRplVendorAdd(
IN RPL_HANDLE ServerHandle,
IN DWORD InfoLevel,
IN LPBYTE Buffer,
OUT LPDWORD ErrorParameter OPTIONAL
);
NET_API_STATUS NET_API_FUNCTION
NetRplVendorDel(
IN RPL_HANDLE ServerHandle,
IN LPTSTR VendorName
);
NET_API_STATUS NET_API_FUNCTION
NetRplVendorEnum(
IN RPL_HANDLE ServerHandle,
IN DWORD InfoLevel,
OUT LPBYTE * PointerToBuffer,
IN DWORD PrefMaxLength,
OUT LPDWORD EntriesRead,
OUT LPDWORD TotalEntries,
OUT LPDWORD ResumeHandle
);
//
// WKSTA apis
//
NET_API_STATUS NET_API_FUNCTION
NetRplWkstaAdd(
IN RPL_HANDLE ServerHandle,
IN DWORD InfoLevel,
IN LPBYTE Buffer,
OUT LPDWORD ErrorParameter OPTIONAL
);
NET_API_STATUS NET_API_FUNCTION
NetRplWkstaClone(
IN RPL_HANDLE ServerHandle,
IN LPTSTR SourceWkstaName,
IN LPTSTR TargetWkstaName,
IN LPTSTR TargetWkstaComment OPTIONAL,
IN LPTSTR TargetAdapterName,
IN DWORD TargetWkstaIpAddress
);
NET_API_STATUS NET_API_FUNCTION
NetRplWkstaDel(
IN RPL_HANDLE ServerHandle,
IN LPTSTR WkstaName
);
NET_API_STATUS NET_API_FUNCTION
NetRplWkstaEnum(
IN RPL_HANDLE ServerHandle,
IN LPTSTR ProfileName,
IN DWORD InfoLevel,
OUT LPBYTE * PointerToBuffer,
IN DWORD PrefMaxLength,
OUT LPDWORD EntriesRead,
OUT LPDWORD TotalEntries,
OUT LPDWORD ResumeHandle
);
NET_API_STATUS NET_API_FUNCTION
NetRplWkstaGetInfo(
IN RPL_HANDLE ServerHandle,
IN LPTSTR WkstaName,
IN DWORD InfoLevel,
OUT LPBYTE * Buffer
);
NET_API_STATUS NET_API_FUNCTION
NetRplWkstaSetInfo(
IN RPL_HANDLE ServerHandle,
IN LPTSTR WkstaName,
IN DWORD InfoLevel,
IN LPBYTE Buffer,
OUT LPDWORD ErrorParameter OPTIONAL
);
//
// SECURITY api
//
NET_API_STATUS NET_API_FUNCTION
NetRplSetSecurity(
IN RPL_HANDLE ServerHandle,
IN LPTSTR WkstaName OPTIONAL,
IN DWORD WkstaRid,
IN DWORD RplUserRid
);
#ifdef __cplusplus
}
#endif
|