用c++编写网络流量统计系统

上传者: xiaomiguichu | 上传时间: 2019-12-21 18:57:45 | 文件大小: 54KB | 文件类型: rar
用c++编写一个流量统计系统 为了方便网络编程,90年代初,由Microsoft联合了其他几家公司共同制定了一套WINDOWS下的网络编程接口,即Windows Sockets规范,它不是一种网络协议,而是一套开放的、支持多种协议的Windows下的网络编程接口。本篇论文主要是介绍了在TCP/IP基础上利用winsock2对网卡进行编程,以达到网络流量监测的目的。论文首先介绍了TCP/IP协议,旨在介绍IP,TCP,UDP等比较重要的协议。主要是介绍IP头,TCP头,UDP头的特点,以便从IP头中可以获取源地址,目的地址,协议类型等信息。在随后的章节中提出了Socket的概念,Socket实际上提供了一个通信端口使所有拥有Socket的端口的计算机之间能够相互通信,在本论文中主要说明了socket的建立,监听和撤销的过程。具体到程序实现中,对网卡混杂模式的设置是通过原始套接字(raw socket)来实现的。为了让原始套接字能接受所有的数据,还需要通过将SOCK_RAW设置成SIO_RCVALL。对数据包的获取通过recv()函数来完成。最后要完成的工作就是对所捕获的IP数据包进行分析以提取出我们所需要的信息。在论文的最后是旨在说明进一步工作的展开。 关键字: TCP/IP,Winsock,原始套接字,NetBios

文件下载

资源详情

( 26 个子文件 54KB ) 用c++编写网络流量统计系统
NetTraffic
NetTrafficButton.rc 6.16KB
Globals.h 615B
NetTrafficButtonDlg.cpp 4.80KB
StdAfx.cpp 29B
mftrafficbutton.cpp 14.47KB
resource.h 832B
NetTrafficButton.opt 58.50KB
NetTrafficButton.ncb 153.00KB
MFNetTraffic.h 1.30KB
NetTrafficButton.cpp 943B
MemDC.h 2.14KB
NetTrafficButtonDlg.h 1.15KB
NetTrafficButton.aps 21.45KB
Debug
ReadMe.txt 4.19KB
StdAfx.h 505B
MFNetTraffic.cpp 9.34KB
NetTrafficButton.dsw 585B
NetTrafficButton.plg 2.92KB
NetTrafficButton.dsp 4.63KB
mftrafficbutton.h 2.95KB
NetTrafficButton.clw 1.41KB
res
NetTrafficButton.rc2 432B
NetTrafficButton.ico 1.05KB
MainFrame.ico 1.05KB
NetTrafficButton.h 831B
www.pudn.com.txt 218B
[{"title":"( 26 个子文件 54KB ) 用c++编写网络流量统计系统","children":[{"title":"NetTraffic","children":[{"title":"NetTrafficButton.rc <span style='color:#111;'> 6.16KB </span>","children":null,"spread":false},{"title":"Globals.h <span style='color:#111;'> 615B </span>","children":null,"spread":false},{"title":"NetTrafficButtonDlg.cpp <span style='color:#111;'> 4.80KB </span>","children":null,"spread":false},{"title":"StdAfx.cpp <span style='color:#111;'> 29B </span>","children":null,"spread":false},{"title":"mftrafficbutton.cpp <span style='color:#111;'> 14.47KB </span>","children":null,"spread":false},{"title":"resource.h <span style='color:#111;'> 832B </span>","children":null,"spread":false},{"title":"NetTrafficButton.opt <span style='color:#111;'> 58.50KB </span>","children":null,"spread":false},{"title":"NetTrafficButton.ncb <span style='color:#111;'> 153.00KB </span>","children":null,"spread":false},{"title":"MFNetTraffic.h <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false},{"title":"NetTrafficButton.cpp <span style='color:#111;'> 943B </span>","children":null,"spread":false},{"title":"MemDC.h <span style='color:#111;'> 2.14KB </span>","children":null,"spread":false},{"title":"NetTrafficButtonDlg.h <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false},{"title":"NetTrafficButton.aps <span style='color:#111;'> 21.45KB </span>","children":null,"spread":false},{"title":"Debug","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 4.19KB </span>","children":null,"spread":false},{"title":"StdAfx.h <span style='color:#111;'> 505B </span>","children":null,"spread":false},{"title":"MFNetTraffic.cpp <span style='color:#111;'> 9.34KB </span>","children":null,"spread":false},{"title":"NetTrafficButton.dsw <span style='color:#111;'> 585B </span>","children":null,"spread":false},{"title":"NetTrafficButton.plg <span style='color:#111;'> 2.92KB </span>","children":null,"spread":false},{"title":"NetTrafficButton.dsp <span style='color:#111;'> 4.63KB </span>","children":null,"spread":false},{"title":"mftrafficbutton.h <span style='color:#111;'> 2.95KB </span>","children":null,"spread":false},{"title":"NetTrafficButton.clw <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"NetTrafficButton.rc2 <span style='color:#111;'> 432B </span>","children":null,"spread":false},{"title":"NetTrafficButton.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"MainFrame.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false}],"spread":false},{"title":"NetTrafficButton.h <span style='color:#111;'> 831B </span>","children":null,"spread":false}],"spread":false},{"title":"www.pudn.com.txt <span style='color:#111;'> 218B </span>","children":null,"spread":false}],"spread":true}]

评论信息

  • 博博客 :
    各位大神 具体怎么运行这个程序呀?
    2019-04-07
  • Icaxwu :
    还不错,就是“贵”了点
    2016-12-26
  • ltl1994 :
    还行,虽然简单了点,但对学习也有帮助
    2016-06-08
  • csdndatura :
    编译通不过 ,缺少头文件
    2015-06-15
  • qq_23916901 :
    不错的小程序,可以用来学习
    2015-04-02

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明
服务器状态检查中...