文件名称:Ethernet
- 所属分类:
- Internet/网络编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 2.64mb
- 下载次数:
- 0次
- 提 供 者:
- liq***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
模拟Ethernet帧的发送过程
编写程序模拟Ethernet结点的数据发送流程。
1) 用两个线程a和b来模拟Ethernet上的两台主机。
2) 用一个双字类型变量Bus来模拟总线(将其初始化为“\0”,并且总线等于“\0”时表示总线空闲)。
3) 两个子线程向总线发送自己的数据。数据用该线程的线程号进行模拟,发送数据用线程号和Bus的“或”操作进行模拟(即Bus=Bus|ID,ID为该线程的线程号)。
4) 每台主机须向总线上成功发送10次数据,如果其中某次数据发送失败,则该线程结束。
5) 发送流程须遵循CSMA\CD。随机延迟算法中的冲突窗口取0.005。在数据发送成功(即Bus==ID)后,报告“ID send success”,产生冲突(即Bus!=ID)后报告“ID send conllision”,发送失败(即冲突计数器值为0)后报告“ID send failure”。随着主机成功次数增加,报告其已发送成功的次数,如“主机A发送成功数=3”。
Ethernet的核心技术是随机争用型介质访问方法,即带有冲突检测的载波侦听多路访问(CSMA/CD)方法。-Ethernet fr a mes sent during simulation
Analog programming to send Ethernet data flow node.
1) a and b with two threads to simulate the two hosts on the Ethernet.
2) a double word type variable Bus to simulate the bus (to be initialized to "\ 0", and the bus is equal to "\ 0" that the bus is idle).
3) two sub-threads to send their data to the bus. Data with the number of threads to simulate the thread, send data with the thread number and the Bus "or" operations simulation (ie, Bus = Bus | ID, ID number of threads for the thread).
4) each host on the bus are required to successfully transmit data 10 times, if one of a particular data transmission fails, the thread ends.
5) to send the process to be followed by CSMA \ CD. Random delay algorithm to take 0.005 in the conflict window. The data is sent successfully (ie, Bus == ID), the report "ID send success", conflict (ie Bus! = ID) after the report "ID send conllision", sending fails (ie, conflict counter value is 0) after the
编写程序模拟Ethernet结点的数据发送流程。
1) 用两个线程a和b来模拟Ethernet上的两台主机。
2) 用一个双字类型变量Bus来模拟总线(将其初始化为“\0”,并且总线等于“\0”时表示总线空闲)。
3) 两个子线程向总线发送自己的数据。数据用该线程的线程号进行模拟,发送数据用线程号和Bus的“或”操作进行模拟(即Bus=Bus|ID,ID为该线程的线程号)。
4) 每台主机须向总线上成功发送10次数据,如果其中某次数据发送失败,则该线程结束。
5) 发送流程须遵循CSMA\CD。随机延迟算法中的冲突窗口取0.005。在数据发送成功(即Bus==ID)后,报告“ID send success”,产生冲突(即Bus!=ID)后报告“ID send conllision”,发送失败(即冲突计数器值为0)后报告“ID send failure”。随着主机成功次数增加,报告其已发送成功的次数,如“主机A发送成功数=3”。
Ethernet的核心技术是随机争用型介质访问方法,即带有冲突检测的载波侦听多路访问(CSMA/CD)方法。-Ethernet fr a mes sent during simulation
Analog programming to send Ethernet data flow node.
1) a and b with two threads to simulate the two hosts on the Ethernet.
2) a double word type variable Bus to simulate the bus (to be initialized to "\ 0", and the bus is equal to "\ 0" that the bus is idle).
3) two sub-threads to send their data to the bus. Data with the number of threads to simulate the thread, send data with the thread number and the Bus "or" operations simulation (ie, Bus = Bus | ID, ID number of threads for the thread).
4) each host on the bus are required to successfully transmit data 10 times, if one of a particular data transmission fails, the thread ends.
5) to send the process to be followed by CSMA \ CD. Random delay algorithm to take 0.005 in the conflict window. The data is sent successfully (ie, Bus == ID), the report "ID send success", conflict (ie Bus! = ID) after the report "ID send conllision", sending fails (ie, conflict counter value is 0) after the
(系统自动生成,下载前可以参看下载内容)
下载文件列表
模拟Ethernet帧的发送过程
........................\LQ
........................\..\Debug
........................\..\.....\LQ.exe
........................\..\.....\LQ.ilk
........................\..\.....\LQ.obj
........................\..\.....\LQ.pch
........................\..\.....\LQ.pdb
........................\..\.....\LQ.res
........................\..\.....\StdAfx.obj
........................\..\.....\vc60.idb
........................\..\.....\vc60.pdb
........................\..\LQ.APS
........................\..\LQ.clw
........................\..\LQ.cpp
........................\..\LQ.dsp
........................\..\LQ.dsw
........................\..\LQ.h
........................\..\LQ.ncb
........................\..\LQ.opt
........................\..\LQ.plg
........................\..\LQ.rc
........................\..\ReadMe.txt
........................\..\Resource.h
........................\..\StdAfx.cpp
........................\..\StdAfx.h
........................\LQ
........................\..\Debug
........................\..\.....\LQ.exe
........................\..\.....\LQ.ilk
........................\..\.....\LQ.obj
........................\..\.....\LQ.pch
........................\..\.....\LQ.pdb
........................\..\.....\LQ.res
........................\..\.....\StdAfx.obj
........................\..\.....\vc60.idb
........................\..\.....\vc60.pdb
........................\..\LQ.APS
........................\..\LQ.clw
........................\..\LQ.cpp
........................\..\LQ.dsp
........................\..\LQ.dsw
........................\..\LQ.h
........................\..\LQ.ncb
........................\..\LQ.opt
........................\..\LQ.plg
........................\..\LQ.rc
........................\..\ReadMe.txt
........................\..\Resource.h
........................\..\StdAfx.cpp
........................\..\StdAfx.h