<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0065)http://www.tamirgal.com/home/PageView.aspx?Item=SharpPcapTutorial -->
<HTML dir=ltr><HEAD><TITLE>SharpPcap tutorial: a step by step guide to using SharpPcap</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<STYLE type=text/css>BODY {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
P {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
H1 {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
H2 {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
H3 {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
H4 {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
H5 {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
H6 {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
LI {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
TD {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
TH {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
DD {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
DT {
FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif
}
BODY {
FONT-WEIGHT: 100; FONT-SIZE: 12px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
P {
FONT-WEIGHT: 100; FONT-SIZE: 12px; WIDTH: 92%; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
H3 {
FONT-WEIGHT: bold; FONT-SIZE: 18px
}
H4 {
FONT-WEIGHT: bold; FONT-SIZE: 16px
}
H5 {
FONT-WEIGHT: bold; FONT-SIZE: 10px
}
DIV#CodeBlock {
BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 3pt; BORDER-TOP: black 1px solid; PADDING-LEFT: 3pt; PADDING-BOTTOM: 3pt; FONT: 9pt "Courier New", Courier, mono; BORDER-LEFT: black 1px solid; WIDTH: 90%; PADDING-TOP: 3pt; BORDER-BOTTOM: black 1px solid; WHITE-SPACE: pre
}
BODY {
MARGIN: 0px
}
.style3 {
FONT-WEIGHT: 100; FONT-SIZE: 12px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
A.style3:link {
TEXT-DECORATION: none
}
A.style3:hover {
TEXT-DECORATION: underline
}
.fixlink {
FONT-WEIGHT: 100; FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
A.fixlink:link {
TEXT-DECORATION: none
}
A.fixlink:hover {
TEXT-DECORATION: underline
}
.small {
FONT-WEIGHT: 100; FONT-SIZE: 10px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.small_pad {
PADDING-LEFT: 25px; FONT-WEIGHT: 100; FONT-SIZE: 10px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.menu {
FONT-WEIGHT: 100; FONT-SIZE: 12px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
A.menu {
COLOR: #0000cc; TEXT-DECORATION: none
}
A.menu:hover {
TEXT-DECORATION: underline
}
A.menu:visited {
COLOR: #0000cc
}
A:link {
TEXT-DECORATION: none
}
A:visited {
TEXT-DECORATION: none
}
A:active {
TEXT-DECORATION: underline
}
A:hover {
TEXT-DECORATION: underline
}
.navtable {
BORDER-RIGHT: black 1px dashed; PADDING-RIGHT: 10px; PADDING-LEFT: 10px
}
.table {
PADDING-RIGHT: 10px; PADDING-LEFT: 10px
}
.packages {
PADDING-RIGHT: 10px; BORDER-TOP: black 1px dashed; PADDING-LEFT: 10px
}
.style5 {
FONT-WEIGHT: bold; FONT-SIZE: 18px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.style7 {
FONT-SIZE: 12px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.textsm {
FONT-SIZE: 14px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.textbg {
FONT-SIZE: 20px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.textreg {
FONT-SIZE: 12px; COLOR: #979797; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.counter {
FONT-SIZE: 10px; COLOR: #979797; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-ALIGN: center
}
DIV#menupanel {
BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: black 1px solid; PADDING-LEFT: 5px; BACKGROUND: #ffcc33; FLOAT: left; PADDING-BOTTOM: 10px; BORDER-LEFT: black 1px solid; PADDING-TOP: 10px; BORDER-BOTTOM: black 1px solid
}
</STYLE>
<META content="MSHTML 6.00.6000.16640" name=GENERATOR></HEAD>
<BODY>
<TABLE style="BACKGROUND-IMAGE: url(images/bg.gif)" cellSpacing=0 cellPadding=0
width="100%" border=0>
<TBODY>
<TR>
<TH vAlign=top scope=col width="50%" height=85>
<DIV align=left><IMG alt="tamirgal.com logo"
src="SharpPcap%20tutorial%20a%20step%20by%20step%20guide%20to%20using%20SharpPcap_files/logo.gif"
align=top></DIV></TH></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=navtable vAlign=top><BR><BR>
<DIV id=menupanel>
<P class=menu align=left><STRONG>tamirgal.com</STRONG><BR><A class=menu
href="http://www.tamirgal.com/home/default.aspx">Home</A><BR><A class=menu
href="http://www.tamirgal.com/home/dev.aspx">Programming</A><BR><A
class=menu
href="http://www.tamirgal.com/home/gallery.aspx">Gallery</A><BR><A
class=menu
href="http://www.tamirgal.com/home/links.aspx">Links</A><BR></P></DIV></TD>
<TD class=table vAlign=top width=1131><BR><BR>
<H2>SharpPcap tutorial: a step by step guide to using SharpPcap</H2>
<P>The text of this tutorial is taken directly from WinPcap's <A
href="http://www.winpcap.org/docs/docs31/html/group__wpcap__tut.html">official
tutorial </A>but is modified to show the C# use of the SharpPcap library.
All examples can be downloaded together with SharpPcap source code from <A
href="http://www.tamirgal.com/home/dev.aspx?Item=SharpPcap">SharpPcap</A>
's homepage. The WinPcap library must be installed before attempting to
run any of these examples, so please download and install the latest
version from <A
href="http://www.winpcap.org/install/default.htm">WinPcap's download
page</A>.</P>
<P>SharpPcap was written and tested using .NET v1.1 and Windows 2000/XP. I
have no idea about other .NET and Windows versions. If you do try it,
please report your results.</P>
<P>The following topics are covered in this tutorial:</P>
<OL>
<LI><A
href="http://www.tamirgal.com/home/PageView.aspx?Item=SharpPcapTutorial#ifList">Obtaining
the device list</A>
<LI><A
href="http://www.tamirgal.com/home/PageView.aspx?Item=SharpPcapTutorial#ifListAdv">Obtaining
advanced information about installed devices </A>
<LI><A
href="http://www.tamirgal.com/home/PageView.aspx?Item=SharpPcapTutorial#basicCap">Opening
an adapter and capturing packets</A>
<LI><A
href="http://www.tamirgal.com/home/PageView.aspx?Item=SharpPcapTutorial#basicCapNoCallback">Capturing
packets without the event handler</A>
<LI><A
href="http://www.tamirgal.com/home/PageView.aspx?Item=SharpPcapTutorial#filter">Filtering
the traffic</A>
<LI><A
href="http://www.tamirgal.com/home/PageView.aspx?Item=SharpPcapTutorial#dumpTCP">Interpreting
the packets</A>
<LI><A
href="http://www.tamirgal.com/home/PageView.aspx?Item=SharpPcapTutorial#offline">Handling
offline dump files</A>
<LI><A
href="http://www.tamirgal.com/home/PageView.aspx?Item=SharpPcapTutorial#sendPackets">Sending
Packets</A>
<LI><A
href="http://www.tamirgal.com/home/PageView.aspx?Item=SharpPcapTutorial#statistics">Gathering
Statistics on the network traffic</A> </LI></OL>
<H3 id=ifList>1. Obtaining the device list </H3>
<P>Typically, the first thing that a WinPcap-based application does is get
a list of attached network adapters. SharpPcap provide the
<CODE>GetAllDevices()</CODE> function for
c#版winpcap
5星 · 超过95%的资源 需积分: 5 177 浏览量
2010-08-22
11:17:11
上传
评论 8
收藏 481KB RAR 举报
ftxk2010
- 粉丝: 0
- 资源: 4
最新资源
- 毕业设计基于python矩阵分解的推荐算法研究源码+详细文档+全部数据资料 高分项目.zip
- 基于网络的入侵检测系统源码+数据集+详细文档(高分毕业设计).zip
- 微信小程序源码 旅行故事分享 - 面包旅行App界面设计与文本展示资源下载
- 微信小程序源码 创意互动游戏 - 你画我猜App下载
- 摸底考试_学生版20230305.py
- 课程设计基于FPGA数字钟课程设计源码+课设报告(95分以上).zip
- 基于Java的企业家申报系统设计源码
- Cesium案例,集成各种模型,推演,各种Cesium效果
- 基于Python的Struts2全漏洞扫描利用工具设计源码
- python朴素贝叶斯(Naive Bayes)算法,机器算法
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
- 3
- 4
- 5
- 6
前往页