NDIS resources

sniffer技术原理及应用,包括编程方法和工具使用 首先,我今天来是做广告的哦:)很久没有更新专栏了,关键是写不出什么好东西,也怕大家见笑!虽然我还没被人骂过,但我见过别人被人骂,哎。不是说,这在csdn好像很正常哈!今天把这个贴子整理一下,这本是专题开发版的一个专题讨论贴:http://expert.csdn.net/Expert/topic/2333/2333459.xml?temp=.3382532,其实这个贴子也没有挖出更深入的东西,关键是 阅读详情
NDIS resources
[ 1] Simple NDIS Hooking Based Firewall for NT4/2000
   http://ntdev.h1.ru/ndis_fw.html
   http://ntdev.h1.ru/ndis_fw.zip

[ 2] Simple TDI-Based Open Source Personal Firewall for Windows NT4/2000/XP/2003
   http://sourceforge.net/projects/tdifw
   http://optusnet.dl.sourceforge.n ... ifw/tdifw-1.3.2.zip

[ 3] http://dream.net9.org/~driver/restrict/PCAUSA/pcausa.zip(非最新版)

[ 4] Firewall for Windows 9x/ME/NT/2000/XP - Vadim V.Smirnov
   http://www.ntkernel.com/articles/firewalleng.shtml

[ 5] How to implement a Firewall-Hook Driver(cool and undocumented)
   http://www.codeproject.com/internet/FwHookDrv.asp
   http://www.codeproject.com/internet/FwHookDrv/FwHookDrv_src.zip

[ 6] Windows Network Data And Packet Filtering Frequently Asked Questions(这里有一张Network Architecture Diagram)
   http://www.pcausa.com/resources/winpktfilter.htm

[ 7] Network Architecture in Windows NT-based Operating Systems
   http://plasmic.com/~vizzini/ntnetarch.html

[ 8] Ntpacket.exe: Updated Windows NT 4.0 NDIS 3.0 Packet Sample Available
   http://support.microsoft.com/default.aspx?scid=kb;EN-US;238652
   ftp://ftp.microsoft.com/Softlib/MSLFILES/Ntpacket.exe

  Bugs in the NT DDK Packet Protocol Driver Sample
   http://www.panix.com/~perin/packetbugs.html

[ 9] EthernetSpy
   http://telemat.det.unifi.it/book/EthernetSpy/EthernetSpy.zip

[10] BriProto NDIS Protocol Driver Project Files
   http://adaptive4.ucsd.edu/projec ... 2003.08.01.1218.zip
   http://adaptive4.ucsd.edu/projects/briproto_driver/doc/

[11] A RARP Server(source code)
   http://www.panix.com/~perin/rarpd.zip

[12] NDIS "Packet" Discussion(介绍了NDIS_PACKET、NDIS_BUFFER)
   http://www.pcausa.com/resources/ndispacket.htm
   http://www.pcausa.com/resources/ndispacket_decode.htm
   http://www.pcausa.com/resources/readonpacket.htm

  NDIS_PACKET Discussion Part 2 - NDIS_PACKET Reserved Areas
   http://www.ndis.com/papers/ndispacket/ndispacket2.htm

[13] Workaround To Circumvent ProtocolReceive Faults Caused By Some Faulty NDIS Miniport Drivers
   http://www.pcausa.com/support/KB03080201.htm

[14] Conditions Needed For ReceivePacketHandler To Be Called
   http://www.pcausa.com/support/KB07130001.htm

[15] http://www.rhyshaden.com/ethernet.htm(介绍了802.1p的帧格式)

[16] NDIS Driver Compile Flags - Stephan Wolf[2004-03-15]
   http://www.wd-3.com/031504/NDISCompile.htm

[17] KNOWLEDGE BASE LINKS STOP MESSAGES(理解BSOD)
   http://aumha.org/win5/kbestop.htm

[18] Stop 0x0000000A or IRQL_NOT_LESS_OR_EQUAL(介绍了Stop Message的四个参数)
   http://www.microsoft.com/resourc ... s/prmd_stp_hwpg.asp

[19] Kernel Driver Frequestly Asked Questions (FAQ)
   http://www.osronline.com/custom. ... rint.cfm&id=256

[20] INFO: Network Binding Analysis
   http://support.microsoft.com/default.aspx?scid=kb;en-us;192483

[21] Windows 2000 Filter-Hook Driver example
   http://ntdev.h1.ru/ipfilter.html
   http://ntdev.h1.ru/ipfilter_src.html

[22] 用VC开发Win2000/XP下的防火墙
   http://computer.sz.net.cn/2004-05-17/nw2004051700070.shtml
   http://computer.sz.net.cn/2004-05-17/nw2004051700071.shtml
   http://computer.sz.net.cn/2004-05-17/nw2004051700072.shtml
   http://dl2.mydown.com/code/more/DrvFltIp_FirewallFHK.rar

[23] Simple Packet Filtering Firewall - Deepthi Reddy, Ramya Balakumar, Vandana Bhardwaj
   http://www.csc.villanova.edu/~vbhardwa/netclass/firewall.ppt
   http://www.sju.edu/~vb189802/computerNet/fire.zip(source code)

  Simple packet Filter Firewall
   http://www.csc.villanova.edu/~vbhardwa/netclass/Firewall.htm

[24] Developing Firewalls for Windows 2000/XP
   http://www.codeproject.com/internet/drvfltip.asp
   http://www.codeproject.com/internet/drvfltip/FirewallFHK_src.zip
   http://www.codeproject.com/internet/drvfltip/DrvFltIp_source.zip

[25] Simple Packet - Filter Firewall
   http://www.codeproject.com/internet/smfirewall.asp
   http://www.codeproject.com/internet/smfirewall/fire.zip

[26] Hollis Technology Solutions IpHook Version 1 Release
   http://www.hollistech.com/Resources/IpHook/Release%20Notes.htm
   http://www.hollistech.com/Resources/IpHook/IpHook.msi(source code)

[27] An Easy Firewall Application - [2003-10-06]
   http://www.codeproject.com/tools/firewallpapi.asp
   http://www.codeproject.com/tools/firewallpapi/firewallpapisrc.zip
   http://www.codeproject.com/tools/firewallpapi/firewallpapi.zip

[28] NetCenturion is a TCP/IP packet filter for Windows 2000 and XP
   http://www.softsystem.co.uk/page5.html
   http://www.softsystem.co.uk/NetCenturion1204.zip
   http://www.softsystem.co.uk/NetCenturion1204src.zip

[29] Extending The Microsoft PassThru NDIS Intermediate Driver - Thomas F. Divine < wd-3.tdivine@pcausa.com> [2003-07-15]
  Part 1 Adding a DeviceIoControl Interface
   http://www.wd-3.com/archive/ExtendingPassthru.htm
   http://www.wd-3.com/downloads/ExtendingPassthru.zip

  Extending The Microsoft PassThru NDIS Intermediate Driver - James Antognini < antognini@mindspring.com> Thomas F. Divine < wd-3.tdivine@pcausa.com> [2003-12-15]
  Part 2 Two IP Address Blocking NDIS IM Drivers
   http://www.wd-3.com/archive/ExtendingPassthru2.htm
   http://www.wd-3.com/downloads/PassThru2.zip

[30] NDIS Driver Debugging Guidelines - [2003-05-05]
   http://www.microsoft.com/taiwan/ ... NDIS/ndisdebug.mspx
   http://download.microsoft.com/do ... /ndisWinHec2003.doc
  (用kd调试)

  Debugging NDIS Drivers
   http://msdn.microsoft.com/librar ... .xml.asp?frame=true

  NDIS Debug Tracing and Kernel Debugger Extensions - [2003-11-20]
   http://support.microsoft.com/kb/q248413/

  How to enable NDIS debug tracing - [2005-08-09]
   http://support.microsoft.com/kb/q164459/

  如何启用和使用NDIS验证程序 - [2005-12-23]
   http://support.microsoft.com/kb/q266403/

[31] Porting Miniport Drivers to NDIS 6.0 - [2005-04-19]
   http://www.microsoft.com/taiwan/ ... S/NDIS6drvport.mspx
   http://download.microsoft.com/do ... e6/NDIS6drvport.doc

[32] 基于PassThru的NDIS中间层驱动程序扩展 - Addylee < Addylee2004@163.com> [2006-05-02]
   http://www.xfocus.net/articles/200605/865.html

[33] PCAUSA Discussion List
   http://groups.yahoo.com/group/discussion-pcausa/

[34] Controlling Stacking Order of NDIS 5.0 Intermediate Drivers - [2003-12-17]
   http://support.microsoft.com/kb/250615

[35] NAT在NDIS中间层驱动中的实现 - thinking < thinkingfh@163.com> [2006-06-17]
   http://www.xfocus.net/articles/200606/870.html

[36] Raw Ethernet Packet Sending - miahrugger [2003-10-25]
   http://www.codeproject.com/cs/internet/sendrawpacket.asp
   http://www.codeproject.com/cs/in ... t/SendRawPacket.zip
  (用到了NDIS Protocol Driver)
深入解析NDIS接收标志的处理 摘要:本文探讨了NDIS网络驱动程序中接收标志的处理方法,重点分析了FilterReceiveNetBufferLists函数的标志位使用。内容包括NDIS接收标志的作用(如SINGLE_ETHER_TYPE、PERFECT_FILTERED等),这些标志作为可选性能优化而非强制要求。文章提供了错误处理建议和函数实现示例,强调保持数据包返回顺序的重要性,并指出NDIS对非重入性的保证。通过理解这些标志的合理使用,可确保网络数据包的正确处理和系统稳定运行。(150字) 阅读详情

相关推荐

完整的防火墙程序源代码

DrvFltIp_source.zip 是驱动的源代码与简单的防火墙程序代码 FirewallFHK_src.zip 是利用该驱动程序开发的一个比较完整的防火墙程序代码

Windows内核技术的精华站点

 Web站点: http://www.osronline.com,技术含量很高的Windows驱动开发站点,该站点的list基本上覆盖了所有Windows驱动开发的常见问题,强烈推荐; http://www.microsoft.com/whdc,微软的驱动开发资源主页,可以获取很多官方资料; http://www.wd-3.com/,该站点收集了一些比较好的Windows驱动开发方面的文章和示例代

849

PCAUSA Test TCP (PCATTCP)

PCAUSA Test TCP (PCATTCP) Release Notes Printing Communications Associates, Inc. 4201 Brunswick Court Smyrna, GA 30080 USA TEL: (770) 432-4580 FAX: (770) 436-7246 E-Mail: tdivine@pcausa.com ====================================================================== Component Part No.: N/A Component Name : PCAUSA Test TCP (PCATTCP) ====================================================================== Component Version : 2.01.01.11 Release Date : February 4, 2010 1.) Now flush stderr/stdout for all exit paths. ====================================================================== Component Version : 2.01.01.10 Release Date : November 3, 2009 1.) Added new -a option to specifiy local host IP address. 2.) Now built using Visual Studio 2008 (for better or worse...). ====================================================================== Component Version : 2.01.01.07 Release Date : November 23, 2003 1.) Incorporated fix identified by Clarkson University that reduces hangs when ending the UDP transmitter test. See additional comments in TTCP_TransmitUDP module. ====================================================================== Component Version : 2.01.01.06 Release Date : April 5, 2003 1.) Fixed minor bug in TTCP transmitter. PCAUSA PCATTCP preamble was not inserted correctly when building transmit buffer. ====================================================================== Component Version : 2.01.01.05 Release Date : May 31, 2002 1.) Modification to allow SO_RVCBUF and SO_SNDBUF values of zero(0) to be handled. Original implementation did not set these options if their value was zero. 2.) Added -w write delay option. ====================================================================== Component Version : 2.01.01.04 Release Date : May 30, 2002 1.) Minor fix to test exit routines. ====================================================================== Component Version : 2.01.01.03 Release Date : May 29, 2002 Externally Visible Differences ------------------------------ 1.) Added -c "continuous" option: -c -t: send continuously -r: accept multiple connections sequentially 1.) Added -R multi-threaded concurrent TCP/UDP receiver option. 2.) Fixed error codes. Now fetch using WSAGetLastError instead of perror. The latter did not handle socket errors. 3.) Revised test output messages. 4.) New PCATTCP.chm HtmlHelp documentation. Implementation Differences -------------------------- Extensive rework to suit author's style. ====================================================================== Component Version : 1.00.00.02 Release Date : January, 2000 Fix setting of setsockopt call for TCP_NODELAY. ====================================================================== Component Version : 1.00.00.01 Release Date : April, 1999 Initial release of PCAUSA's port of TTCP to Windows.

【转帖】NDIS_PACKET结构讨论

 [翻译][NDIS]NDIS_PACKET结构讨论[一] 译者:feikoo 作者:NDIS.com 日期:2006-4-3 这篇文章的目的是探讨一下在网络上截取的包(如IP包)与在NDIS驱动中代表相同内容的NDIS_PACKET之间的关系。 标准化组织:我们经常在新闻组上看到如下的内容:         1.微软的开发文档是如何描述Window2000网络

floweronwarmbed的专栏 2241

TDI驱动编程实例,完整的PCAUSA样本,包括各种内核模式TDI代码,TDI过滤器

TDI驱动编程实例,完整的PCAUSA样本,包括各种内核模式TDI代码,TDI过滤器_重定向和NDIS filters.完成PCAUSA样本,包括variou TDI的内核模式代码。 TDI过滤器_重定向和NDIS过滤器。.rar

STM32中断实战:用ITR9606红外传感器DIY转速计数器(附完整代码)

本文详细介绍了如何使用STM32中断机制和ITR9606红外传感器DIY高精度转速计数器。从传感器选型、中断配置到抗干扰设计,提供完整的实战指南和优化代码,特别适合嵌入式开发者和硬件工程师快速实现工业级转速检测系统。

weixin_29159613的博客 307

NDIS Filter Drivers指南

NDIS Filter Drivers 译者序  本文是根据DDK中相关章节翻译,本人英语水有限文中难免有翻译及写的不当之处,如 果有任何问题可以通LZIOG@163.com邮件联系和交流。 1 介绍NDIS Filter Drivers ilter Drivers提供了针对微端口驱动(Miniport Drivers)的过滤服务(filtering service),

zhulianhai0927的专栏 6289

UDS $27服务DLL文件生成

UDS 27算法 DLL文件生成

hkj8808的博客 1289

NDIS中间层的驱动包截获技术教程

<br /><br /><br />NDIS(Network Driver Interface Specification)是网络驱动程序接口规范的简称。它横跨传输层、网络层和数据链路层,定义了网卡或网卡驱动程序与上层协议驱动程序之间的通信接口规范,屏蔽了底层物理硬件的不同,使上层的协议驱动程序可以和底层任何型号的网卡通信。NDIS为网络驱动程序创建了一个完整的开发环境,只需调用NDIS函数,而不用考虑操作系统的内核以及与其他驱动程序的接口问题,从而使得网络驱动程序可以从与操作系统的复杂通讯中分离,极大地方

yxyhack's blog 9105

光学仿真案例(4) 基于纳米微粒激发平面波的米氏散射FDTD仿真模拟

本案例展示了一个基于纳米粒子激发平面波的米氏散射仿真模型(mie scattering),计算其散射和吸收截面、局域场增强和远场散射分布,同时将截面和远场结果与解析解进行了比较,验证了仿真模拟的准确性。

q895235273的博客 3604

Camera tuning flow相机调试流程

相机调试流程分为三大模块:ProcessRaw处理原始数据(黑电平校正、阴影校正),3A实现自动控制(曝光/对焦/白平衡),ISP进行图像精加工(伽马校正、锐化降噪、色彩处理)。三个阶段环环相扣,前阶段为后阶段提供基础,最终输出画质优良且风格化的图像。

weixin_64706696的博客 1232

NDIS Filter开发-Filter启动、暂停和绕过

NDIS Filter驱动的绕过模式

王马的博客 1495

ROS学习【11】-----基于ubuntu16.04上Gazebo机器人环境搭建的传感器仿真(camera、kinect、Lidar),并通过Rviz进行数据显示

ROS学习-----基于ubuntu16.04上Gazebo机器人环境搭建的传感器仿真目录一、Gazebo环境搭建前的准备1、将搭建模型下载到我们的gazebo环境下2、升级我们的gazebo版本二、创建配置launch文件参数的world文件1、进入工程包mbot_gazebo2、创建文件夹worlds3、进入该文件夹4、创建playground.world文件5、创建room.world文件三...

qq_42451251的博客 3613

NDIS协议驱动学习三——协议与网卡的绑定

协议与网卡的绑定 协议与网卡之间的绑定和之前章节中设备对象之间的绑定不同 一般来说协议和网卡的绑定不是一对一的,而是一对多的,同一个协议是会在同一台主机的所有网卡生效。当然一张网卡也可以绑定不同的多个协议,但是实际上这是没有任何意义的,因为一般来说一个数据包只会被一个协议处理。 这一节我们的主要学习对象是以下两个回调函数 protocolChar.BindAdapterHandler = NdisProtBindAdapter; protocolChar.UnbindAdapterHandler

苞米地里捉小鸡的博客 1154

Zemax实战录——非序列模式下的微透镜阵列仿真与优化

本文详细介绍了在Zemax非序列模式下进行微透镜阵列仿真的完整流程与优化技巧。文章重点阐述了从序列模式切换到非序列模式的必要性,并逐步指导如何搭建光源、阵列与探测器的仿真环境。核心在于通过调整圆锥系数等关键参数优化像差,并增加光线数以提升仿真精度与均匀性,为光学设计提供可靠依据。

weixin_28339967的博客 543

YOLOv11改进 | 注意力篇 | YOLOv11引入CA注意力机制

摘要:最近关于移动网络设计的研究已经证明了通道注意力(例如,挤压和激励注意力)对于提升模型性能的显着有效性,但它们通常忽略了位置信息,而位置信息对于生成空间选择性注意力图很重要。到此本文的正式分享内容就结束了,在这里给大家推荐我的YOLOv11改进有效涨点专栏,本专栏目前为新开的,后期我会根据各种前沿顶会进行论文复现,也会对一些老的改进机制进行补充,如果大家觉得本文帮助到你了,订阅本专栏,关注后续更多的更新~3.2 在Extramodule里创建CA。在CA.py文件里添加给出的CA代码。

tsg6698的博客 2992

Windows Miniport驱动在接收过程中出现的黑屏问题

对于NDIS miniport驱动而言,在完成了初始化历程之后,最关键的两个部分就是接收函数和发送函数。在windows环境之下,一般采用硬件中断的方式进行数据的接收。即,硬件在接收到数据之后,发起一个硬件中断,驱动在ISR中确认中断,并在Dpc中完成对数据的接收拷贝。在驱动的开发过程中,出现了一个非常让人困惑的问题,即,在接收过程中会出现黑屏现象。一般来讲,黑屏的产生多是对内存的读写出现了问题。在

fjq1992的博客 968

SCADA|用KingSCADA实现设备台账的查询功能

以上为用KingSCADA实现设备台账的查询功能,另外还有一些细节功能,比如当点击增加按钮时弹出的信息窗口内的信息希望是在选中的某行信息,只要找到差不多的设备,修改个别参数即可,避免增加时弹出空白页,所有信息都需要填写。以上为实现设备台账查询的最简单实现,实际项目中可能会更复杂,你做过哪些设备台账或相关的功能,有比较好的创意或高难度功能方法,欢迎在留言区评论,或在交流群探讨,互通有无,共同进步。首先完成界面的组态工作,主要是通过查询按钮,查询SQLServer数据库的设备台账数据,然后填充到报表内。

做有价值的事,积累有价值的笔记! 487

FilterAttach中分配NetBufferListPool

// // Allocate UserSendNetBufferListPool // NdisZeroMemory(&amp;PoolParameters, sizeof(NET_BUFFER_LIST_POOL_PARAMETERS)); PoolParameters.Header.Type = NDIS_OBJECT_TYP...

※一路风尘※ 456

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

NDIS接收网络数据

辛苦翻译,可以转载,注明来源即可!如有错误之处望留言指出,谢谢了! Receiving Network Data 接收网络数据 The following figure illustrates a basic receive operation, which involves a miniport driver, NDIS, and a pr

yw1621的专栏 3115

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

NDIS_STATUS类型介绍

NDIS_STATUS contains the constants specifies the status of the NDIS request. Syntax:const NDIS_STATUS_SUCCESS = $00000000; const NDIS_STATUS_NOT_RECOGNIZED = $00010001;...

weixin_33841722的博客 596

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

解析NDIS包描述符和缓冲区描述符---发送与接收数据的获取和处理

解析NDIS包描述符和缓冲区描述符 /////////////////////////////////////////////////////////////////////////////////////////////// 解析数据包: (1)获取包描述符信息 VOID NdisGetFirstBufferFromPacket(   IN PNDIS_PACKET Packe

World-wang 865

NDIS学习笔记二——(模拟丢包)

今天本来想发篇正式点的BLOG,没想到没有保存住, 以后word打开不敢随便关闭啥提示了。 以下是网络上的文章的摘录,但已经能反应整个的思路过程。 NDIS驱动结构简介 其中,最上层是一个NDIS Protocol Driver,它向上提供一个Transport Driver Interface(TDI),向下通过NDIS接口与下面的NDIS中间层的上边界交互,NDIS中间...

weixin_30340617的博客 193
上一篇: Cross Frame Script (跨框架脚本) 攻击
下一篇: 关于解决应用层提取NDIS驱动数据包丢包的方案,通过event加共享内存实现
iiprogram
博客等级 码龄25年 1068粉丝 1515原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址