Some borken memory monitoring programs divide by dwTotalPageFile,
[wine/testsucceed.git] / dlls / wsock32 / wscontrol.h
blob7c7d57ac650a8e545a4d2d164082d88f148a6afc
1 /* wscontrol.h
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.
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.
12 #ifndef WSCONTROL_H_INCLUDED
13 #define WSCONTROL_H_INCLUDED
15 typedef unsigned char uchar; /* This doesn't seem to be in any standard headers */
17 #define WSCTL_SUCCESS 0
18 #define PROCFS_NETDEV_FILE "/proc/net/dev" /* Points to the file in the /proc fs
19 that lists the network devices.
20 Do we need an #ifdef LINUX for this? */
22 /* WsControl Helper Functions */
23 int WSCNTL_GetInterfaceCount(void); /* Obtains the number of network interfaces */
24 int WSCNTL_GetInterfaceName(int, char *); /* Obtains the name of an interface */
25 int WSCNTL_GetTransRecvStat(int intNumber, unsigned long *transBytes, unsigned long *recvBytes); /* Obtains bytes
26 recv'd/trans by interface */
29 * TCP/IP action codes.
31 #define WSCNTL_TCPIP_QUERY_INFO 0x00000000
32 #define WSCNTL_TCPIP_SET_INFO 0x00000001
33 #define WSCNTL_TCPIP_ICMP_ECHO 0x00000002
34 #define WSCNTL_TCPIP_TEST 0x00000003
37 /* Structure of an entity ID */
38 typedef struct TDIEntityID
40 unsigned long tei_entity;
41 unsigned long tei_instance;
42 } TDIEntityID;
44 /* Structure of an object ID */
45 typedef struct TDIObjectID
47 TDIEntityID toi_entity;
48 unsigned long toi_class;
49 unsigned long toi_type;
50 unsigned long toi_id;
51 } TDIObjectID;
53 typedef struct IPSNMPInfo
55 unsigned long ipsi_forwarding;
56 unsigned long ipsi_defaultttl;
57 unsigned long ipsi_inreceives;
58 unsigned long ipsi_inhdrerrors;
59 unsigned long ipsi_inaddrerrors;
60 unsigned long ipsi_forwdatagrams;
61 unsigned long ipsi_inunknownprotos;
62 unsigned long ipsi_indiscards;
63 unsigned long ipsi_indelivers;
64 unsigned long ipsi_outrequests;
65 unsigned long ipsi_routingdiscards;
66 unsigned long ipsi_outdiscards;
67 unsigned long ipsi_outnoroutes;
68 unsigned long ipsi_reasmtimeout;
69 unsigned long ipsi_reasmreqds;
70 unsigned long ipsi_reasmoks;
71 unsigned long ipsi_reasmfails;
72 unsigned long ipsi_fragoks;
73 unsigned long ipsi_fragfails;
74 unsigned long ipsi_fragcreates;
75 unsigned long ipsi_numif;
76 unsigned long ipsi_numaddr;
77 unsigned long ipsi_numroutes;
78 } IPSNMPInfo;
80 typedef struct IPAddrEntry
82 unsigned long iae_addr;
83 unsigned long iae_index;
84 unsigned long iae_mask;
85 unsigned long iae_bcastaddr;
86 unsigned long iae_reasmsize;
87 ushort iae_context;
88 ushort iae_pad;
89 } IPAddrEntry;
92 #define MAX_PHYSADDR_SIZE 8
93 #define MAX_IFDESCR_LEN 256
94 typedef struct IFEntry
96 unsigned long if_index;
97 unsigned long if_type;
98 unsigned long if_mtu;
99 unsigned long if_speed;
100 unsigned long if_physaddrlen;
101 uchar if_physaddr[MAX_PHYSADDR_SIZE];
102 unsigned long if_adminstatus;
103 unsigned long if_operstatus;
104 unsigned long if_lastchange;
105 unsigned long if_inoctets;
106 unsigned long if_inucastpkts;
107 unsigned long if_innucastpkts;
108 unsigned long if_indiscards;
109 unsigned long if_inerrors;
110 unsigned long if_inunknownprotos;
111 unsigned long if_outoctets;
112 unsigned long if_outucastpkts;
113 unsigned long if_outnucastpkts;
114 unsigned long if_outdiscards;
115 unsigned long if_outerrors;
116 unsigned long if_outqlen;
117 unsigned long if_descrlen;
118 uchar if_descr[1];
119 } IFEntry;
122 /* Not sure what EXACTLY most of this stuff does.
123 WsControl was implemented mainly by observing
124 its behaviour in Win98 ************************/
125 #define INFO_CLASS_GENERIC 0x100
126 #define INFO_CLASS_PROTOCOL 0x200
127 #define INFO_TYPE_PROVIDER 0x100
128 #define ENTITY_LIST_ID 0
129 #define CL_NL_ENTITY 0x301
130 #define IF_ENTITY 0x200
131 #define ENTITY_TYPE_ID 1
132 #define IP_MIB_ADDRTABLE_ENTRY_ID 0x102
133 /************************************************/
135 /* Valid values to get back from entity type ID query */
136 #define CO_TL_NBF 0x400 /* Entity implements NBF prot. */
137 #define CO_TL_SPX 0x402 /* Entity implements SPX prot. */
138 #define CO_TL_TCP 0x404 /* Entity implements TCP prot. */
139 #define CO_TL_SPP 0x406 /* Entity implements SPP prot. */
140 #define CL_TL_NBF 0x401 /* CL NBF protocol */
141 #define CL_TL_UDP 0x403 /* Entity implements UDP */
142 #define ER_ICMP 0x380 /* The ICMP protocol */
143 #define CL_NL_IPX 0x301 /* Entity implements IPX */
144 #define CL_NL_IP 0x303 /* Entity implements IP */
145 #define AT_ARP 0x280 /* Entity implements ARP */
146 #define AT_NULL 0x282 /* Entity does no address */
147 #define IF_GENERIC 0x200 /* Generic interface */
148 #define IF_MIB 0x202 /* Supports MIB-2 interface */
151 #endif /* WSCONTROL_H_INCLUDED */