[1046] | 1 | /*
|
---|
| 2 | * tdi.h
|
---|
| 3 | *
|
---|
| 4 | * TDI user 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 __TDI_H
|
---|
| 24 | #define __TDI_H
|
---|
| 25 |
|
---|
| 26 | #if __GNUC__ >=3
|
---|
| 27 | #pragma GCC system_header
|
---|
| 28 | #endif
|
---|
| 29 |
|
---|
| 30 | #ifdef __cplusplus
|
---|
| 31 | extern "C" {
|
---|
| 32 | #endif
|
---|
| 33 |
|
---|
| 34 | #include "ntddk.h"
|
---|
| 35 | #include "ntddtdi.h"
|
---|
| 36 | #include "tdistat.h"
|
---|
| 37 | #include "netpnp.h"
|
---|
| 38 |
|
---|
| 39 | /* Basic types */
|
---|
| 40 |
|
---|
| 41 | typedef LONG TDI_STATUS;
|
---|
| 42 | typedef PVOID CONNECTION_CONTEXT;
|
---|
| 43 |
|
---|
| 44 | typedef struct _TDI_CONNECTION_INFORMATION {
|
---|
| 45 | LONG UserDataLength;
|
---|
| 46 | PVOID UserData;
|
---|
| 47 | LONG OptionsLength;
|
---|
| 48 | PVOID Options;
|
---|
| 49 | LONG RemoteAddressLength;
|
---|
| 50 | PVOID RemoteAddress;
|
---|
| 51 | } TDI_CONNECTION_INFORMATION, *PTDI_CONNECTION_INFORMATION;
|
---|
| 52 |
|
---|
| 53 | typedef struct _TDI_REQUEST {
|
---|
| 54 | union {
|
---|
| 55 | HANDLE AddressHandle;
|
---|
| 56 | CONNECTION_CONTEXT ConnectionContext;
|
---|
| 57 | HANDLE ControlChannel;
|
---|
| 58 | } Handle;
|
---|
| 59 | PVOID RequestNotifyObject;
|
---|
| 60 | PVOID RequestContext;
|
---|
| 61 | TDI_STATUS TdiStatus;
|
---|
| 62 | } TDI_REQUEST, *PTDI_REQUEST;
|
---|
| 63 |
|
---|
| 64 | typedef struct _TDI_REQUEST_STATUS {
|
---|
| 65 | TDI_STATUS Status;
|
---|
| 66 | PVOID RequestContext;
|
---|
| 67 | ULONG BytesTransferred;
|
---|
| 68 | } TDI_REQUEST_STATUS, *PTDI_REQUEST_STATUS;
|
---|
| 69 |
|
---|
| 70 | typedef struct _TDI_CONNECT_REQUEST {
|
---|
| 71 | TDI_REQUEST Request;
|
---|
| 72 | PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
---|
| 73 | PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
|
---|
| 74 | LARGE_INTEGER Timeout;
|
---|
| 75 | } TDI_REQUEST_CONNECT, *PTDI_REQUEST_CONNECT;
|
---|
| 76 |
|
---|
| 77 | typedef struct _TDI_REQUEST_ACCEPT {
|
---|
| 78 | TDI_REQUEST Request;
|
---|
| 79 | PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
---|
| 80 | PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
|
---|
| 81 | } TDI_REQUEST_ACCEPT, *PTDI_REQUEST_ACCEPT;
|
---|
| 82 |
|
---|
| 83 | typedef struct _TDI_REQUEST_LISTEN {
|
---|
| 84 | TDI_REQUEST Request;
|
---|
| 85 | PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
---|
| 86 | PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
|
---|
| 87 | USHORT ListenFlags;
|
---|
| 88 | } TDI_REQUEST_LISTEN, *PTDI_REQUEST_LISTEN;
|
---|
| 89 |
|
---|
| 90 | typedef struct _TDI_DISCONNECT_REQUEST {
|
---|
| 91 | TDI_REQUEST Request;
|
---|
| 92 | LARGE_INTEGER Timeout;
|
---|
| 93 | } TDI_REQUEST_DISCONNECT, *PTDI_REQUEST_DISCONNECT;
|
---|
| 94 |
|
---|
| 95 | typedef struct _TDI_REQUEST_SEND {
|
---|
| 96 | TDI_REQUEST Request;
|
---|
| 97 | USHORT SendFlags;
|
---|
| 98 | } TDI_REQUEST_SEND, *PTDI_REQUEST_SEND;
|
---|
| 99 |
|
---|
| 100 | typedef struct _TDI_REQUEST_RECEIVE {
|
---|
| 101 | TDI_REQUEST Request;
|
---|
| 102 | USHORT ReceiveFlags;
|
---|
| 103 | } TDI_REQUEST_RECEIVE, *PTDI_REQUEST_RECEIVE;
|
---|
| 104 |
|
---|
| 105 | typedef struct _TDI_REQUEST_SEND_DATAGRAM {
|
---|
| 106 | TDI_REQUEST Request;
|
---|
| 107 | PTDI_CONNECTION_INFORMATION SendDatagramInformation;
|
---|
| 108 | } TDI_REQUEST_SEND_DATAGRAM, *PTDI_REQUEST_SEND_DATAGRAM;
|
---|
| 109 |
|
---|
| 110 | typedef struct _TDI_REQUEST_RECEIVE_DATAGRAM {
|
---|
| 111 | TDI_REQUEST Request;
|
---|
| 112 | PTDI_CONNECTION_INFORMATION ReceiveDatagramInformation;
|
---|
| 113 | PTDI_CONNECTION_INFORMATION ReturnInformation;
|
---|
| 114 | USHORT ReceiveFlags;
|
---|
| 115 | } TDI_REQUEST_RECEIVE_DATAGRAM, *PTDI_REQUEST_RECEIVE_DATAGRAM;
|
---|
| 116 |
|
---|
| 117 | typedef struct _TDI_REQUEST_SET_EVENT {
|
---|
| 118 | TDI_REQUEST Request;
|
---|
| 119 | LONG EventType;
|
---|
| 120 | PVOID EventHandler;
|
---|
| 121 | PVOID EventContext;
|
---|
| 122 | } TDI_REQUEST_SET_EVENT_HANDLER, *PTDI_REQUEST_SET_EVENT_HANDLER;
|
---|
| 123 |
|
---|
| 124 | #define TDI_RECEIVE_BROADCAST 0x00000004
|
---|
| 125 | #define TDI_RECEIVE_MULTICAST 0x00000008
|
---|
| 126 | #define TDI_RECEIVE_PARTIAL 0x00000010
|
---|
| 127 | #define TDI_RECEIVE_NORMAL 0x00000020
|
---|
| 128 | #define TDI_RECEIVE_EXPEDITED 0x00000040
|
---|
| 129 | #define TDI_RECEIVE_PEEK 0x00000080
|
---|
| 130 | #define TDI_RECEIVE_NO_RESPONSE_EXP 0x00000100
|
---|
| 131 | #define TDI_RECEIVE_COPY_LOOKAHEAD 0x00000200
|
---|
| 132 | #define TDI_RECEIVE_ENTIRE_MESSAGE 0x00000400
|
---|
| 133 | #define TDI_RECEIVE_AT_DISPATCH_LEVEL 0x00000800
|
---|
| 134 | #define TDI_RECEIVE_CONTROL_INFO 0x00001000
|
---|
| 135 |
|
---|
| 136 | /* Listen flags */
|
---|
| 137 | #define TDI_QUERY_ACCEPT 0x00000001
|
---|
| 138 |
|
---|
| 139 | /* Options used for both SendOptions and ReceiveIndicators */
|
---|
| 140 | #define TDI_SEND_EXPEDITED 0x0020
|
---|
| 141 | #define TDI_SEND_PARTIAL 0x0040
|
---|
| 142 | #define TDI_SEND_NO_RESPONSE_EXPECTED 0x0080
|
---|
| 143 | #define TDI_SEND_NON_BLOCKING 0x0100
|
---|
| 144 | #define TDI_SEND_AND_DISCONNECT 0x0200
|
---|
| 145 |
|
---|
| 146 | /* Disconnect Flags */
|
---|
| 147 | #define TDI_DISCONNECT_WAIT 0x0001
|
---|
| 148 | #define TDI_DISCONNECT_ABORT 0x0002
|
---|
| 149 | #define TDI_DISCONNECT_RELEASE 0x0004
|
---|
| 150 |
|
---|
| 151 | /* TdiRequest structure for TdiQueryInformation request */
|
---|
| 152 | typedef struct _TDI_REQUEST_QUERY_INFORMATION {
|
---|
| 153 | TDI_REQUEST Request;
|
---|
| 154 | ULONG QueryType;
|
---|
| 155 | PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
---|
| 156 | } TDI_REQUEST_QUERY_INFORMATION, *PTDI_REQUEST_QUERY_INFORMATION;
|
---|
| 157 |
|
---|
| 158 | /* TdiRequest structure for TdiSetInformation request */
|
---|
| 159 | typedef struct _TDI_REQUEST_SET_INFORMATION {
|
---|
| 160 | TDI_REQUEST Request;
|
---|
| 161 | ULONG SetType;
|
---|
| 162 | PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
---|
| 163 | } TDI_REQUEST_SET_INFORMATION, *PTDI_REQUEST_SET_INFORMATION;
|
---|
| 164 |
|
---|
| 165 | typedef TDI_REQUEST_SET_INFORMATION TDI_REQ_SET_INFORMATION, *PTDI_REQ_SET_INFORMATION;
|
---|
| 166 |
|
---|
| 167 | typedef union _TDI_REQUEST_TYPE {
|
---|
| 168 | TDI_REQUEST_ACCEPT TdiAccept;
|
---|
| 169 | TDI_REQUEST_CONNECT TdiConnect;
|
---|
| 170 | TDI_REQUEST_DISCONNECT TdiDisconnect;
|
---|
| 171 | TDI_REQUEST_LISTEN TdiListen;
|
---|
| 172 | TDI_REQUEST_QUERY_INFORMATION TdiQueryInformation;
|
---|
| 173 | TDI_REQUEST_RECEIVE TdiReceive;
|
---|
| 174 | TDI_REQUEST_RECEIVE_DATAGRAM TdiReceiveDatagram;
|
---|
| 175 | TDI_REQUEST_SEND TdiSend;
|
---|
| 176 | TDI_REQUEST_SEND_DATAGRAM TdiSendDatagram;
|
---|
| 177 | TDI_REQUEST_SET_EVENT_HANDLER TdiSetEventHandler;
|
---|
| 178 | TDI_REQUEST_SET_INFORMATION TdiSetInformation;
|
---|
| 179 | } TDI_REQUEST_TYPE, *PTDI_REQUEST_TYPE;
|
---|
| 180 |
|
---|
| 181 | /* Query information types */
|
---|
| 182 |
|
---|
| 183 | /* Generic query info types that must be supported by all transports */
|
---|
| 184 | #define TDI_QUERY_BROADCAST_ADDRESS 0x00000001
|
---|
| 185 | #define TDI_QUERY_PROVIDER_INFO 0x00000002
|
---|
| 186 | #define TDI_QUERY_ADDRESS_INFO 0x00000003
|
---|
| 187 | #define TDI_QUERY_CONNECTION_INFO 0x00000004
|
---|
| 188 | #define TDI_QUERY_PROVIDER_STATISTICS 0x00000005
|
---|
| 189 | #define TDI_QUERY_DATAGRAM_INFO 0x00000006
|
---|
| 190 | #define TDI_QUERY_DATA_LINK_ADDRESS 0x00000007
|
---|
| 191 | #define TDI_QUERY_NETWORK_ADDRESS 0x00000008
|
---|
| 192 | #define TDI_QUERY_MAX_DATAGRAM_INFO 0x00000009
|
---|
| 193 |
|
---|
| 194 | /* Netbios specific query information types */
|
---|
| 195 | #define TDI_QUERY_ADAPTER_STATUS 0x00000100
|
---|
| 196 | #define TDI_QUERY_SESSION_STATUS 0x00000200
|
---|
| 197 | #define TDI_QUERY_FIND_NAME 0x00000300
|
---|
| 198 |
|
---|
| 199 | /* Structures used for TdiQueryInformation and TdiSetInformation */
|
---|
| 200 |
|
---|
| 201 | typedef struct _TDI_ENDPOINT_INFO {
|
---|
| 202 | ULONG State;
|
---|
| 203 | ULONG Event;
|
---|
| 204 | ULONG TransmittedTsdus;
|
---|
| 205 | ULONG ReceivedTsdus;
|
---|
| 206 | ULONG TransmissionErrors;
|
---|
| 207 | ULONG ReceiveErrors;
|
---|
| 208 | ULONG MinimumLookaheadData;
|
---|
| 209 | ULONG MaximumLookaheadData;
|
---|
| 210 | ULONG PriorityLevel;
|
---|
| 211 | ULONG SecurityLevel;
|
---|
| 212 | ULONG SecurityCompartment;
|
---|
| 213 | } TDI_ENDPOINT_INFO, *PTDI_ENDPOINT_INFO;
|
---|
| 214 |
|
---|
| 215 | typedef struct _TDI_CONNECTION_INFO {
|
---|
| 216 | ULONG State;
|
---|
| 217 | ULONG Event;
|
---|
| 218 | ULONG TransmittedTsdus;
|
---|
| 219 | ULONG ReceivedTsdus;
|
---|
| 220 | ULONG TransmissionErrors;
|
---|
| 221 | ULONG ReceiveErrors;
|
---|
| 222 | LARGE_INTEGER Throughput;
|
---|
| 223 | LARGE_INTEGER Delay;
|
---|
| 224 | ULONG SendBufferSize;
|
---|
| 225 | ULONG ReceiveBufferSize;
|
---|
| 226 | BOOLEAN Unreliable;
|
---|
| 227 | } TDI_CONNECTION_INFO, *PTDI_CONNECTION_INFO;
|
---|
| 228 |
|
---|
| 229 | typedef struct _TDI_DATAGRAM_INFO {
|
---|
| 230 | ULONG MaximumDatagramBytes;
|
---|
| 231 | ULONG MaximumDatagramCount;
|
---|
| 232 | } TDI_DATAGRAM_INFO, *PTDI_DATAGRAM_INFO;
|
---|
| 233 |
|
---|
| 234 | typedef struct _TDI_MAX_DATAGRAM_INFO {
|
---|
| 235 | ULONG MaxDatagramSize;
|
---|
| 236 | } TDI_MAX_DATAGRAM_INFO, *PTDI_MAX_DATAGRAM_INFO;
|
---|
| 237 |
|
---|
| 238 | typedef struct _TDI_PROVIDER_INFO {
|
---|
| 239 | ULONG Version;
|
---|
| 240 | ULONG MaxSendSize;
|
---|
| 241 | ULONG MaxConnectionUserData;
|
---|
| 242 | ULONG MaxDatagramSize;
|
---|
| 243 | ULONG ServiceFlags;
|
---|
| 244 | ULONG MinimumLookaheadData;
|
---|
| 245 | ULONG MaximumLookaheadData;
|
---|
| 246 | ULONG NumberOfResources;
|
---|
| 247 | LARGE_INTEGER StartTime;
|
---|
| 248 | } TDI_PROVIDER_INFO, *PTDI_PROVIDER_INFO;
|
---|
| 249 |
|
---|
| 250 | #define TDI_SERVICE_CONNECTION_MODE 0x00000001
|
---|
| 251 | #define TDI_SERVICE_ORDERLY_RELEASE 0x00000002
|
---|
| 252 | #define TDI_SERVICE_CONNECTIONLESS_MODE 0x00000004
|
---|
| 253 | #define TDI_SERVICE_ERROR_FREE_DELIVERY 0x00000008
|
---|
| 254 | #define TDI_SERVICE_SECURITY_LEVEL 0x00000010
|
---|
| 255 | #define TDI_SERVICE_BROADCAST_SUPPORTED 0x00000020
|
---|
| 256 | #define TDI_SERVICE_MULTICAST_SUPPORTED 0x00000040
|
---|
| 257 | #define TDI_SERVICE_DELAYED_ACCEPTANCE 0x00000080
|
---|
| 258 | #define TDI_SERVICE_EXPEDITED_DATA 0x00000100
|
---|
| 259 | #define TDI_SERVICE_INTERNAL_BUFFERING 0x00000200
|
---|
| 260 | #define TDI_SERVICE_ROUTE_DIRECTED 0x00000400
|
---|
| 261 | #define TDI_SERVICE_NO_ZERO_LENGTH 0x00000800
|
---|
| 262 | #define TDI_SERVICE_POINT_TO_POINT 0x00001000
|
---|
| 263 | #define TDI_SERVICE_MESSAGE_MODE 0x00002000
|
---|
| 264 | #define TDI_SERVICE_HALF_DUPLEX 0x00004000
|
---|
| 265 | #define TDI_SERVICE_DGRAM_CONNECTION 0x00008000
|
---|
| 266 | #define TDI_SERVICE_FORCE_ACCESS_CHECK 0x00010000
|
---|
| 267 | #define TDI_SERVICE_SEND_AND_DISCONNECT 0x00020000
|
---|
| 268 | #define TDI_SERVICE_DIRECT_ACCEPT 0x00040000
|
---|
| 269 | #define TDI_SERVICE_ACCEPT_LOCAL_ADDR 0x00080000
|
---|
| 270 |
|
---|
| 271 | typedef struct _TDI_PROVIDER_RESOURCE_STATS {
|
---|
| 272 | ULONG ResourceId;
|
---|
| 273 | ULONG MaximumResourceUsed;
|
---|
| 274 | ULONG AverageResourceUsed;
|
---|
| 275 | ULONG ResourceExhausted;
|
---|
| 276 | } TDI_PROVIDER_RESOURCE_STATS, *PTDI_PROVIDER_RESOURCE_STATS;
|
---|
| 277 |
|
---|
| 278 | typedef struct _TDI_PROVIDER_STATISTICS {
|
---|
| 279 | ULONG Version;
|
---|
| 280 | ULONG OpenConnections;
|
---|
| 281 | ULONG ConnectionsAfterNoRetry;
|
---|
| 282 | ULONG ConnectionsAfterRetry;
|
---|
| 283 | ULONG LocalDisconnects;
|
---|
| 284 | ULONG RemoteDisconnects;
|
---|
| 285 | ULONG LinkFailures;
|
---|
| 286 | ULONG AdapterFailures;
|
---|
| 287 | ULONG SessionTimeouts;
|
---|
| 288 | ULONG CancelledConnections;
|
---|
| 289 | ULONG RemoteResourceFailures;
|
---|
| 290 | ULONG LocalResourceFailures;
|
---|
| 291 | ULONG NotFoundFailures;
|
---|
| 292 | ULONG NoListenFailures;
|
---|
| 293 | ULONG DatagramsSent;
|
---|
| 294 | LARGE_INTEGER DatagramBytesSent;
|
---|
| 295 | ULONG DatagramsReceived;
|
---|
| 296 | LARGE_INTEGER DatagramBytesReceived;
|
---|
| 297 | ULONG PacketsSent;
|
---|
| 298 | ULONG PacketsReceived;
|
---|
| 299 | ULONG DataFramesSent;
|
---|
| 300 | LARGE_INTEGER DataFrameBytesSent;
|
---|
| 301 | ULONG DataFramesReceived;
|
---|
| 302 | LARGE_INTEGER DataFrameBytesReceived;
|
---|
| 303 | ULONG DataFramesResent;
|
---|
| 304 | LARGE_INTEGER DataFrameBytesResent;
|
---|
| 305 | ULONG DataFramesRejected;
|
---|
| 306 | LARGE_INTEGER DataFrameBytesRejected;
|
---|
| 307 | ULONG ResponseTimerExpirations;
|
---|
| 308 | ULONG AckTimerExpirations;
|
---|
| 309 | ULONG MaximumSendWindow;
|
---|
| 310 | ULONG AverageSendWindow;
|
---|
| 311 | ULONG PiggybackAckQueued;
|
---|
| 312 | ULONG PiggybackAckTimeouts;
|
---|
| 313 | LARGE_INTEGER WastedPacketSpace;
|
---|
| 314 | ULONG WastedSpacePackets;
|
---|
| 315 | ULONG NumberOfResources;
|
---|
| 316 | TDI_PROVIDER_RESOURCE_STATS ResourceStats[1];
|
---|
| 317 | } TDI_PROVIDER_STATISTICS, *PTDI_PROVIDER_STATISTICS;
|
---|
| 318 |
|
---|
| 319 | #define TDI_EVENT_CONNECT 0
|
---|
| 320 | #define TDI_EVENT_DISCONNECT 1
|
---|
| 321 | #define TDI_EVENT_ERROR 2
|
---|
| 322 | #define TDI_EVENT_RECEIVE 3
|
---|
| 323 | #define TDI_EVENT_RECEIVE_DATAGRAM 4
|
---|
| 324 | #define TDI_EVENT_RECEIVE_EXPEDITED 5
|
---|
| 325 | #define TDI_EVENT_SEND_POSSIBLE 6
|
---|
| 326 |
|
---|
| 327 | typedef struct _TDI_REQUEST_ASSOCIATE {
|
---|
| 328 | TDI_REQUEST Request;
|
---|
| 329 | HANDLE AddressHandle;
|
---|
| 330 | } TDI_REQUEST_ASSOCIATE_ADDRESS, *PTDI_REQUEST_ASSOCIATE_ADDRESS;
|
---|
| 331 |
|
---|
| 332 | #define NDIS_PACKET_POOL_TAG_FOR_NWLNKIPX 'iPDN'
|
---|
| 333 | #define NDIS_PACKET_POOL_TAG_FOR_NWLNKSPX 'sPDN'
|
---|
| 334 | #define NDIS_PACKET_POOL_TAG_FOR_NWLNKNB 'nPDN'
|
---|
| 335 | #define NDIS_PACKET_POOL_TAG_FOR_TCPIP 'tPDN'
|
---|
| 336 | #define NDIS_PACKET_POOL_TAG_FOR_NBF 'bPDN'
|
---|
| 337 | #define NDIS_PACKET_POOL_TAG_FOR_APPLETALK 'aPDN'
|
---|
| 338 |
|
---|
| 339 | typedef struct _TA_ADDRESS {
|
---|
| 340 | USHORT AddressLength;
|
---|
| 341 | USHORT AddressType;
|
---|
| 342 | UCHAR Address[1];
|
---|
| 343 | } TA_ADDRESS, *PTA_ADDRESS;
|
---|
| 344 |
|
---|
| 345 | #define TDI_ADDRESS_TYPE_UNSPEC 0
|
---|
| 346 | #define TDI_ADDRESS_TYPE_UNIX 1
|
---|
| 347 | #define TDI_ADDRESS_TYPE_IP 2
|
---|
| 348 | #define TDI_ADDRESS_TYPE_IMPLINK 3
|
---|
| 349 | #define TDI_ADDRESS_TYPE_PUP 4
|
---|
| 350 | #define TDI_ADDRESS_TYPE_CHAOS 5
|
---|
| 351 | #define TDI_ADDRESS_TYPE_NS 6
|
---|
| 352 | #define TDI_ADDRESS_TYPE_IPX 6
|
---|
| 353 | #define TDI_ADDRESS_TYPE_NBS 7
|
---|
| 354 | #define TDI_ADDRESS_TYPE_ECMA 8
|
---|
| 355 | #define TDI_ADDRESS_TYPE_DATAKIT 9
|
---|
| 356 | #define TDI_ADDRESS_TYPE_CCITT 10
|
---|
| 357 | #define TDI_ADDRESS_TYPE_SNA 11
|
---|
| 358 | #define TDI_ADDRESS_TYPE_DECnet 12
|
---|
| 359 | #define TDI_ADDRESS_TYPE_DLI 13
|
---|
| 360 | #define TDI_ADDRESS_TYPE_LAT 14
|
---|
| 361 | #define TDI_ADDRESS_TYPE_HYLINK 15
|
---|
| 362 | #define TDI_ADDRESS_TYPE_APPLETALK 16
|
---|
| 363 | #define TDI_ADDRESS_TYPE_NETBIOS 17
|
---|
| 364 | #define TDI_ADDRESS_TYPE_8022 18
|
---|
| 365 | #define TDI_ADDRESS_TYPE_OSI_TSAP 19
|
---|
| 366 | #define TDI_ADDRESS_TYPE_NETONE 20
|
---|
| 367 | #define TDI_ADDRESS_TYPE_VNS 21
|
---|
| 368 | #define TDI_ADDRESS_TYPE_NETBIOS_EX 22
|
---|
| 369 | #define TDI_ADDRESS_TYPE_IP6 23
|
---|
| 370 | #define TDI_ADDRESS_TYPE_NETBIOS_UNICODE_EX 24
|
---|
| 371 |
|
---|
| 372 | #define TdiTransportAddress "TransportAddress"
|
---|
| 373 | #define TdiConnectionContext "ConnectionContext"
|
---|
| 374 | #define TDI_TRANSPORT_ADDRESS_LENGTH (sizeof(TdiTransportAddress) - 1)
|
---|
| 375 | #define TDI_CONNECTION_CONTEXT_LENGTH (sizeof(TdiConnectionContext) - 1)
|
---|
| 376 |
|
---|
| 377 | typedef struct _TRANSPORT_ADDRESS {
|
---|
| 378 | LONG TAAddressCount;
|
---|
| 379 | TA_ADDRESS Address[1];
|
---|
| 380 | } TRANSPORT_ADDRESS, *PTRANSPORT_ADDRESS;
|
---|
| 381 |
|
---|
| 382 | typedef struct _TDI_ACTION_HEADER {
|
---|
| 383 | ULONG TransportId;
|
---|
| 384 | USHORT ActionCode;
|
---|
| 385 | USHORT Reserved;
|
---|
| 386 | } TDI_ACTION_HEADER, *PTDI_ACTION_HEADER;
|
---|
| 387 |
|
---|
| 388 | typedef struct _TDI_ADDRESS_INFO {
|
---|
| 389 | ULONG ActivityCount;
|
---|
| 390 | TRANSPORT_ADDRESS Address;
|
---|
| 391 | } TDI_ADDRESS_INFO, *PTDI_ADDRESS_INFO;
|
---|
| 392 |
|
---|
| 393 | #include "pshpack1.h"
|
---|
| 394 |
|
---|
| 395 | typedef struct _TDI_ADDRESS_8022 {
|
---|
| 396 | UCHAR MACAddress[6];
|
---|
| 397 | } TDI_ADDRESS_8022, *PTDI_ADDRESS_8022;
|
---|
| 398 |
|
---|
| 399 | #define TDI_ADDRESS_LENGTH_8022 sizeof(TDI_ADDRESS_8022);
|
---|
| 400 |
|
---|
| 401 | typedef struct _TDI_ADDRESS_APPLETALK {
|
---|
| 402 | USHORT Network;
|
---|
| 403 | UCHAR Node;
|
---|
| 404 | UCHAR Socket;
|
---|
| 405 | } TDI_ADDRESS_APPLETALK, *PTDI_ADDRESS_APPLETALK;
|
---|
| 406 |
|
---|
| 407 | #define TDI_ADDRESS_LENGTH_APPLETALK sizeof(TDI_ADDRESS_APPLETALK)
|
---|
| 408 |
|
---|
| 409 | typedef struct _TDI_ADDRESS_IP {
|
---|
| 410 | USHORT sin_port;
|
---|
| 411 | ULONG in_addr;
|
---|
| 412 | UCHAR sin_zero[8];
|
---|
| 413 | } TDI_ADDRESS_IP, *PTDI_ADDRESS_IP;
|
---|
| 414 |
|
---|
| 415 | #define TDI_ADDRESS_LENGTH_IP sizeof(TDI_ADDRESS_IP)
|
---|
| 416 |
|
---|
| 417 | typedef struct _TDI_ADDRESS_IPX {
|
---|
| 418 | ULONG NetworkAddress;
|
---|
| 419 | UCHAR NodeAddress[6];
|
---|
| 420 | USHORT Socket;
|
---|
| 421 | } TDI_ADDRESS_IPX, *PTDI_ADDRESS_IPX;
|
---|
| 422 |
|
---|
| 423 | #define TDI_ADDRESS_LENGTH_IPX sizeof(TDI_ADDRESS_IPX)
|
---|
| 424 |
|
---|
| 425 | /* TDI_ADDRESS_NETBIOS.NetbiosNameType constants */
|
---|
| 426 | #define TDI_ADDRESS_NETBIOS_TYPE_UNIQUE 0x0000
|
---|
| 427 | #define TDI_ADDRESS_NETBIOS_TYPE_GROUP 0x0001
|
---|
| 428 | #define TDI_ADDRESS_NETBIOS_TYPE_QUICK_UNIQUE 0x0002
|
---|
| 429 | #define TDI_ADDRESS_NETBIOS_TYPE_QUICK_GROUP 0x0003
|
---|
| 430 |
|
---|
| 431 | typedef struct _TDI_ADDRESS_NETBIOS {
|
---|
| 432 | USHORT NetbiosNameType;
|
---|
| 433 | UCHAR NetbiosName[16];
|
---|
| 434 | } TDI_ADDRESS_NETBIOS, *PTDI_ADDRESS_NETBIOS;
|
---|
| 435 |
|
---|
| 436 | #define TDI_ADDRESS_LENGTH_NETBIOS sizeof(TDI_ADDRESS_NETBIOS)
|
---|
| 437 |
|
---|
| 438 | typedef struct _TDI_ADDRESS_NETBIOS_EX {
|
---|
| 439 | UCHAR EndpointName[16];
|
---|
| 440 | TDI_ADDRESS_NETBIOS NetbiosAddress;
|
---|
| 441 | } TDI_ADDRESS_NETBIOS_EX, *PTDI_ADDRESS_NETBIOS_EX;
|
---|
| 442 |
|
---|
| 443 | #define TDI_ADDRESS_LENGTH_NETBIOS_EX sizeof(TDI_ADDRESS_NETBIOS_EX)
|
---|
| 444 |
|
---|
| 445 | /* TDI_ADDRESS_NETONE.NetoneNameType constants */
|
---|
| 446 | #define TDI_ADDRESS_NETONE_TYPE_UNIQUE 0x0000
|
---|
| 447 | #define TDI_ADDRESS_NETONE_TYPE_ROTORED 0x0001
|
---|
| 448 |
|
---|
| 449 | typedef struct _TDI_ADDRESS_NETONE {
|
---|
| 450 | USHORT NetoneNameType;
|
---|
| 451 | UCHAR NetoneName[20];
|
---|
| 452 | } TDI_ADDRESS_NETONE, *PTDI_ADDRESS_NETONE;
|
---|
| 453 |
|
---|
| 454 | #define TDI_ADDRESS_LENGTH_NETONE sizeof(TDI_ADDRESS_NETONE)
|
---|
| 455 |
|
---|
| 456 | typedef struct _TDI_ADDRESS_NS
|
---|
| 457 | {
|
---|
| 458 | ULONG NetworkAddress;
|
---|
| 459 | UCHAR NodeAddress[6];
|
---|
| 460 | USHORT Socket;
|
---|
| 461 | } TDI_ADDRESS_NS, *PTDI_ADDRESS_NS;
|
---|
| 462 |
|
---|
| 463 | #define TDI_ADDRESS_LENGTH_NS sizeof(TDI_ADDRESS_NS)
|
---|
| 464 |
|
---|
| 465 | #define ISO_MAX_ADDR_LENGTH 64
|
---|
| 466 |
|
---|
| 467 | /* TDI_ADDRESS_OSI_TSAP.tp_addr_type constants */
|
---|
| 468 | #define ISO_HIERARCHICAL 0
|
---|
| 469 | #define ISO_NON_HIERARCHICAL 1
|
---|
| 470 |
|
---|
| 471 | typedef struct _TDI_ADDRESS_OSI_TSAP {
|
---|
| 472 | USHORT tp_addr_type;
|
---|
| 473 | USHORT tp_taddr_len;
|
---|
| 474 | USHORT tp_tsel_len;
|
---|
| 475 | UCHAR tp_addr[ISO_MAX_ADDR_LENGTH];
|
---|
| 476 | } TDI_ADDRESS_OSI_TSAP, *PTDI_ADDRESS_OSI_TSAP;
|
---|
| 477 |
|
---|
| 478 | #define TDI_ADDRESS_LENGTH_OSI_TSAP sizeof(TDI_ADDRESS_OSI_TSAP)
|
---|
| 479 |
|
---|
| 480 | typedef struct _TDI_ADDRESS_VNS {
|
---|
| 481 | UCHAR net_address[4];
|
---|
| 482 | UCHAR subnet_addr[2];
|
---|
| 483 | UCHAR port[2];
|
---|
| 484 | UCHAR hops;
|
---|
| 485 | UCHAR filler[5];
|
---|
| 486 | } TDI_ADDRESS_VNS, *PTDI_ADDRESS_VNS;
|
---|
| 487 |
|
---|
| 488 | #define TDI_ADDRESS_LENGTH_VNS sizeof(TDI_ADDRESS_VNS)
|
---|
| 489 |
|
---|
| 490 | typedef struct _TDI_ADDRESS_IP6 {
|
---|
| 491 | USHORT sin6_port;
|
---|
| 492 | ULONG sin6_flowinfo;
|
---|
| 493 | USHORT sin6_addr[8];
|
---|
| 494 | ULONG sin6_scope_id;
|
---|
| 495 | } TDI_ADDRESS_IP6, *PTDI_ADDRESS_IP6;
|
---|
| 496 |
|
---|
| 497 | #define TDI_ADDRESS_LENGTH_IP6 sizeof(TDI_ADDRESS_IP6)
|
---|
| 498 |
|
---|
| 499 | enum eNameBufferType {
|
---|
| 500 | NBT_READONLY = 0,
|
---|
| 501 | NBT_WRITEONLY,
|
---|
| 502 | NBT_READWRITE,
|
---|
| 503 | NBT_WRITTEN
|
---|
| 504 | };
|
---|
| 505 |
|
---|
| 506 | typedef struct _TDI_ADDRESS_NETBIOS_UNICODE_EX {
|
---|
| 507 | USHORT NetbiosNameType;
|
---|
| 508 | enum eNameBufferType NameBufferType;
|
---|
| 509 | UNICODE_STRING EndpointName;
|
---|
| 510 | UNICODE_STRING RemoteName;
|
---|
| 511 | WCHAR EndpointBuffer[17];
|
---|
| 512 | WCHAR RemoteNameBuffer[1];
|
---|
| 513 | } TDI_ADDRESS_NETBIOS_UNICODE_EX, *PTDI_ADDRESS_NETBIOS_UNICODE_EX;
|
---|
| 514 |
|
---|
| 515 | typedef struct _TA_APPLETALK_ADDR {
|
---|
| 516 | LONG TAAddressCount;
|
---|
| 517 | struct _AddrAtalk {
|
---|
| 518 | USHORT AddressLength;
|
---|
| 519 | USHORT AddressType;
|
---|
| 520 | TDI_ADDRESS_APPLETALK Address[1];
|
---|
| 521 | } Address[1];
|
---|
| 522 | } TA_APPLETALK_ADDRESS, *PTA_APPLETALK_ADDRESS;
|
---|
| 523 |
|
---|
| 524 | typedef struct _TA_ADDRESS_IP {
|
---|
| 525 | LONG TAAddressCount;
|
---|
| 526 | struct _AddrIp {
|
---|
| 527 | USHORT AddressLength;
|
---|
| 528 | USHORT AddressType;
|
---|
| 529 | TDI_ADDRESS_IP Address[1];
|
---|
| 530 | } Address[1];
|
---|
| 531 | } TA_IP_ADDRESS, *PTA_IP_ADDRESS;
|
---|
| 532 |
|
---|
| 533 | typedef struct _TA_ADDRESS_IPX {
|
---|
| 534 | LONG TAAddressCount;
|
---|
| 535 | struct _AddrIpx {
|
---|
| 536 | USHORT AddressLength;
|
---|
| 537 | USHORT AddressType;
|
---|
| 538 | TDI_ADDRESS_IPX Address[1];
|
---|
| 539 | } Address[1];
|
---|
| 540 | } TA_IPX_ADDRESS, *PTA_IPX_ADDRESS;
|
---|
| 541 |
|
---|
| 542 | typedef struct _TA_NETBIOS_ADDRESS {
|
---|
| 543 | LONG TAAddressCount;
|
---|
| 544 | struct _Addr{
|
---|
| 545 | USHORT AddressLength;
|
---|
| 546 | USHORT AddressType;
|
---|
| 547 | TDI_ADDRESS_NETBIOS Address[1];
|
---|
| 548 | } Address[1];
|
---|
| 549 | } TA_NETBIOS_ADDRESS, *PTA_NETBIOS_ADDRESS;
|
---|
| 550 |
|
---|
| 551 | typedef struct _TA_ADDRESS_NS {
|
---|
| 552 | LONG TAAddressCount;
|
---|
| 553 | struct _AddrNs {
|
---|
| 554 | USHORT AddressLength;
|
---|
| 555 | USHORT AddressType;
|
---|
| 556 | TDI_ADDRESS_NS Address[1];
|
---|
| 557 | } Address[1];
|
---|
| 558 | } TA_NS_ADDRESS, *PTA_NS_ADDRESS;
|
---|
| 559 |
|
---|
| 560 | typedef struct _TA_ADDRESS_VNS {
|
---|
| 561 | LONG TAAddressCount;
|
---|
| 562 | struct _AddrVns {
|
---|
| 563 | USHORT AddressLength;
|
---|
| 564 | USHORT AddressType;
|
---|
| 565 | TDI_ADDRESS_VNS Address[1];
|
---|
| 566 | } Address[1];
|
---|
| 567 | } TA_VNS_ADDRESS, *PTA_VNS_ADDRESS;
|
---|
| 568 |
|
---|
| 569 | typedef struct _TA_ADDRESS_IP6 {
|
---|
| 570 | LONG TAAddressCount;
|
---|
| 571 | struct _AddrIp6 {
|
---|
| 572 | USHORT AddressLength;
|
---|
| 573 | USHORT AddressType;
|
---|
| 574 | TDI_ADDRESS_IP6 Address[1];
|
---|
| 575 | } Address [1];
|
---|
| 576 | } TA_IP6_ADDRESS, *PTA_IP6_ADDRESS;
|
---|
| 577 |
|
---|
| 578 | typedef struct _TA_ADDRESS_NETBIOS_UNICODE_EX {
|
---|
| 579 | LONG TAAddressCount;
|
---|
| 580 | struct _AddrNetbiosWCharEx {
|
---|
| 581 | USHORT AddressLength;
|
---|
| 582 | USHORT AddressType;
|
---|
| 583 | TDI_ADDRESS_NETBIOS_UNICODE_EX Address[1];
|
---|
| 584 | } Address [1];
|
---|
| 585 | } TA_NETBIOS_UNICODE_EX_ADDRESS, *PTA_NETBIOS_UNICODE_EX_ADDRESS;
|
---|
| 586 |
|
---|
| 587 | #include "poppack.h"
|
---|
| 588 |
|
---|
| 589 | #ifdef __cplusplus
|
---|
| 590 | }
|
---|
| 591 | #endif
|
---|
| 592 |
|
---|
| 593 | #endif /* __TDI_H */
|
---|