4 * Set and query ioctl constants for tcpip.sys
7 * Created by Art Yerkes (ayerkes@speakeasy.net) from
8 * drivers/net/tcpip/include/ticonsts.h
10 * THIS SOFTWARE IS NOT COPYRIGHTED
12 * This source code is offered for use in the public domain. You may
13 * use, modify or distribute it freely.
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.
25 #define DD_TCP_DEVICE_NAME L"\\Device\\Tcp"
27 /* TCP/UDP/RawIP IOCTL code definitions */
29 #define FSCTL_TCP_BASE FILE_DEVICE_NETWORK
31 #define _TCP_CTL_CODE(Function, Method, Access) \
32 CTL_CODE(FSCTL_TCP_BASE, Function, Method, Access)
34 #define IOCTL_TCP_QUERY_INFORMATION_EX \
35 _TCP_CTL_CODE(0, METHOD_NEITHER, FILE_ANY_ACCESS)
37 #define IOCTL_TCP_SET_INFORMATION_EX \
38 _TCP_CTL_CODE(1, METHOD_BUFFERED, FILE_WRITE_ACCESS)
40 #define IOCTL_SET_IP_ADDRESS \
41 _TCP_CTL_CODE(14, METHOD_BUFFERED, FILE_WRITE_ACCESS)
43 #define IOCTL_DELETE_IP_ADDRESS \
44 _TCP_CTL_CODE(16, METHOD_BUFFERED, FILE_WRITE_ACCESS)
46 #define IF_MIB_STATS_ID 1
47 #define IP_MIB_STATS_ID 1
48 #define IP_MIB_ARPTABLE_ENTRY_ID 0x101
49 #define IP_MIB_ADDRTABLE_ENTRY_ID 0x102
50 #define IP_INTFC_INFO_ID 0x103
51 #define MAX_PHYSADDR_SIZE 8
53 /* Address Object Options */
54 #define AO_OPTION_TTL 1
55 #define AO_OPTION_MCASTTTL 2
56 #define AO_OPTION_MCASTIF 3
57 #define AO_OPTION_XSUM 4
58 #define AO_OPTION_IPOPTIONS 5
59 #define AO_OPTION_ADD_MCAST 6
60 #define AO_OPTION_DEL_MCAST 7
61 #define AO_OPTION_TOS 8
62 #define AO_OPTION_IP_DONTFRAGMENT 9
63 #define AO_OPTION_MCASTLOOP 10
64 #define AO_OPTION_BROADCAST 11
65 #define AO_OPTION_IP_HDRINCL 12
66 #define AO_OPTION_RCVALL 13
67 #define AO_OPTION_RCVALL_MCAST 14
68 #define AO_OPTION_RCVALL_IGMPMCAST 15
69 #define AO_OPTION_UNNUMBEREDIF 16
70 #define AO_OPTION_IP_UCASTIF 17
71 #define AO_OPTION_ABSORB_RTRALERT 18
72 #define AO_OPTION_LIMIT_BCASTS 19
73 #define AO_OPTION_INDEX_BIND 20
74 #define AO_OPTION_INDEX_MCASTIF 21
75 #define AO_OPTION_INDEX_ADD_MCAST 22
76 #define AO_OPTION_INDEX_DEL_MCAST 23
77 #define AO_OPTION_IFLIST 24
78 #define AO_OPTION_ADD_IFLIST 25
79 #define AO_OPTION_DEL_IFLIST 26
80 #define AO_OPTION_IP_PKTINFO 27
81 #define AO_OPTION_ADD_MCAST_SRC 28
82 #define AO_OPTION_DEL_MCAST_SRC 29
83 #define AO_OPTION_MCAST_FILTER 30
84 #define AO_OPTION_BLOCK_MCAST_SRC 31
85 #define AO_OPTION_UNBLOCK_MCAST_SRC 32
86 #define AO_OPTION_UDP_CKSUM_COVER 33
87 #define AO_OPTION_WINDOW 34
88 #define AO_OPTION_SCALE_CWIN 35
89 #define AO_OPTION_RCV_HOPLIMIT 36
90 #define AO_OPTION_UNBIND 37
91 #define AO_OPTION_PROTECT 38
93 typedef struct IFEntry
100 UCHAR if_physaddr
[MAX_PHYSADDR_SIZE
];
101 ULONG if_adminstatus
;
105 ULONG if_inucastpkts
;
106 ULONG if_innucastpkts
;
109 ULONG if_inunknownprotos
;
111 ULONG if_outucastpkts
;
112 ULONG if_outnucastpkts
;
113 ULONG if_outdiscards
;
120 typedef struct IPSNMPInfo
122 ULONG ipsi_forwarding
;
123 ULONG ipsi_defaultttl
;
124 ULONG ipsi_inreceives
;
125 ULONG ipsi_inhdrerrors
;
126 ULONG ipsi_inaddrerrors
;
127 ULONG ipsi_forwdatagrams
;
128 ULONG ipsi_inunknownprotos
;
129 ULONG ipsi_indiscards
;
130 ULONG ipsi_indelivers
;
131 ULONG ipsi_outrequests
;
132 ULONG ipsi_routingdiscards
;
133 ULONG ipsi_outdiscards
;
134 ULONG ipsi_outnoroutes
;
135 ULONG ipsi_reasmtimeout
;
136 ULONG ipsi_reasmreqds
;
138 ULONG ipsi_reasmfails
;
140 ULONG ipsi_fragfails
;
141 ULONG ipsi_fragcreates
;
144 ULONG ipsi_numroutes
;
147 typedef struct IPAddrEntry
158 typedef struct IPInterfaceInfo
163 ULONG iii_addrlength
;
167 #endif/*_TCPIOCTL_H*/