summaryrefslogtreecommitdiffstats
path: root/public/sdk/inc/ntddnetd.h
blob: 0b09b5b27c6c154a9be0b59b5e2ea84eb8937800 (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
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
/*++

Copyright (c) 1992  Microsoft Corporation

Module Name:

    ntddnetd.h

Abstract:

    Header file for Netcard Detection DLLs

Author:

    Sean Selitrennikoff (SeanSe) December 1992

Revision History:

--*/



//
// Routines for Detection DLLs.
//


NTSTATUS
DetectCheckPortUsage(
    IN  INTERFACE_TYPE InterfaceType,
    IN  ULONG BusNumber,
    IN  ULONG Port,
    IN  ULONG Length
    );

NTSTATUS
DetectReadPortUchar(
    IN  INTERFACE_TYPE InterfaceType,
    IN  ULONG BusNumber,
    IN  ULONG Port,
    OUT PUCHAR Value
    );

NTSTATUS
DetectReadPortUshort(
    IN  INTERFACE_TYPE InterfaceType,
    IN  ULONG BusNumber,
    IN  ULONG Port,
    OUT PUSHORT Value
    );

NTSTATUS
DetectReadPortUlong(
    IN  INTERFACE_TYPE InterfaceType,
    IN  ULONG BusNumber,
    IN  ULONG Port,
    OUT PULONG Value
    );

NTSTATUS
DetectWritePortUchar(
    IN  INTERFACE_TYPE InterfaceType,
    IN  ULONG BusNumber,
    IN  ULONG Port,
    IN  UCHAR Value
    );

NTSTATUS
DetectWritePortUshort(
    IN  INTERFACE_TYPE InterfaceType,
    IN  ULONG BusNumber,
    IN  ULONG Port,
    IN  USHORT Value
    );

NTSTATUS
DetectWritePortUlong(
    IN  INTERFACE_TYPE InterfaceType,
    IN  ULONG BusNumber,
    IN  ULONG Port,
    IN  ULONG Value
    );

NTSTATUS
DetectCheckMemoryUsage(
    IN  INTERFACE_TYPE InterfaceType,
    IN  ULONG BusNumber,
    IN  ULONG BaseAddress,
    IN  ULONG Length
    );

NTSTATUS
DetectReadMappedMemory(
    IN  INTERFACE_TYPE InterfaceType,
    IN  ULONG BusNumber,
    IN  ULONG BaseAddress,
    IN  ULONG Length,
    OUT PVOID Data
    );

NTSTATUS
DetectWriteMappedMemory(
    IN  INTERFACE_TYPE InterfaceType,
    IN  ULONG BusNumber,
    IN  ULONG BaseAddress,
    IN  ULONG Length,
    IN  PVOID Data
    );

NTSTATUS
DetectReadPciSlotInformation(
    IN  ULONG BusNumber,
    IN  ULONG SlotNumber,
    IN  ULONG Offset,
    IN  ULONG Length,
    OUT PVOID Data
    );

NTSTATUS
DetectWritePciSlotInformation(
    IN  ULONG BusNumber,
    IN  ULONG SlotNumber,
    IN  ULONG Offset,
    IN  ULONG Length,
    IN  PVOID Data
    );

NTSTATUS
DetectSetInterruptTrap(
    IN  INTERFACE_TYPE InterfaceType,
    IN  ULONG BusNumber,
    OUT PHANDLE TrapHandle,
    IN  UCHAR InterruptList[],
    IN  ULONG InterruptListLength
    );

NTSTATUS
DetectQueryInterruptTrap(
    IN  HANDLE TrapHandle,
    OUT UCHAR InterruptList[],
    IN  ULONG InterruptListLength
    );

NTSTATUS
DetectRemoveInterruptTrap(
    IN  HANDLE TrapHandle
    );

NTSTATUS
DetectClaimResource(
    IN  ULONG NumberOfResources,
    IN  PVOID Data
    );




//
// Resource information for Detection DLLs
//

#define NETDTECT_IRQ_RESOURCE    1
#define NETDTECT_MEMORY_RESOURCE 2
#define NETDTECT_PORT_RESOURCE   3
#define NETDTECT_DMA_RESOURCE    4

#define NETDTECT_IRQ_RESOURCE_LEVEL_SENSITIVE CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE
#define NETDTECT_IRQ_RESOURCE_LATCHED CM_RESOURCE_INTERRUPT_LATCHED

typedef struct _NETDTECT_RESOURCE {

    INTERFACE_TYPE InterfaceType;
    ULONG BusNumber;
    ULONG Type;
    ULONG Value;
    ULONG Length;
    ULONG Flags;

} NETDTECT_RESOURCE, *PNETDTECT_RESOURCE;



NTSTATUS
DetectTemporaryClaimResource(
    IN  PNETDTECT_RESOURCE Resource
    );

NTSTATUS
DetectFreeTemporaryResources(
    );

NTSTATUS
DetectFreeSpecificTemporaryResource(
	IN	PNETDTECT_RESOURCE	Resource
	);