网络课程设计:实现Ethernet帧的发送过程模拟程序模拟

上传者: demonmoonlzp | 上传时间: 2021-06-30 11:09:53 | 文件大小: 2.03MB | 文件类型: RAR
编写程序,实现Ethernet帧的发送过程模拟程序模拟: 1.用N个线程Ti (0<=i<=N)模拟Ethernet上的N台主机。 2.用一个变量Bus来模拟总线(将其初始化为”\0”,Bus等于”\0”时表示总线空闲)。 3.多个子线程向总线发送自己的数据。数据用该线程的线程号进行模拟,发送数据用线程号和Bus的“或”操作进行模拟(即Bus=Bus|ID,ID为该线程的线程号)。 4.每台主机必须在总线上发送成功10次数据,如果其中某次数据发送失败,则该线程结束。 5.发送流程必须遵循CSMA/CD。随机延迟算法中的冲突窗口取0.005。在数据发送成功(即Bus= =ID)后,报告“ID send success”,产生冲突(即Bus!=ID)后报告“ID send collision”,发送失败(即冲突计数器值为0)后报告“ID send failure”。随着主机发送次数增加,报告其已经发送成功的次数,如“主机A发送成功数=3”。 含源代码和可执行文件

文件下载

资源详情

[{"title":"( 42 个子文件 2.03MB ) 网络课程设计:实现Ethernet帧的发送过程模拟程序模拟","children":[{"title":"2120100365_靳星_第一次作业","children":[{"title":"可执行程序","children":[{"title":"多线程模拟发送","children":[{"title":"input2 <span style='color:#111;'> 397B </span>","children":null,"spread":false},{"title":"input1 <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"EthernetFrame.exe <span style='color:#111;'> 632.11KB </span>","children":null,"spread":false}],"spread":true},{"title":"单线程模拟发送","children":[{"title":"input2 <span style='color:#111;'> 397B </span>","children":null,"spread":false},{"title":"input1 <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"EthernetFrame.exe <span style='color:#111;'> 636.11KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"源代码","children":[{"title":"EthernetFrame","children":[{"title":"input2 <span style='color:#111;'> 397B </span>","children":null,"spread":false},{"title":"EthernetFrame.ncb <span style='color:#111;'> 121.00KB </span>","children":null,"spread":false},{"title":"input1 <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"Encap.h <span style='color:#111;'> 892B </span>","children":null,"spread":false},{"title":"Send.cpp <span style='color:#111;'> 7.68KB </span>","children":null,"spread":false},{"title":"EthernetFrame.plg <span style='color:#111;'> 1.66KB </span>","children":null,"spread":false},{"title":"output <span style='color:#111;'> 28B </span>","children":null,"spread":false},{"title":"EthernetFrame.cpp <span style='color:#111;'> 1.60KB </span>","children":null,"spread":false},{"title":"Bus.cpp <span style='color:#111;'> 662B </span>","children":null,"spread":false},{"title":"Encap.cpp <span style='color:#111;'> 4.56KB </span>","children":null,"spread":false},{"title":"CRC8.H <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"Send.h <span style='color:#111;'> 333B </span>","children":null,"spread":false},{"title":"Unpack.h <span style='color:#111;'> 277B </span>","children":null,"spread":false},{"title":"Unpack.cpp <span style='color:#111;'> 4.67KB </span>","children":null,"spread":false},{"title":"EthernetFrame.dsw <span style='color:#111;'> 551B </span>","children":null,"spread":false},{"title":"EthernetFrame.opt <span style='color:#111;'> 54.50KB </span>","children":null,"spread":false},{"title":"Bus.h <span style='color:#111;'> 507B </span>","children":null,"spread":false},{"title":"EthernetFrame.dsp <span style='color:#111;'> 4.79KB </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"Bus.sbr <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"Unpack.sbr <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"EthernetFrame.bsc <span style='color:#111;'> 3.47MB </span>","children":null,"spread":false},{"title":"Bus.obj <span style='color:#111;'> 13.67KB </span>","children":null,"spread":false},{"title":"Encap.sbr <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"EthernetFrame.pch <span style='color:#111;'> 2.15MB </span>","children":null,"spread":false},{"title":"vc60.idb <span style='color:#111;'> 225.00KB </span>","children":null,"spread":false},{"title":"Encap.obj <span style='color:#111;'> 165.64KB </span>","children":null,"spread":false},{"title":"EthernetFrame.sbr <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"EthernetFrame.ilk <span style='color:#111;'> 930.17KB </span>","children":null,"spread":false},{"title":"EthernetFrame.obj <span style='color:#111;'> 295.59KB </span>","children":null,"spread":false},{"title":"EthernetFrame.exe <span style='color:#111;'> 636.11KB </span>","children":null,"spread":false},{"title":"Send.sbr <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"vc60.pdb <span style='color:#111;'> 140.00KB </span>","children":null,"spread":false},{"title":"EthernetFrame.pdb <span style='color:#111;'> 1.38MB </span>","children":null,"spread":false},{"title":"Send.obj <span style='color:#111;'> 175.26KB </span>","children":null,"spread":false},{"title":"Unpack.obj <span style='color:#111;'> 205.00KB </span>","children":null,"spread":false}],"spread":false},{"title":"SimulThread.h <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • emlerr :
    还不错,很有参考价值,能借鉴一下
    2015-01-13
  • baidu_15400153 :
    相关的代码齐全
    2014-12-05
  • chenyulong84 :
    运行后不能输入,没反应,不知是不是我不会用
    2014-07-01
  • kayo5994 :
    很不错,相关的代码也很齐全!
    2013-08-18
  • u011261169 :
    比我想象的要完美的多,
    2013-07-01

免责申明

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