Naveen Neel / shedskin
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers tdiinfo.h Source File

tdiinfo.h

00001 /*
00002  * tdiinfo.h
00003  *
00004  * TDI set and query information interface
00005  *
00006  * This file is part of the w32api package.
00007  *
00008  * Contributors:
00009  *   Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
00010  *
00011  * THIS SOFTWARE IS NOT COPYRIGHTED
00012  *
00013  * This source code is offered for use in the public domain. You may
00014  * use, modify or distribute it freely.
00015  *
00016  * This code is distributed in the hope that it will be useful but
00017  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
00018  * DISCLAIMED. This includes but is not limited to warranties of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00020  *
00021  */
00022 
00023 #ifndef __TDIINFO_H
00024 #define __TDIINFO_H
00025 
00026 #if __GNUC__ >=3
00027 #pragma GCC system_header
00028 #endif
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 #include "ntddk.h"
00035 
00036 typedef struct TDIEntityID {
00037   ULONG  tei_entity;
00038   ULONG  tei_instance;
00039 } TDIEntityID;
00040 
00041 #define MAX_TDI_ENTITIES                  4096
00042 #define INVALID_ENTITY_INSTANCE           -1
00043 #define GENERIC_ENTITY                          0
00044 #define ENTITY_LIST_ID                          0
00045 #define ENTITY_TYPE_ID                          1
00046 
00047 #define AT_ENTITY                                   0x280
00048 #define CL_NL_ENTITY                              0x301
00049 #define CL_TL_ENTITY                              0x401
00050 #define CO_NL_ENTITY                              0x300
00051 #define CO_TL_ENTITY                              0x400
00052 #define ER_ENTITY                                   0x380
00053 #define IF_ENTITY                                   0x200
00054 
00055 #define AT_ARP                                      0x280
00056 #define AT_NULL                                     0x282
00057 #define CL_TL_NBF                                   0x401
00058 #define CL_TL_UDP                                   0x403
00059 #define CL_NL_IPX                                   0x301
00060 #define CL_NL_IP                                    0x303
00061 #define CO_TL_NBF                                   0x400
00062 #define CO_TL_SPX                                   0x402
00063 #define CO_TL_TCP                                   0x404
00064 #define CO_TL_SPP                                   0x406
00065 #define ER_ICMP                                     0x380
00066 #define IF_GENERIC                                0x200
00067 #define IF_MIB                                      0x202
00068 
00069 /* TDIObjectID.toi_class constants */
00070 #define INFO_CLASS_GENERIC                    0x100
00071 #define INFO_CLASS_PROTOCOL                   0x200
00072 #define INFO_CLASS_IMPLEMENTATION           0x300
00073 
00074 /* TDIObjectID.toi_type constants */
00075 #define INFO_TYPE_PROVIDER                    0x100
00076 #define INFO_TYPE_ADDRESS_OBJECT            0x200
00077 #define INFO_TYPE_CONNECTION                  0x300
00078 
00079 typedef struct _TDIObjectID {
00080     TDIEntityID  toi_entity;
00081     ULONG  toi_class;
00082     ULONG  toi_type;
00083     ULONG  toi_id;
00084 } TDIObjectID;
00085 
00086 #define CONTEXT_SIZE                              16
00087 
00088 typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX {
00089   TDIObjectID  ID;
00090   ULONG_PTR  Context[CONTEXT_SIZE / sizeof(ULONG_PTR)];
00091 } TCP_REQUEST_QUERY_INFORMATION_EX, *PTCP_REQUEST_QUERY_INFORMATION_EX;
00092 
00093 #if defined(_WIN64)
00094 typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX32 {
00095   TDIObjectID  ID;
00096   ULONG32  Context[CONTEXT_SIZE / sizeof(ULONG32)];
00097 } TCP_REQUEST_QUERY_INFORMATION_EX32, *PTCP_REQUEST_QUERY_INFORMATION_EX32;
00098 #endif /* _WIN64 */
00099 
00100 typedef struct _TCP_REQUEST_SET_INFORMATION_EX {
00101   TDIObjectID  ID;
00102   UINT  BufferSize;
00103   UCHAR  Buffer[1];
00104 } TCP_REQUEST_SET_INFORMATION_EX, *PTCP_REQUEST_SET_INFORMATION_EX;
00105 
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109 
00110 #endif /* __TDIINFO_H */