source: Daodan/MinGW/include/ddk/tdikrnl.h@ 1142

Last change on this file since 1142 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 36.6 KB
RevLine 
[1046]1/*
2 * tdikrnl.h
3 *
4 * TDI kernel mode definitions
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23#ifndef __TDIKRNL_H
24#define __TDIKRNL_H
25
26#if __GNUC__ >=3
27#pragma GCC system_header
28#endif
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#include "ntddk.h"
35#include "tdi.h"
36
37#if defined(_TDI_)
38 #define TDIKRNLAPI DECLSPEC_EXPORT
39#else
40 #define TDIKRNLAPI DECLSPEC_IMPORT
41#endif
42
43
44typedef struct _TDI_REQUEST_KERNEL {
45 ULONG RequestFlags;
46 PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
47 PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
48 PVOID RequestSpecific;
49} TDI_REQUEST_KERNEL, *PTDI_REQUEST_KERNEL;
50
51/* Request codes */
52#define TDI_ASSOCIATE_ADDRESS 0x01
53#define TDI_DISASSOCIATE_ADDRESS 0x02
54#define TDI_CONNECT 0x03
55#define TDI_LISTEN 0x04
56#define TDI_ACCEPT 0x05
57#define TDI_DISCONNECT 0x06
58#define TDI_SEND 0x07
59#define TDI_RECEIVE 0x08
60#define TDI_SEND_DATAGRAM 0x09
61#define TDI_RECEIVE_DATAGRAM 0x0A
62#define TDI_SET_EVENT_HANDLER 0x0B
63#define TDI_QUERY_INFORMATION 0x0C
64#define TDI_SET_INFORMATION 0x0D
65#define TDI_ACTION 0x0E
66
67#define TDI_DIRECT_SEND 0x27
68#define TDI_DIRECT_SEND_DATAGRAM 0x29
69
70#define TDI_TRANSPORT_ADDRESS_FILE 1
71#define TDI_CONNECTION_FILE 2
72#define TDI_CONTROL_CHANNEL_FILE 3
73
74/* Internal TDI IOCTLS */
75#define IOCTL_TDI_QUERY_DIRECT_SEND_HANDLER _TDI_CONTROL_CODE(0x80, METHOD_NEITHER)
76#define IOCTL_TDI_QUERY_DIRECT_SENDDG_HANDLER _TDI_CONTROL_CODE(0x81, METHOD_NEITHER)
77
78/* TdiAssociateAddress */
79typedef struct _TDI_REQUEST_KERNEL_ASSOCIATE {
80 HANDLE AddressHandle;
81} TDI_REQUEST_KERNEL_ASSOCIATE, *PTDI_REQUEST_KERNEL_ASSOCIATE;
82
83/* TdiDisassociateAddress */
84typedef TDI_REQUEST_KERNEL TDI_REQUEST_KERNEL_DISASSOCIATE,
85 *PTDI_REQUEST_KERNEL_DISASSOCIATE;
86
87/* TdiAccept */
88typedef struct _TDI_REQUEST_KERNEL_ACCEPT {
89 PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
90 PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
91} TDI_REQUEST_KERNEL_ACCEPT, *PTDI_REQUEST_KERNEL_ACCEPT;
92
93/* TdiConnect */
94typedef TDI_REQUEST_KERNEL TDI_REQUEST_KERNEL_CONNECT,
95 *PTDI_REQUEST_KERNEL_CONNECT;
96
97/* TdiDisconnect */
98typedef TDI_REQUEST_KERNEL TDI_REQUEST_KERNEL_DISCONNECT,
99 *PTDI_REQUEST_KERNEL_DISCONNECT;
100
101/* TdiListen */
102typedef TDI_REQUEST_KERNEL TDI_REQUEST_KERNEL_LISTEN,
103 *PTDI_REQUEST_KERNEL_LISTEN;
104
105/* TdiReceive */
106typedef struct _TDI_REQUEST_KERNEL_RECEIVE {
107 ULONG ReceiveLength;
108 ULONG ReceiveFlags;
109} TDI_REQUEST_KERNEL_RECEIVE, *PTDI_REQUEST_KERNEL_RECEIVE;
110
111/* TdiReceiveDatagram */
112typedef struct _TDI_REQUEST_KERNEL_RECEIVEDG {
113 ULONG ReceiveLength;
114 PTDI_CONNECTION_INFORMATION ReceiveDatagramInformation;
115 PTDI_CONNECTION_INFORMATION ReturnDatagramInformation;
116 ULONG ReceiveFlags;
117} TDI_REQUEST_KERNEL_RECEIVEDG, *PTDI_REQUEST_KERNEL_RECEIVEDG;
118
119/* TdiSend */
120typedef struct _TDI_REQUEST_KERNEL_SEND {
121 ULONG SendLength;
122 ULONG SendFlags;
123} TDI_REQUEST_KERNEL_SEND, *PTDI_REQUEST_KERNEL_SEND;
124
125/* TdiSendDatagram */
126typedef struct _TDI_REQUEST_KERNEL_SENDDG {
127 ULONG SendLength;
128 PTDI_CONNECTION_INFORMATION SendDatagramInformation;
129} TDI_REQUEST_KERNEL_SENDDG, *PTDI_REQUEST_KERNEL_SENDDG;
130
131/* TdiSetEventHandler */
132typedef struct _TDI_REQUEST_KERNEL_SET_EVENT {
133 LONG EventType;
134 PVOID EventHandler;
135 PVOID EventContext;
136} TDI_REQUEST_KERNEL_SET_EVENT, *PTDI_REQUEST_KERNEL_SET_EVENT;
137
138/* TdiQueryInformation */
139typedef struct _TDI_REQUEST_KERNEL_QUERY_INFO {
140 LONG QueryType;
141 PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
142} TDI_REQUEST_KERNEL_QUERY_INFORMATION, *PTDI_REQUEST_KERNEL_QUERY_INFORMATION;
143
144/* TdiSetInformation */
145typedef struct _TDI_REQUEST_KERNEL_SET_INFO {
146 LONG SetType;
147 PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
148} TDI_REQUEST_KERNEL_SET_INFORMATION, *PTDI_REQUEST_KERNEL_SET_INFORMATION;
149
150
151/* Event types */
152#define TDI_EVENT_CONNECT 0
153#define TDI_EVENT_DISCONNECT 1
154#define TDI_EVENT_ERROR 2
155#define TDI_EVENT_RECEIVE 3
156#define TDI_EVENT_RECEIVE_DATAGRAM 4
157#define TDI_EVENT_RECEIVE_EXPEDITED 5
158#define TDI_EVENT_SEND_POSSIBLE 6
159#define TDI_EVENT_CHAINED_RECEIVE 7
160#define TDI_EVENT_CHAINED_RECEIVE_DATAGRAM 8
161#define TDI_EVENT_CHAINED_RECEIVE_EXPEDITED 9
162#define TDI_EVENT_ERROR_EX 10
163
164typedef NTSTATUS DDKAPI
165(*PTDI_IND_CONNECT)(
166 /*IN*/ PVOID TdiEventContext,
167 /*IN*/ LONG RemoteAddressLength,
168 /*IN*/ PVOID RemoteAddress,
169 /*IN*/ LONG UserDataLength,
170 /*IN*/ PVOID UserData,
171 /*IN*/ LONG OptionsLength,
172 /*IN*/ PVOID Options,
173 /*OUT*/ CONNECTION_CONTEXT *ConnectionContext,
174 /*OUT*/ PIRP *AcceptIrp);
175
176TDIKRNLAPI
177NTSTATUS
178DDKAPI
179TdiDefaultConnectHandler(
180 /*IN*/ PVOID TdiEventContext,
181 /*IN*/ LONG RemoteAddressLength,
182 /*IN*/ PVOID RemoteAddress,
183 /*IN*/ LONG UserDataLength,
184 /*IN*/ PVOID UserData,
185 /*IN*/ LONG OptionsLength,
186 /*IN*/ PVOID Options,
187 /*OUT*/ CONNECTION_CONTEXT *ConnectionContext,
188 /*OUT*/ PIRP *AcceptIrp);
189
190typedef NTSTATUS DDKAPI
191(*PTDI_IND_DISCONNECT)(
192 /*IN*/ PVOID TdiEventContext,
193 /*IN*/ CONNECTION_CONTEXT ConnectionContext,
194 /*IN*/ LONG DisconnectDataLength,
195 /*IN*/ PVOID DisconnectData,
196 /*IN*/ LONG DisconnectInformationLength,
197 /*IN*/ PVOID DisconnectInformation,
198 /*IN*/ ULONG DisconnectFlags);
199
200TDIKRNLAPI
201NTSTATUS
202DDKAPI
203TdiDefaultDisconnectHandler(
204 /*IN*/ PVOID TdiEventContext,
205 /*IN*/ CONNECTION_CONTEXT ConnectionContext,
206 /*IN*/ LONG DisconnectDataLength,
207 /*IN*/ PVOID DisconnectData,
208 /*IN*/ LONG DisconnectInformationLength,
209 /*IN*/ PVOID DisconnectInformation,
210 /*IN*/ ULONG DisconnectFlags);
211
212typedef NTSTATUS DDKAPI
213(*PTDI_IND_ERROR)(
214 /*IN*/ PVOID TdiEventContext,
215 /*IN*/ NTSTATUS Status);
216
217typedef NTSTATUS DDKAPI
218(*PTDI_IND_ERROR_EX)(
219 /*IN*/ PVOID TdiEventContext,
220 /*IN*/ NTSTATUS Status,
221 /*IN*/ PVOID Buffer);
222
223TDIKRNLAPI
224NTSTATUS
225DDKAPI
226TdiDefaultErrorHandler(
227 /*IN*/ PVOID TdiEventContext,
228 /*IN*/ NTSTATUS Status);
229
230typedef NTSTATUS DDKAPI
231(*PTDI_IND_RECEIVE)(
232 /*IN*/ PVOID TdiEventContext,
233 /*IN*/ CONNECTION_CONTEXT ConnectionContext,
234 /*IN*/ ULONG ReceiveFlags,
235 /*IN*/ ULONG BytesIndicated,
236 /*IN*/ ULONG BytesAvailable,
237 /*OUT*/ ULONG *BytesTaken,
238 /*IN*/ PVOID Tsdu,
239 /*OUT*/ PIRP *IoRequestPacket);
240
241TDIKRNLAPI
242NTSTATUS
243DDKAPI
244TdiDefaultReceiveHandler(
245 /*IN*/ PVOID TdiEventContext,
246 /*IN*/ CONNECTION_CONTEXT ConnectionContext,
247 /*IN*/ ULONG ReceiveFlags,
248 /*IN*/ ULONG BytesIndicated,
249 /*IN*/ ULONG BytesAvailable,
250 /*OUT*/ ULONG *BytesTaken,
251 /*IN*/ PVOID Tsdu,
252 /*OUT*/ PIRP *IoRequestPacket);
253
254typedef NTSTATUS DDKAPI
255(*PTDI_IND_RECEIVE_DATAGRAM)(
256 /*IN*/ PVOID TdiEventContext,
257 /*IN*/ LONG SourceAddressLength,
258 /*IN*/ PVOID SourceAddress,
259 /*IN*/ LONG OptionsLength,
260 /*IN*/ PVOID Options,
261 /*IN*/ ULONG ReceiveDatagramFlags,
262 /*IN*/ ULONG BytesIndicated,
263 /*IN*/ ULONG BytesAvailable,
264 /*OUT*/ ULONG *BytesTaken,
265 /*IN*/ PVOID Tsdu,
266 /*OUT*/ PIRP *IoRequestPacket);
267
268TDIKRNLAPI
269NTSTATUS DDKAPI
270TdiDefaultRcvDatagramHandler(
271 /*IN*/ PVOID TdiEventContext,
272 /*IN*/ LONG SourceAddressLength,
273 /*IN*/ PVOID SourceAddress,
274 /*IN*/ LONG OptionsLength,
275 /*IN*/ PVOID Options,
276 /*IN*/ ULONG ReceiveDatagramFlags,
277 /*IN*/ ULONG BytesIndicated,
278 /*IN*/ ULONG BytesAvailable,
279 /*OUT*/ ULONG *BytesTaken,
280 /*IN*/ PVOID Tsdu,
281 /*OUT*/ PIRP *IoRequestPacket);
282
283typedef NTSTATUS DDKAPI
284(*PTDI_IND_RECEIVE_EXPEDITED)(
285 /*IN*/ PVOID TdiEventContext,
286 /*IN*/ CONNECTION_CONTEXT ConnectionContext,
287 /*IN*/ ULONG ReceiveFlags,
288 /*IN*/ ULONG BytesIndicated,
289 /*IN*/ ULONG BytesAvailable,
290 /*OUT*/ ULONG *BytesTaken,
291 /*IN*/ PVOID Tsdu,
292 /*OUT*/ PIRP *IoRequestPacket);
293
294TDIKRNLAPI
295NTSTATUS
296DDKAPI
297TdiDefaultRcvExpeditedHandler(
298 /*IN*/ PVOID TdiEventContext,
299 /*IN*/ CONNECTION_CONTEXT ConnectionContext,
300 /*IN*/ ULONG ReceiveFlags,
301 /*IN*/ ULONG BytesIndicated,
302 /*IN*/ ULONG BytesAvailable,
303 /*OUT*/ ULONG *BytesTaken,
304 /*IN*/ PVOID Tsdu,
305 /*OUT*/ PIRP *IoRequestPacket);
306
307typedef NTSTATUS DDKAPI
308(*PTDI_IND_CHAINED_RECEIVE)(
309 /*IN*/ PVOID TdiEventContext,
310 /*IN*/ CONNECTION_CONTEXT ConnectionContext,
311 /*IN*/ ULONG ReceiveFlags,
312 /*IN*/ ULONG ReceiveLength,
313 /*IN*/ ULONG StartingOffset,
314 /*IN*/ PMDL Tsdu,
315 /*IN*/ PVOID TsduDescriptor);
316
317TDIKRNLAPI
318NTSTATUS
319DDKAPI
320TdiDefaultChainedReceiveHandler(
321 /*IN*/ PVOID TdiEventContext,
322 /*IN*/ CONNECTION_CONTEXT ConnectionContext,
323 /*IN*/ ULONG ReceiveFlags,
324 /*IN*/ ULONG ReceiveLength,
325 /*IN*/ ULONG StartingOffset,
326 /*IN*/ PMDL Tsdu,
327 /*IN*/ PVOID TsduDescriptor);
328
329typedef NTSTATUS DDKAPI
330(*PTDI_IND_CHAINED_RECEIVE_DATAGRAM)(
331 /*IN*/ PVOID TdiEventContext,
332 /*IN*/ LONG SourceAddressLength,
333 /*IN*/ PVOID SourceAddress,
334 /*IN*/ LONG OptionsLength,
335 /*IN*/ PVOID Options,
336 /*IN*/ ULONG ReceiveDatagramFlags,
337 /*IN*/ ULONG ReceiveDatagramLength,
338 /*IN*/ ULONG StartingOffset,
339 /*IN*/ PMDL Tsdu,
340 /*IN*/ PVOID TsduDescriptor);
341
342TDIKRNLAPI
343NTSTATUS
344DDKAPI
345TdiDefaultChainedRcvDatagramHandler(
346 /*IN*/ PVOID TdiEventContext,
347 /*IN*/ LONG SourceAddressLength,
348 /*IN*/ PVOID SourceAddress,
349 /*IN*/ LONG OptionsLength,
350 /*IN*/ PVOID Options,
351 /*IN*/ ULONG ReceiveDatagramFlags,
352 /*IN*/ ULONG ReceiveDatagramLength,
353 /*IN*/ ULONG StartingOffset,
354 /*IN*/ PMDL Tsdu,
355 /*IN*/ PVOID TsduDescriptor);
356
357typedef NTSTATUS DDKAPI
358(*PTDI_IND_CHAINED_RECEIVE_EXPEDITED)(
359 /*IN*/ PVOID TdiEventContext,
360 /*IN*/ CONNECTION_CONTEXT ConnectionContext,
361 /*IN*/ ULONG ReceiveFlags,
362 /*IN*/ ULONG ReceiveLength,
363 /*IN*/ ULONG StartingOffset,
364 /*IN*/ PMDL Tsdu,
365 /*IN*/ PVOID TsduDescriptor);
366
367TDIKRNLAPI
368NTSTATUS
369DDKAPI
370TdiDefaultChainedRcvExpeditedHandler(
371 /*IN*/ PVOID TdiEventContext,
372 /*IN*/ CONNECTION_CONTEXT ConnectionContext,
373 /*IN*/ ULONG ReceiveFlags,
374 /*IN*/ ULONG ReceiveLength,
375 /*IN*/ ULONG StartingOffset,
376 /*IN*/ PMDL Tsdu,
377 /*IN*/ PVOID TsduDescriptor);
378
379typedef NTSTATUS DDKAPI
380(*PTDI_IND_SEND_POSSIBLE)(
381 /*IN*/ PVOID TdiEventContext,
382 /*IN*/ PVOID ConnectionContext,
383 /*IN*/ ULONG BytesAvailable);
384
385TDIKRNLAPI
386NTSTATUS
387DDKAPI
388TdiDefaultSendPossibleHandler(
389 /*IN*/ PVOID TdiEventContext,
390 /*IN*/ PVOID ConnectionContext,
391 /*IN*/ ULONG BytesAvailable);
392
393
394
395 /* Macros and functions to build IRPs */
396
397#define TdiBuildBaseIrp( \
398 bIrp, bDevObj, bFileObj, bCompRoutine, bContxt, bIrpSp, bMinor) \
399{ \
400 bIrpSp->MajorFunction = IRP_MJ_INTERNAL_DEVICE_CONTROL; \
401 bIrpSp->MinorFunction = (bMinor); \
402 bIrpSp->DeviceObject = (bDevObj); \
403 bIrpSp->FileObject = (bFileObj); \
404 if (bCompRoutine) \
405 IoSetCompletionRoutine(bIrp, bCompRoutine, bContxt, TRUE, TRUE, TRUE) \
406 else \
407 IoSetCompletionRoutine(bIrp, NULL, NULL, FALSE, FALSE, FALSE); \
408}
409
410 /*
411 * VOID
412 * TdiBuildAccept(
413 * IN PIRP Irp,
414 * IN PDEVICE_OBJECT DevObj,
415 * IN PFILE_OBJECT FileObj,
416 * IN PVOID CompRoutine,
417 * IN PVOID Contxt,
418 * IN PTDI_CONNECTION_INFORMATION RequestConnectionInfo,
419 * OUT PTDI_CONNECTION_INFORMATION ReturnConnectionInfo);
420 */
421#define TdiBuildAccept( \
422 Irp, DevObj, FileObj, CompRoutine, Contxt, \
423 RequestConnectionInfo, ReturnConnectionInfo) \
424{ \
425 PTDI_REQUEST_KERNEL_ACCEPT _Request; \
426 PIO_STACK_LOCATION _IrpSp; \
427 \
428 _IrpSp = IoGetNextIrpStackLocation(Irp); \
429 \
430 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
431 Contxt, _IrpSp, TDI_ACCEPT); \
432 \
433 _Request = (PTDI_REQUEST_KERNEL_ACCEPT)&_IrpSp->Parameters; \
434 _Request->RequestConnectionInformation = (RequestConnectionInfo); \
435 _Request->ReturnConnectionInformation = (ReturnConnectionInfo); \
436}
437
438 /*
439 * VOID
440 * TdiBuildAction(
441 * IN PIRP Irp,
442 * IN PDEVICE_OBJECT DevObj,
443 * IN PFILE_OBJECT FileObj,
444 * IN PVOID CompRoutine,
445 * IN PVOID Contxt,
446 * IN PMDL MdlAddr);
447 */
448#define TdiBuildAction( \
449 Irp, DevObj, FileObj, CompRoutine, Contxt, MdlAddr) \
450{ \
451 PIO_STACK_LOCATION _IrpSp; \
452 \
453 _IrpSp = IoGetNextIrpStackLocation(Irp); \
454 \
455 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
456 Contxt, _IrpSp, TDI_ACTION); \
457 \
458 (Irp)->MdlAddress = (MdlAddr); \
459}
460
461 /*
462 * VOID
463 * TdiBuildAssociateAddress(
464 * IN PIRP Irp,
465 * IN PDEVICE_OBJECT DevObj,
466 * IN PFILE_OBJECT FileObj,
467 * IN PVOID CompRoutine,
468 * IN PVOID Contxt,
469 * IN HANDLE AddrHandle);
470 */
471#define TdiBuildAssociateAddress( \
472 Irp, DevObj, FileObj, CompRoutine, Contxt, AddrHandle) \
473{ \
474 PTDI_REQUEST_KERNEL_ASSOCIATE _Request; \
475 PIO_STACK_LOCATION _IrpSp; \
476 \
477 _IrpSp = IoGetNextIrpStackLocation(Irp); \
478 \
479 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
480 Contxt, _IrpSp, TDI_ASSOCIATE_ADDRESS); \
481 \
482 _Request = (PTDI_REQUEST_KERNEL_ASSOCIATE)&_IrpSp->Parameters; \
483 _Request->AddressHandle = (HANDLE)(AddrHandle); \
484}
485
486 /*
487 * VOID
488 * TdiBuildConnect(
489 * IN PIRP Irp,
490 * IN PDEVICE_OBJECT DevObj,
491 * IN PFILE_OBJECT FileObj,
492 * IN PVOID CompRoutine,
493 * IN PVOID Contxt,
494 * IN PLARGE_INTEGER Time,
495 * IN PTDI_CONNECTION_INFORMATION RequestConnectionInfo,
496 * OUT PTDI_CONNECTION_INFORMATION ReturnConnectionInfo);
497 */
498#define TdiBuildConnect( \
499 Irp, DevObj, FileObj, CompRoutine, Contxt, \
500 Time, RequestConnectionInfo, ReturnConnectionInfo) \
501{ \
502 PTDI_REQUEST_KERNEL _Request; \
503 PIO_STACK_LOCATION _IrpSp; \
504 \
505 _IrpSp = IoGetNextIrpStackLocation(Irp); \
506 \
507 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
508 Contxt, _IrpSp, TDI_CONNECT); \
509 \
510 _Request = (PTDI_REQUEST_KERNEL)&_IrpSp->Parameters; \
511 _Request->RequestConnectionInformation = (RequestConnectionInfo); \
512 _Request->ReturnConnectionInformation = (ReturnConnectionInfo); \
513 _Request->RequestSpecific = (PVOID)(Time); \
514}
515
516 /*
517 * VOID
518 * TdiBuildDisassociateAddress(
519 * IN PIRP Irp,
520 * IN PDEVICE_OBJECT DevObj,
521 * IN PFILE_OBJECT FileObj,
522 * IN PVOID CompRoutine,
523 * IN PVOID Contxt);
524 */
525#define TdiBuildDisassociateAddress( \
526 Irp, DevObj, FileObj, CompRoutine, Contxt) \
527{ \
528 PIO_STACK_LOCATION _IrpSp; \
529 \
530 _IrpSp = IoGetNextIrpStackLocation(Irp); \
531 \
532 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
533 Contxt, _IrpSp, TDI_DISASSOCIATE_ADDRESS); \
534}
535
536 /*
537 * VOID
538 * TdiBuildDisconnect(
539 * IN PIRP Irp,
540 * IN PDEVICE_OBJECT DevObj,
541 * IN PFILE_OBJECT FileObj,
542 * IN PVOID CompRoutine,
543 * IN PVOID Contxt,
544 * IN PLARGE_INTEGER Time,
545 * IN PULONG Flags,
546 * IN PTDI_CONNECTION_INFORMATION RequestConnectionInfo,
547 * OUT PTDI_CONNECTION_INFORMATION ReturnConnectionInfo);
548 */
549#define TdiBuildDisconnect( \
550 Irp, DevObj, FileObj, CompRoutine, Contxt, Time, \
551 Flags, RequestConnectionInfo, ReturnConnectionInfo) \
552{ \
553 PTDI_REQUEST_KERNEL _Request; \
554 PIO_STACK_LOCATION _IrpSp; \
555 \
556 _IrpSp = IoGetNextIrpStackLocation(Irp); \
557 \
558 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
559 Contxt, _IrpSp, TDI_DISCONNECT); \
560 \
561 _Request = (PTDI_REQUEST_KERNEL)&_IrpSp->Parameters; \
562 _Request->RequestConnectionInformation = (RequestConnectionInfo); \
563 _Request->ReturnConnectionInformation = (ReturnConnectionInfo); \
564 _Request->RequestSpecific = (PVOID)(Time); \
565 _Request->RequestFlags = (Flags); \
566}
567
568 /*
569 * PIRP
570 * TdiBuildInternalDeviceControlIrp(
571 * IN CCHAR IrpSubFunction,
572 * IN PDEVICE_OBJECT DeviceObject,
573 * IN PFILE_OBJECT FileObject,
574 * IN PKEVENT Event,
575 * IN PIO_STATUS_BLOCK IoStatusBlock);
576 */
577#define TdiBuildInternalDeviceControlIrp( \
578 IrpSubFunction, DeviceObject, \
579 FileObject, Event, IoStatusBlock) \
580 IoBuildDeviceIoControlRequest( \
581 0x00000003, DeviceObject, \
582 NULL, 0, NULL, 0, \
583 TRUE, Event, IoStatusBlock)
584
585 /*
586 * VOID
587 * TdiBuildListen(
588 * IN PIRP Irp,
589 * IN PDEVICE_OBJECT DevObj,
590 * IN PFILE_OBJECT FileObj,
591 * IN PVOID CompRoutine,
592 * IN PVOID Contxt,
593 * IN ULONG Flags,
594 * IN PTDI_CONNECTION_INFORMATION RequestConnectionInfo,
595 * OUT PTDI_CONNECTION_INFORMATION ReturnConnectionInfo);
596 */
597#define TdiBuildListen( \
598 Irp, DevObj, FileObj, CompRoutine, Contxt, \
599 Flags, RequestConnectionInfo, ReturnConnectionInfo) \
600{ \
601 PTDI_REQUEST_KERNEL _Request; \
602 PIO_STACK_LOCATION _IrpSp; \
603 \
604 _IrpSp = IoGetNextIrpStackLocation(Irp); \
605 \
606 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
607 Contxt, _IrpSp, TDI_LISTEN); \
608 \
609 _Request = (PTDI_REQUEST_KERNEL)&_IrpSp->Parameters; \
610 _Request->RequestConnectionInformation = (RequestConnectionInfo); \
611 _Request->ReturnConnectionInformation = (ReturnConnectionInfo); \
612 _Request->RequestFlags = (Flags); \
613}
614
615TDIKRNLAPI
616VOID
617DDKAPI
618TdiBuildNetbiosAddress(
619 /*IN*/ PUCHAR NetbiosName,
620 /*IN*/ BOOLEAN IsGroupName,
621 /*IN OUT*/ PTA_NETBIOS_ADDRESS NetworkName);
622
623TDIKRNLAPI
624NTSTATUS
625DDKAPI
626TdiBuildNetbiosAddressEa(
627 /*IN*/ PUCHAR Buffer,
628 /*IN*/ BOOLEAN IsGroupName,
629 /*IN*/ PUCHAR NetbiosName);
630
631 /*
632 * VOID
633 * TdiBuildQueryInformation(
634 * IN PIRP Irp,
635 * IN PDEVICE_OBJECT DevObj,
636 * IN PFILE_OBJECT FileObj,
637 * IN PVOID CompRoutine,
638 * IN PVOID Contxt,
639 * IN UINT QType,
640 * IN PMDL MdlAddr);
641 */
642#define TdiBuildQueryInformation( \
643 Irp, DevObj, FileObj, CompRoutine, Contxt, QType, MdlAddr) \
644{ \
645 PTDI_REQUEST_KERNEL_QUERY_INFORMATION _Request; \
646 PIO_STACK_LOCATION _IrpSp; \
647 \
648 _IrpSp = IoGetNextIrpStackLocation(Irp); \
649 \
650 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
651 Contxt, _IrpSp, TDI_QUERY_INFORMATION); \
652 \
653 _Request = (PTDI_REQUEST_KERNEL_QUERY_INFORMATION)&_IrpSp->Parameters; \
654 _Request->RequestConnectionInformation = NULL; \
655 _Request->QueryType = (ULONG)(QType); \
656 (Irp)->MdlAddress = (MdlAddr); \
657}
658
659 /*
660 * VOID
661 * TdiBuildReceive(
662 * IN PIRP Irp,
663 * IN PDEVICE_OBJECT DevObj,
664 * IN PFILE_OBJECT FileObj,
665 * IN PVOID CompRoutine,
666 * IN PVOID Contxt,
667 * IN PMDL MdlAddr,
668 * IN ULONG InFlags,
669 * IN ULONG ReceiveLen);
670 */
671#define TdiBuildReceive( \
672 Irp, DevObj, FileObj, CompRoutine, Contxt, \
673 MdlAddr, InFlags, ReceiveLen) \
674{ \
675 PTDI_REQUEST_KERNEL_RECEIVE _Request; \
676 PIO_STACK_LOCATION _IrpSp; \
677 \
678 _IrpSp = IoGetNextIrpStackLocation(Irp); \
679 \
680 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
681 Contxt, _IrpSp, TDI_RECEIVE); \
682 \
683 _Request = (PTDI_REQUEST_KERNEL_RECEIVE)&_IrpSp->Parameters; \
684 _Request->ReceiveFlags = (InFlags); \
685 _Request->ReceiveLength = (ReceiveLen); \
686 (Irp)->MdlAddress = (MdlAddr); \
687}
688
689 /*
690 * VOID
691 * TdiBuildReceiveDatagram(
692 * IN PIRP Irp,
693 * IN PDEVICE_OBJECT DevObj,
694 * IN PFILE_OBJECT FileObj,
695 * IN PVOID CompRoutine,
696 * IN PVOID Contxt,
697 * IN PMDL MdlAddr,
698 * IN ULONG ReceiveLen,
699 * IN PTDI_CONNECTION_INFORMATION ReceiveDatagramInfo,
700 * OUT PTDI_CONNECTION_INFORMATION ReturnInfo,
701 * ULONG InFlags);
702 */
703#define TdiBuildReceiveDatagram( \
704 Irp, DevObj, FileObj, CompRoutine, Contxt, MdlAddr, \
705 ReceiveLen, ReceiveDatagramInfo, ReturnInfo, InFlags) \
706{ \
707 PTDI_REQUEST_KERNEL_RECEIVEDG _Request; \
708 PIO_STACK_LOCATION _IrpSp; \
709 \
710 _IrpSp = IoGetNextIrpStackLocation(Irp); \
711 \
712 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
713 Contxt, _IrpSp, TDI_RECEIVE_DATAGRAM); \
714 \
715 _Request = (PTDI_REQUEST_KERNEL_RECEIVEDG)&_IrpSp->Parameters; \
716 _Request->ReceiveDatagramInformation = (ReceiveDatagramInfo); \
717 _Request->ReturnDatagramInformation = (ReturnInfo); \
718 _Request->ReceiveLength = (ReceiveLen); \
719 _Request->ReceiveFlags = (InFlags); \
720 (Irp)->MdlAddress = (MdlAddr); \
721}
722
723 /*
724 * VOID
725 * TdiBuildSend(
726 * IN PIRP Irp,
727 * IN PDEVICE_OBJECT DevObj,
728 * IN PFILE_OBJECT FileObj,
729 * IN PVOID CompRoutine,
730 * IN PVOID Contxt,
731 * IN PMDL MdlAddr,
732 * IN ULONG InFlags,
733 * IN ULONG SendLen);
734 */
735#define TdiBuildSend( \
736 Irp, DevObj, FileObj, CompRoutine, Contxt, \
737 MdlAddr, InFlags, SendLen) \
738{ \
739 PTDI_REQUEST_KERNEL_SEND _Request; \
740 PIO_STACK_LOCATION _IrpSp; \
741 \
742 _IrpSp = IoGetNextIrpStackLocation(Irp); \
743 \
744 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
745 Contxt, _IrpSp, TDI_SEND); \
746 \
747 _Request = (PTDI_REQUEST_KERNEL_SEND)&_IrpSp->Parameters; \
748 _Request->SendFlags = (InFlags); \
749 _Request->SendLength = (SendLen); \
750 (Irp)->MdlAddress = (MdlAddr); \
751}
752
753 /*
754 * VOID
755 * TdiBuildSendDatagram(
756 * IN PIRP Irp,
757 * IN PDEVICE_OBJECT DevObj,
758 * IN PFILE_OBJECT FileObj,
759 * IN PVOID CompRoutine,
760 * IN PVOID Contxt,
761 * IN PMDL MdlAddr,
762 * IN ULONG SendLen,
763 * IN PTDI_CONNECTION_INFORMATION SendDatagramInfo);
764 */
765#define TdiBuildSendDatagram( \
766 Irp, DevObj, FileObj, CompRoutine, Contxt, \
767 MdlAddr, SendLen, SendDatagramInfo) \
768{ \
769 PTDI_REQUEST_KERNEL_SENDDG _Request; \
770 PIO_STACK_LOCATION _IrpSp; \
771 \
772 _IrpSp = IoGetNextIrpStackLocation(Irp); \
773 \
774 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
775 Contxt, _IrpSp, TDI_SEND_DATAGRAM); \
776 \
777 _Request = (PTDI_REQUEST_KERNEL_SENDDG)&_IrpSp->Parameters; \
778 _Request->SendDatagramInformation = (SendDatagramInfo); \
779 _Request->SendLength = (SendLen); \
780 (Irp)->MdlAddress = (MdlAddr); \
781}
782
783 /*
784 * VOID
785 * TdiBuildSetEventHandler(
786 * IN PIRP Irp,
787 * IN PDEVICE_OBJECT DevObj,
788 * IN PFILE_OBJECT FileObj,
789 * IN PVOID CompRoutine,
790 * IN PVOID Contxt,
791 * IN INT InEventType,
792 * IN PVOID InEventHandler,
793 * IN PVOID InEventContext);
794 */
795#define TdiBuildSetEventHandler( \
796 Irp, DevObj, FileObj, CompRoutine, Contxt, \
797 InEventType, InEventHandler, InEventContext) \
798{ \
799 PTDI_REQUEST_KERNEL_SET_EVENT _Request; \
800 PIO_STACK_LOCATION _IrpSp; \
801 \
802 _IrpSp = IoGetNextIrpStackLocation(Irp); \
803 \
804 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
805 Contxt, _IrpSp, TDI_SET_EVENT_HANDLER); \
806 \
807 _Request = (PTDI_REQUEST_KERNEL_SET_EVENT)&_IrpSp->Parameters; \
808 _Request->EventType = (InEventType); \
809 _Request->EventHandler = (PVOID)(InEventHandler); \
810 _Request->EventContext = (PVOID)(InEventContext); \
811}
812
813 /*
814 * VOID
815 * TdiBuildSetInformation(
816 * IN PIRP Irp,
817 * IN PDEVICE_OBJECT DevObj,
818 * IN PFILE_OBJECT FileObj,
819 * IN PVOID CompRoutine,
820 * IN PVOID Contxt,
821 * IN UINT SType,
822 * IN PMDL MdlAddr);
823 */
824#define TdiBuildSetInformation( \
825 Irp, DevObj, FileObj, CompRoutine, Contxt, SType, MdlAddr) \
826{ \
827 PTDI_REQUEST_KERNEL_SET_INFORMATION _Request; \
828 PIO_STACK_LOCATION _IrpSp; \
829 \
830 _IrpSp = IoGetNextIrpStackLocation(Irp); \
831 \
832 TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
833 Contxt, _IrpSp, TDI_SET_INFORMATION); \
834 \
835 _Request = (PTDI_REQUEST_KERNEL_SET_INFORMATION)&_IrpSp->Parameters; \
836 _Request->RequestConnectionInformation = NULL; \
837 _Request->SetType = (ULONG)(SType); \
838 (Irp)->MdlAddress = (MdlAddr); \
839}
840
841 /* TDI20_CLIENT_INTERFACE_INFO.TdiVersion constants */
842#define TDI_CURRENT_MAJOR_VERSION 2
843#define TDI_CURRENT_MINOR_VERSION 0
844
845#define TDI_CURRENT_VERSION ((TDI_CURRENT_MINOR_VERSION) << 8 \
846 | (TDI_CURRENT_MAJOR_VERSION))
847
848#define TDI_VERSION_ONE 0x0001
849
850typedef enum _TDI_PNP_OPCODE {
851 TDI_PNP_OP_MIN,
852 TDI_PNP_OP_ADD,
853 TDI_PNP_OP_DEL,
854 TDI_PNP_OP_UPDATE,
855 TDI_PNP_OP_PROVIDERREADY,
856 TDI_PNP_OP_NETREADY,
857 TDI_PNP_OP_ADD_IGNORE_BINDING,
858 TDI_PNP_OP_DELETE_IGNORE_BINDING,
859 TDI_PNP_OP_MAX
860} TDI_PNP_OPCODE;
861
862 /* TDI_PNP_CONTEXT.ContextType */
863#define TDI_PNP_CONTEXT_TYPE_IF_NAME 0x1
864#define TDI_PNP_CONTEXT_TYPE_IF_ADDR 0x2
865#define TDI_PNP_CONTEXT_TYPE_PDO 0x3
866#define TDI_PNP_CONTEXT_TYPE_FIRST_OR_LAST_IF 0x4
867
868typedef struct _TDI_PNP_CONTEXT {
869 USHORT ContextSize;
870 USHORT ContextType;
871 UCHAR ContextData[1];
872} TDI_PNP_CONTEXT, *PTDI_PNP_CONTEXT;
873
874typedef VOID DDKAPI
875(*TDI_ADD_ADDRESS_HANDLER)(
876 /*IN*/ PTA_ADDRESS Address);
877
878typedef VOID DDKAPI
879(*TDI_ADD_ADDRESS_HANDLER_V2)(
880 /*IN*/ PTA_ADDRESS Address,
881 /*IN*/ PUNICODE_STRING DeviceName,
882 /*IN*/ PTDI_PNP_CONTEXT Context);
883
884typedef VOID DDKAPI
885(*TDI_BINDING_HANDLER)(
886 /*IN*/ TDI_PNP_OPCODE PnPOpcode,
887 /*IN*/ PUNICODE_STRING DeviceName,
888 /*IN*/ PWSTR MultiSZBindList);
889
890typedef VOID DDKAPI
891(*TDI_BIND_HANDLER)(
892 /*IN*/ PUNICODE_STRING DeviceName);
893
894typedef VOID DDKAPI
895(*TDI_DEL_ADDRESS_HANDLER)(
896 /*IN*/ PTA_ADDRESS Address);
897
898typedef VOID DDKAPI
899(*TDI_DEL_ADDRESS_HANDLER_V2)(
900 /*IN*/ PTA_ADDRESS Address,
901 /*IN*/ PUNICODE_STRING DeviceName,
902 /*IN*/ PTDI_PNP_CONTEXT Context);
903
904typedef NTSTATUS DDKAPI
905(*TDI_PNP_POWER_HANDLER)(
906 /*IN*/ PUNICODE_STRING DeviceName,
907 /*IN*/ PNET_PNP_EVENT PowerEvent,
908 /*IN*/ PTDI_PNP_CONTEXT Context1,
909 /*IN*/ PTDI_PNP_CONTEXT Context2);
910
911typedef VOID DDKAPI
912(*TDI_UNBIND_HANDLER)(
913 /*IN*/ PUNICODE_STRING DeviceName);
914
915typedef VOID DDKAPI
916(*ProviderPnPPowerComplete)(
917 /*IN*/ PNET_PNP_EVENT NetEvent,
918 /*IN*/ NTSTATUS ProviderStatus);
919
920typedef struct _TDI20_CLIENT_INTERFACE_INFO {
921 _ANONYMOUS_UNION union {
922 _ANONYMOUS_STRUCT struct {
923 UCHAR MajorTdiVersion;
924 UCHAR MinorTdiVersion;
925 } DUMMYSTRUCTNAME;
926 USHORT TdiVersion;
927 } DUMMYUNIONNAME;
928 USHORT Unused;
929 PUNICODE_STRING ClientName;
930 TDI_PNP_POWER_HANDLER PnPPowerHandler;
931 _ANONYMOUS_UNION union {
932 TDI_BINDING_HANDLER BindingHandler;
933 _ANONYMOUS_STRUCT struct {
934 TDI_BIND_HANDLER BindHandler;
935 TDI_UNBIND_HANDLER UnBindHandler;
936 } DUMMYSTRUCTNAME;
937 }DUMMYUNIONNAME2;
938 _ANONYMOUS_UNION union {
939 _ANONYMOUS_STRUCT struct {
940 TDI_ADD_ADDRESS_HANDLER_V2 AddAddressHandlerV2;
941 TDI_DEL_ADDRESS_HANDLER_V2 DelAddressHandlerV2;
942 } DUMMYSTRUCTNAME;
943 _ANONYMOUS_STRUCT struct {
944 TDI_ADD_ADDRESS_HANDLER AddAddressHandler;
945 TDI_DEL_ADDRESS_HANDLER DelAddressHandler;
946 } DUMMYSTRUCTNAME2;
947 } DUMMYUNIONNAME3;
948} TDI20_CLIENT_INTERFACE_INFO, *PTDI20_CLIENT_INTERFACE_INFO;
949
950typedef TDI20_CLIENT_INTERFACE_INFO TDI_CLIENT_INTERFACE_INFO;
951typedef TDI_CLIENT_INTERFACE_INFO *PTDI_CLIENT_INTERFACE_INFO;
952
953
954 /* TDI functions */
955
956 /*
957 * VOID
958 * TdiCompleteRequest(
959 * IN PIRP Irp,
960 * IN NTSTATUS Status);
961 */
962#define TdiCompleteRequest(Irp, Status) \
963{ \
964 (Irp)->IoStatus.Status = (Status); \
965 IoCompleteRequest((Irp), IO_NETWORK_INCREMENT); \
966}
967
968TDIKRNLAPI
969NTSTATUS
970DDKAPI
971TdiCopyBufferToMdl(
972 /*IN*/ PVOID SourceBuffer,
973 /*IN*/ ULONG SourceOffset,
974 /*IN*/ ULONG SourceBytesToCopy,
975 /*IN*/ PMDL DestinationMdlChain,
976 /*IN*/ ULONG DestinationOffset,
977 /*IN*/ PULONG BytesCopied);
978
979 /*
980 * VOID
981 * TdiCopyLookaheadData(
982 * IN PVOID Destination,
983 * IN PVOID Source,
984 * IN ULONG Length,
985 * IN ULONG ReceiveFlags);
986 */
987#define TdiCopyLookaheadData(Destination, Source, Length, ReceiveFlags) \
988 RtlCopyMemory(Destination, Source, Length)
989
990TDIKRNLAPI
991NTSTATUS
992DDKAPI
993TdiCopyMdlChainToMdlChain (
994 /*IN*/ PMDL SourceMdlChain,
995 /*IN*/ ULONG SourceOffset,
996 /*IN*/ PMDL DestinationMdlChain,
997 /*IN*/ ULONG DestinationOffset,
998 /*OUT*/ PULONG BytesCopied);
999
1000TDIKRNLAPI
1001NTSTATUS
1002DDKAPI
1003TdiCopyMdlToBuffer(
1004 /*IN*/ PMDL SourceMdlChain,
1005 /*IN*/ ULONG SourceOffset,
1006 /*IN*/ PVOID DestinationBuffer,
1007 /*IN*/ ULONG DestinationOffset,
1008 /*IN*/ ULONG DestinationBufferSize,
1009 /*OUT*/ PULONG BytesCopied);
1010
1011TDIKRNLAPI
1012NTSTATUS
1013DDKAPI
1014TdiDeregisterAddressChangeHandler(
1015 /*IN*/ HANDLE BindingHandle);
1016
1017TDIKRNLAPI
1018NTSTATUS
1019DDKAPI
1020TdiDeregisterDeviceObject(
1021 /*IN*/ HANDLE DevRegistrationHandle);
1022
1023TDIKRNLAPI
1024NTSTATUS
1025DDKAPI
1026TdiDeregisterNetAddress(
1027 /*IN*/ HANDLE AddrRegistrationHandle);
1028
1029TDIKRNLAPI
1030NTSTATUS
1031DDKAPI
1032TdiDeregisterPnPHandlers(
1033 /*IN*/ HANDLE BindingHandle);
1034
1035TDIKRNLAPI
1036NTSTATUS
1037DDKAPI
1038TdiDeregisterProvider(
1039 /*IN*/ HANDLE ProviderHandle);
1040
1041TDIKRNLAPI
1042NTSTATUS
1043DDKAPI
1044TdiEnumerateAddresses(
1045 /*IN*/ HANDLE BindingHandle);
1046
1047TDIKRNLAPI
1048VOID
1049DDKAPI
1050TdiInitialize(
1051 VOID);
1052
1053TDIKRNLAPI
1054VOID
1055DDKAPI
1056TdiMapBuffer(
1057 /*IN*/ PMDL MdlChain);
1058
1059TDIKRNLAPI
1060NTSTATUS
1061DDKAPI
1062TdiMapUserRequest(
1063 /*IN*/ PDEVICE_OBJECT DeviceObject,
1064 /*IN*/ PIRP Irp,
1065 /*IN*/ PIO_STACK_LOCATION IrpSp);
1066
1067TDIKRNLAPI
1068BOOLEAN
1069DDKAPI
1070TdiMatchPdoWithChainedReceiveContext(
1071 /*IN*/ PVOID TsduDescriptor,
1072 /*IN*/ PVOID PDO);
1073
1074TDIKRNLAPI
1075VOID
1076DDKAPI
1077TdiPnPPowerComplete(
1078 /*IN*/ HANDLE BindingHandle,
1079 /*IN*/ PNET_PNP_EVENT PowerEvent,
1080 /*IN*/ NTSTATUS Status);
1081
1082TDIKRNLAPI
1083NTSTATUS
1084DDKAPI
1085TdiPnPPowerRequest(
1086 /*IN*/ PUNICODE_STRING DeviceName,
1087 /*IN*/ PNET_PNP_EVENT PowerEvent,
1088 /*IN*/ PTDI_PNP_CONTEXT Context1,
1089 /*IN*/ PTDI_PNP_CONTEXT Context2,
1090 /*IN*/ ProviderPnPPowerComplete ProtocolCompletionHandler);
1091
1092TDIKRNLAPI
1093NTSTATUS
1094DDKAPI
1095TdiProviderReady(
1096 /*IN*/ HANDLE ProviderHandle);
1097
1098TDIKRNLAPI
1099NTSTATUS
1100DDKAPI
1101TdiRegisterAddressChangeHandler(
1102 /*IN*/ TDI_ADD_ADDRESS_HANDLER AddHandler,
1103 /*IN*/ TDI_DEL_ADDRESS_HANDLER DeleteHandler,
1104 /*OUT*/ HANDLE *BindingHandle);
1105
1106TDIKRNLAPI
1107NTSTATUS
1108DDKAPI
1109TdiRegisterDeviceObject(
1110 /*IN*/ PUNICODE_STRING DeviceName,
1111 /*OUT*/ HANDLE *DevRegistrationHandle);
1112
1113TDIKRNLAPI
1114NTSTATUS
1115DDKAPI
1116TdiRegisterNetAddress(
1117 /*IN*/ PTA_ADDRESS Address,
1118 /*IN*/ PUNICODE_STRING DeviceName,
1119 /*IN*/ PTDI_PNP_CONTEXT Context,
1120 /*OUT*/ HANDLE *AddrRegistrationHandle);
1121
1122TDIKRNLAPI
1123NTSTATUS
1124DDKAPI
1125TdiRegisterNotificationHandler(
1126 /*IN*/ TDI_BIND_HANDLER BindHandler,
1127 /*IN*/ TDI_UNBIND_HANDLER UnbindHandler,
1128 /*OUT*/ HANDLE *BindingHandle);
1129
1130TDIKRNLAPI
1131NTSTATUS
1132DDKAPI
1133TdiRegisterPnPHandlers(
1134 /*IN*/ PTDI_CLIENT_INTERFACE_INFO ClientInterfaceInfo,
1135 /*IN*/ ULONG InterfaceInfoSize,
1136 /*OUT*/ HANDLE *BindingHandle);
1137
1138TDIKRNLAPI
1139NTSTATUS
1140DDKAPI
1141TdiRegisterProvider(
1142 /*IN*/ PUNICODE_STRING ProviderName,
1143 /*OUT*/ HANDLE *ProviderHandle);
1144
1145TDIKRNLAPI
1146VOID
1147DDKAPI
1148TdiReturnChainedReceives(
1149 /*IN*/ PVOID *TsduDescriptors,
1150 /*IN*/ ULONG NumberOfTsdus);
1151
1152TDIKRNLAPI
1153VOID
1154DDKAPI
1155TdiUnmapBuffer(
1156 /*IN*/ PMDL MdlChain);
1157
1158#ifdef __cplusplus
1159}
1160#endif
1161
1162#endif /* __TDIKRNL_H */
Note: See TracBrowser for help on using the repository browser.