move crt, ddk and GL includes
[reactos.git] / reactos / w32api / include / tcpioctl.h
1 /*
2 * tcpioctl.h
3 *
4 * Set and query ioctl constants for tcpip.sys
5 *
6 * Contributors:
7 * Created by Art Yerkes (ayerkes@speakeasy.net) from
8 * drivers/net/tcpip/include/ticonsts.h
9 *
10 * THIS SOFTWARE IS NOT COPYRIGHTED
11 *
12 * This source code is offered for use in the public domain. You may
13 * use, modify or distribute it freely.
14 *
15 * This code is distributed in the hope that it will be useful but
16 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
17 * DISCLAIMED. This includes but is not limited to warranties of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 *
20 */
21
22 #ifndef _TCPIOCTL_H
23 #define _TCPIOCTL_H
24
25 #define DD_TCP_DEVICE_NAME L"\\Device\\Tcp"
26
27 /* TCP/UDP/RawIP IOCTL code definitions */
28
29 #define FSCTL_TCP_BASE FILE_DEVICE_NETWORK
30
31 #define _TCP_CTL_CODE(Function, Method, Access) \
32 CTL_CODE(FSCTL_TCP_BASE, Function, Method, Access)
33
34 #define IOCTL_TCP_QUERY_INFORMATION_EX \
35 _TCP_CTL_CODE(0, METHOD_NEITHER, FILE_ANY_ACCESS)
36
37 #define IOCTL_TCP_SET_INFORMATION_EX \
38 _TCP_CTL_CODE(1, METHOD_BUFFERED, FILE_WRITE_ACCESS)
39
40 #define IOCTL_SET_IP_ADDRESS \
41 _TCP_CTL_CODE(14, METHOD_BUFFERED, FILE_WRITE_ACCESS)
42
43 #define IOCTL_DELETE_IP_ADDRESS \
44 _TCP_CTL_CODE(16, METHOD_BUFFERED, FILE_WRITE_ACCESS)
45
46 #define IF_MIB_STATS_ID 1
47 #define IP_MIB_STATS_ID 1
48 #define IP_MIB_ADDRTABLE_ENTRY_ID 0x102
49 #define IP_INTFC_INFO_ID 0x103
50 #define MAX_PHYSADDR_SIZE 8
51
52 typedef struct IFEntry
53 {
54 ULONG if_index;
55 ULONG if_type;
56 ULONG if_mtu;
57 ULONG if_speed;
58 ULONG if_physaddrlen;
59 UCHAR if_physaddr[MAX_PHYSADDR_SIZE];
60 ULONG if_adminstatus;
61 ULONG if_operstatus;
62 ULONG if_lastchange;
63 ULONG if_inoctets;
64 ULONG if_inucastpkts;
65 ULONG if_innucastpkts;
66 ULONG if_indiscards;
67 ULONG if_inerrors;
68 ULONG if_inunknownprotos;
69 ULONG if_outoctets;
70 ULONG if_outucastpkts;
71 ULONG if_outnucastpkts;
72 ULONG if_outdiscards;
73 ULONG if_outerrors;
74 ULONG if_outqlen;
75 ULONG if_descrlen;
76 UCHAR if_descr[1];
77 } IFEntry;
78
79 typedef struct IPSNMPInfo
80 {
81 ULONG ipsi_forwarding;
82 ULONG ipsi_defaultttl;
83 ULONG ipsi_inreceives;
84 ULONG ipsi_inhdrerrors;
85 ULONG ipsi_inaddrerrors;
86 ULONG ipsi_forwdatagrams;
87 ULONG ipsi_inunknownprotos;
88 ULONG ipsi_indiscards;
89 ULONG ipsi_indelivers;
90 ULONG ipsi_outrequests;
91 ULONG ipsi_routingdiscards;
92 ULONG ipsi_outdiscards;
93 ULONG ipsi_outnoroutes;
94 ULONG ipsi_reasmtimeout;
95 ULONG ipsi_reasmreqds;
96 ULONG ipsi_reasmoks;
97 ULONG ipsi_reasmfails;
98 ULONG ipsi_fragoks;
99 ULONG ipsi_fragfails;
100 ULONG ipsi_fragcreates;
101 ULONG ipsi_numif;
102 ULONG ipsi_numaddr;
103 ULONG ipsi_numroutes;
104 } IPSNMPInfo;
105
106 typedef struct IPAddrEntry
107 {
108 ULONG iae_addr;
109 ULONG iae_index;
110 ULONG iae_mask;
111 ULONG iae_bcastaddr;
112 ULONG iae_reasmsize;
113 USHORT iae_context;
114 USHORT iae_pad;
115 } IPAddrEntry;
116
117 typedef struct IPInterfaceInfo
118 {
119 ULONG iii_flags;
120 ULONG iii_mtu;
121 ULONG iii_speed;
122 ULONG iii_addrlength;
123 UCHAR iii_addr[1];
124 } IPInterfaceInfo;
125
126 #endif/*_TCPIOCTL_H*/