资源简介
是我的毕业设计,包含所有心血,有驱动和应用程序的代码
代码片段和文件信息
/*
DrvFltIp.C
Author: your name
Last Updated: 2001-01-01/0101
This framework is generated by QuickSYS.
*/
#include
#include
#include
#include
#include
#include “DrvFltIp.h“
#if DBG
#define dprintf DbgPrint
#else
#define dprintf(x)
#endif
NTSTATUS DrvDispatch(IN PDEVICE_object Deviceobject IN PIRP Irp);
VOID DrvUnload(IN PDRIVER_object Driverobject);
NTSTATUS SetFilterFunction(PacketFilterExtensionPtr filterFunction);
NTSTATUS AddFilterToList(IPFilter *pf);
void ClearFilterList(void);
PF_FORWARD_ACTION cbFilterFunction(IN unsigned char *PacketHeaderIN unsigned char *Packet IN unsigned int PacketLength IN unsigned int RecvInterfaceIndex IN unsigned int SendInterfaceIndex IN unsigned long RecvlinkNextHop IN unsigned long SendlinkNextHop);
#define NT_DEVICE_NAME L“\\Device\\DrvFltIp“
#define DOS_DEVICE_NAME L“\\DosDevices\\DrvFltIp“
struct filterList *first = NULL;
struct filterList *last = NULL;
/*++
Routine Description:
Installable driver initialization entry point.
This entry point is called directly by the I/O system.
Arguments:
Driverobject - pointer to the driver object
RegistryPath - pointer to a unicode string representing the path
to driver-specific key in the registry
Return Value:
STATUS_SUCCESS if successful
STATUS_UNSUCCESSFUL otherwise
--*/
NTSTATUS DriverEntry(IN PDRIVER_object Driverobject IN PUNICODE_STRING RegistryPath)
{
PDEVICE_object deviceobject = NULL;
NTSTATUS ntStatus;
UNICODE_STRING deviceNameUnicodeString;
UNICODE_STRING devicelinkUnicodeString;
dprintf(“DrvFltIp.SYS: entering DriverEntry\n“);
//we have to create the device
RtlInitUnicodeString(&deviceNameUnicodeString NT_DEVICE_NAME);
ntStatus = IoCreateDevice(Driverobject
0
&deviceNameUnicodeString
FILE_DEVICE_DRVFLTIP
0
FALSE
&deviceobject);
if ( NT_SUCCESS(ntStatus) )
{
// Create a symbolic link that Win32 apps can specify to gain access
// to this driver/device
RtlInitUnicodeString(&devicelinkUnicodeString DOS_DEVICE_NAME);
ntStatus = IoCreateSymboliclink(&devicelinkUnicodeString &deviceNameUnicodeString);
if ( !NT_SUCCESS(ntStatus) )
{
dprintf(“DrvFltIp.SYS: IoCreateSymboliclink failed\n“);
}
//
// Create dispatch points for device control create close.
//
Driverobject->MajorFunction[IRP_MJ_CREATE] =
Driverobject->MajorFunction[IRP_MJ_CLOSE] =
Driverobject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DrvDispatch;
Driverobject->DriverUnload = DrvUnload;
}
if ( !NT_SUCCESS(ntStatus) )
{
dprintf(“Error in in
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4519746 2008-05-29 18:26 Fire Wall 2.4.rar
文件 14058 2008-05-29 02:08 DrvFltIp2\DrvFltIp.c
文件 4823 2008-05-28 22:29 DrvFltIp2\DrvFltIp.dsp
文件 313 2008-05-28 22:29 DrvFltIp2\DrvFltIp.dsw
文件 2894 2008-05-28 22:30 DrvFltIp2\DrvFltIp.h
文件 50176 2008-06-05 17:40 DrvFltIp2\DrvFltIp.ncb
文件 53760 2008-06-05 17:40 DrvFltIp2\DrvFltIp.opt
文件 271 2000-07-26 18:37 DrvFltIp2\makefile
文件 987 2008-05-28 22:29 DrvFltIp2\readme.txt
文件 79 2002-12-21 00:47 DrvFltIp2\sources
目录 0 2008-05-31 00:00 DrvFltIp2\Debug
目录 0 2008-06-05 17:40 DrvFltIp2
----------- --------- ---------- ----- ----
4647107 12
- 上一篇:建立文件数据索引的c 代码
- 下一篇:地固系惯性系坐标转换程序
相关资源
- 耐威网关软件防火墙简易版(附源码
- Hillstone防火墙技术——StoneOS安
- 绿盟下一代防火墙典型部署手册 高清
- juniper 防火墙巡检方案模板
- 某公司PIX 520防火墙系统和NAT的实施
- Cisco PIX 515E防火墙
- Cisco PIX 500系列防火墙产品简介
- Cisco Secure PIX 535防火墙产品简介
- Cisco Secure PIX 515防火墙产品资料
- HP中小企业防火墙产品解决方案
- 山石网科安全网关防火墙SG-6000-X6150技
- 个人防火墙 v3.0 专业版
- 360数据库防火墙产品介绍
- ARP防火墙单机版(64位
- 天融信网络卫士防火墙NGFFW 3000
- 天融信网络卫士防火墙ARES
- HC-ISG系列工业防火墙产品白皮书
- 三零卫士工业防火墙系统技术白皮书
- HCSP 山石防火墙203
- HCSP 山石防火墙202
- HCSP 山石防火墙201
- gns3 pix防火墙 ios
- ASA防火墙实验手册含大量案例
- 启明星辰安全网关USG防火墙操作手册
- Cisco_ASA防火墙图文配置
- Windows防火墙与网络封包截获技术光盘
- 启明星辰防火墙配置手册
- 工业防火墙白皮书
- asa防火墙7.22.k8.bin
- 华为eudemon1000E防火墙web管理
评论
共有 条评论