⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tcpip_patcher.h

📁 Last change: 2008-02-03 This is the source code of KCeasy。
💻 H
字号:
/*
 * This file is part of KCeasy (http://www.kceasy.com)
 * Copyright (C) 2002-2005 Markus Kern <mkern@kceasy.com>
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
/*****************************************************************************/

#ifndef __TCPIP_PATCHER_H
#define __TCPIP_PATCHER_H

#define INITGUID

#ifdef DRIVER_CODE
# include <ntddk.h>
#else
# include <winioctl.h>
#endif

#define PATCHER_DEVICE_NAME_A   "TCPIP_PATCHER"
#define PATCHER_DEVICE_NAME_W   L"TCPIP_PATCHER"
#define PATCHER_DEVICE_PATH     L"\\Device\\" PATCHER_DEVICE_NAME_W
#define PATCHER_DOS_DEVICE_PATH L"\\DosDevices\\" PATCHER_DEVICE_NAME_W

/* random GUID for our device so security parameters can be set in registry
 * {DB28B382-9162-41c0-949B-7B00A53BCA72} */
DEFINE_GUID(PATCHER_DEVICE_GUID, 
            0xdb28b382,
            0x9162, 0x41c0,
            0x94, 0x9b, 0x7b, 0x0, 0xa5, 0x3b, 0xca, 0x72);

#define FILE_DEVICE_PATCHER FILE_DEVICE_UNKNOWN    

#define IOCTL_PATCHER_GET_LIMIT \
	(ULONG) CTL_CODE(FILE_DEVICE_PATCHER, 0x801, METHOD_BUFFERED, \
	                 FILE_READ_ACCESS)

#define IOCTL_PATCHER_SET_LIMIT \
	(ULONG) CTL_CODE(FILE_DEVICE_PATCHER, 0x802, METHOD_BUFFERED, \
	                 FILE_READ_ACCESS | FILE_WRITE_ACCESS)


/* data passed to and received from IOCTL_PATCHER_XXX_LIMIT */
typedef struct
{
	ULONG HalfOpenLimit;   /* IN: set, OUT: set/get */
	ULONG CurrentHalfOpen; /* IN:  - , OUT: set/get */
	ULONG ErrorCode;       /* IN:  - , OUT: set/get */
	CHAR LogString[0];     /* IN:  - , OUT: set/get
	                        * length until end of data buffer */
} PATCHER_LIMIT_DATA;

/* error codes */
#define PATCHER_ERROR_SUCCESS 0
#define PATCHER_ERROR_FAILURE 1


#endif /* __TCPIP_PATCHER_H */

/*****************************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -