wmiutils: Implement IWbemPath::GetNamespaceAt.
[wine] / dlls / wsock32 / wscontrol.h
1 /* wscontrol.h
2  *
3  * This header file includes #defines, structure and type definitions,
4  * and function declarations that support the implementation of the
5  * (undocumented) Winsock 1 call WsControl.
6  *
7  * The functionality of WsControl was created by observing its behaviour
8  * in Windows 98, so there are likely to be bugs with the assumptions
9  * that were made.  A significant amount of help came from
10  * http://tangentsoft.net/wskfaq/articles/wscontrol.html , especially the
11  * trace by Thomas Divine (www.pcausa.net).
12  *
13  * Copyright 2000 James Hatheway
14  * Copyright 2003 Juan Lang
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation; either
19  * version 2.1 of the License, or (at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24  * Lesser General Public License for more details.
25  *
26  * You should have received a copy of the GNU Lesser General Public
27  * License along with this library; if not, write to the Free Software
28  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29  */
30
31 #ifndef WSCONTROL_H_INCLUDED
32 #define WSCONTROL_H_INCLUDED
33
34 #define WSCTL_SUCCESS        0
35
36 /*
37  *      TCP/IP action codes.
38  */
39 #define WSCNTL_TCPIP_QUERY_INFO             0x00000000
40 #define WSCNTL_TCPIP_SET_INFO               0x00000001
41 #define WSCNTL_TCPIP_ICMP_ECHO              0x00000002
42 #define WSCNTL_TCPIP_TEST                   0x00000003
43
44
45 /* Structure of an entity ID */
46 typedef struct TDIEntityID
47 {
48    unsigned long tei_entity;
49    unsigned long tei_instance;
50 } TDIEntityID;
51
52 /* Structure of an object ID */
53 typedef struct TDIObjectID
54 {
55    TDIEntityID   toi_entity;
56    unsigned long toi_class;
57    unsigned long toi_type;
58    unsigned long toi_id;
59 } TDIObjectID;
60
61 /* FIXME: real name and definition of this struct that contains
62  * an IP route table entry is unknown */
63 typedef struct IPRouteEntry {
64    unsigned long ire_addr;
65    unsigned long ire_index;  /*matches interface index used by iphlpapi */
66    unsigned long ire_metric;
67    unsigned long ire_option4;
68    unsigned long ire_option5;
69    unsigned long ire_option6;
70    unsigned long ire_gw;
71    unsigned long ire_option8;
72    unsigned long ire_option9;
73    unsigned long ire_option10;
74    unsigned long ire_mask;
75    unsigned long ire_option12;
76 } IPRouteEntry;
77
78
79 /* Constants for use in the toi_id field */
80 #define ENTITY_LIST_ID 0 /* to get the list of entity IDs */
81 #define ENTITY_TYPE_ID 1 /* it's an interface; what type of interface is it? */
82 #define IP_MIB_TABLE_ENTRY_ID 0x101 /* not real name */
83 #define IP_MIB_ADDRTABLE_ENTRY_ID  0x102
84
85 /* Constants for use in the toi_class field */
86 #define INFO_CLASS_GENERIC  0x100
87 #define INFO_CLASS_PROTOCOL 0x200
88
89 /* Constants for use in the toi_type field */
90 #define INFO_TYPE_PROVIDER 0x100
91
92 /* Interface types.  The first one can be returned in the entity ID list--it's
93  * an interface, and it can be further queried for what type of interface it is.
94  */
95 #define IF_GENERIC 0x200 /* generic interface */
96 #define IF_MIB     0x202 /* supports MIB-2 interface */
97
98 /* address translation types.  The first can be turned in the entity ID list--
99  * it supports address translation of some type, and it can be further queried
100  * for what type of address translation it supports (I think).
101  */
102 #define AT_ENTITY 0x280
103 #define AT_ARP    0x280
104 #define AT_NULL   0x282 /* doesn't do address translation after all (liar) */
105
106 /* network layer service providers.  The first one can be returned in the
107  * entity list ID--it supports a network layer (datagram) service, and it can
108  * be further queried for what type of network layer service it provides.
109  */
110 #define CL_NL_ENTITY 0x301
111 #define CL_NL_IPX    0x301 /* implements IPX--probably won't see this, since
112                             * we're querying the TCP protocol */
113 #define CL_NL_IP     0x303 /* implements IP */
114
115 /* echo request/response types.  The first can be returned in the entity ID
116  * list--it can be further queried for what type of echo it supports (I think).
117  */
118 #define ER_ENTITY 0x380
119 #define ER_ICMP   0x380
120
121 /* connection-oriented transport layer protocols--you know the drill by now */
122 #define CO_TL_ENTITY 0x400
123 #define CO_TL_NBF    0x400
124 #define CO_TL_SPX    0x402
125 #define CO_TL_TCP    0x404
126 #define CO_TL_SPP    0x406
127
128 /* connectionless transport layer protocols--you know the drill by now */
129 #define CL_TL_ENTITY 0x401
130 #define CL_TL_NBF    0x401
131 #define CL_TL_UDP    0x403
132
133 #endif /* WSCONTROL_H_INCLUDED */