ReactOS  0.4.13-dev-101-g0ca4b50
ticonsts.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS TCP/IP protocol driver
4  * FILE: include/ticonsts.h
5  * PURPOSE: TCP/IP protocol driver constants
6  */
7 
8 #pragma once
9 
10 /* NDIS version this driver supports */
11 #define NDIS_VERSION_MAJOR 4
12 #define NDIS_VERSION_MINOR 0
13 
14 #ifdef _NTTEST_
15 /* Name of devices */
16 #define DD_TCP_DEVICE_NAME L"\\Device\\NTTcp"
17 #define DD_UDP_DEVICE_NAME L"\\Device\\NTUdp"
18 #define DD_IP_DEVICE_NAME L"\\Device\\NTIp"
19 #define DD_RAWIP_DEVICE_NAME L"\\Device\\NTRawIp"
20 
21 /* For NDIS protocol registration */
22 #define IP_DEVICE_NAME L"\\Device\\NTIp"
23 #else
24 #define DD_TCP_DEVICE_NAME L"\\Device\\Tcp"
25 #define DD_UDP_DEVICE_NAME L"\\Device\\Udp"
26 #define DD_IP_DEVICE_NAME L"\\Device\\Ip"
27 #define DD_RAWIP_DEVICE_NAME L"\\Device\\RawIp"
28 
29 /* For NDIS protocol registration */
30 /* The DDK says you have to register with the name that's registered with SCM, e.g. tcpip */
31 #define IP_DEVICE_NAME L"\\Device\\Ip"
32 #define TCPIP_PROTOCOL_NAME L"Tcpip"
33 #endif /* _NTTEST_ */
34 
35 /* TCP/UDP/RawIP IOCTL code definitions */
36 
37 #define FSCTL_TCP_BASE FILE_DEVICE_NETWORK
38 
39 #define _TCP_CTL_CODE(Function, Method, Access) \
40  CTL_CODE(FSCTL_TCP_BASE, Function, Method, Access)
41 
42 #define IOCTL_TCP_QUERY_INFORMATION_EX \
43  _TCP_CTL_CODE(0, METHOD_NEITHER, FILE_ANY_ACCESS)
44 
45 #define IOCTL_TCP_SET_INFORMATION_EX \
46  _TCP_CTL_CODE(1, METHOD_BUFFERED, FILE_WRITE_ACCESS)
47 
48 #define IOCTL_SET_IP_ADDRESS \
49  _TCP_CTL_CODE(14, METHOD_BUFFERED, FILE_WRITE_ACCESS)
50 
51 #define IOCTL_DELETE_IP_ADDRESS \
52  _TCP_CTL_CODE(16, METHOD_BUFFERED, FILE_WRITE_ACCESS)
53 
54 /* Unique error values for log entries */
55 #define TI_ERROR_DRIVERENTRY 0
56 
57 /* Internal status codes */
58 #define IP_SUCCESS 0x0000 /* Successful */
59 #define IP_NO_RESOURCES 0x0001 /* Not enough free resources */
60 #define IP_NO_ROUTE_TO_DESTINATION 0x0002 /* No route to destination */
61 
62 /* EOF */