GoBackN协议的C语言实现

上传者: gubinno | 上传时间: 2019-12-21 19:48:49 | 文件大小: 425KB | 文件类型: rar
模仿数据链路层的gobackn协议 /*该协议是搭载ack的回退n步协议*/ #include #include "protocol.h" #define max_seq 7 #define flag 126 #define ESC 100 #define wait_time 2700 //发送计时器等待的时间 #define ack_wait_time 280 static int phl_ready = 0; unsigned char buf[max_seq+1][270]; unsigned char ack[8]; //发送空的ack帧 unsigned char in_buf[600], last_buf[520];//接收时的缓冲区;去掉冗余之后的缓冲区,为防备因误码两帧合并为一帧而定义了很大一个数组 int nbuffered=0; //发送的帧数 int buf_size[max_seq+1]; //记下以发送各帧的帧长 int next_frame_to_send=0; int frame_in_phl=0; //用于成帧 int frame_expected=0; int ack_expected=0; int between(int a,int b,int c) { if( ((a<=b)&&(b

文件下载

资源详情

[{"title":"( 36 个子文件 425KB ) GoBackN协议的C语言实现","children":[{"title":"gobackn","children":[{"title":"性能测试记录表.doc <span style='color:#111;'> 78.00KB </span>","children":null,"spread":false},{"title":"测试数据","children":[{"title":"datalink-Afle.log <span style='color:#111;'> 42.49KB </span>","children":null,"spread":false},{"title":"datalink-Bf.log <span style='color:#111;'> 63.97KB </span>","children":null,"spread":false},{"title":"datalink-Bfle.log <span style='color:#111;'> 42.43KB </span>","children":null,"spread":false},{"title":"datalink-Bf –ber 1e-4.log <span style='color:#111;'> 64.01KB </span>","children":null,"spread":false},{"title":"datalink-Bfl.log <span style='color:#111;'> 68.51KB </span>","children":null,"spread":false},{"title":"datalink-B 1e-7.log <span style='color:#111;'> 121.92KB </span>","children":null,"spread":false},{"title":"datalink-B5e-5.log <span style='color:#111;'> 40.94KB </span>","children":null,"spread":false},{"title":"datalink-B无参数.log <span style='color:#111;'> 68.03KB </span>","children":null,"spread":false},{"title":"datalink-Bfs.log <span style='color:#111;'> 66.19KB </span>","children":null,"spread":false},{"title":"datalink-Af –ber 5e-4.log <span style='color:#111;'> 94.09KB </span>","children":null,"spread":false},{"title":"datalink-Af –ber 1e-4.log <span style='color:#111;'> 63.80KB </span>","children":null,"spread":false},{"title":"datalink-Afl.log <span style='color:#111;'> 67.94KB </span>","children":null,"spread":false},{"title":"datalink-A 1e-7.log <span style='color:#111;'> 121.06KB </span>","children":null,"spread":false},{"title":"datalink-Afs.log <span style='color:#111;'> 65.56KB </span>","children":null,"spread":false},{"title":"datalink-Af.log <span style='color:#111;'> 63.45KB </span>","children":null,"spread":false},{"title":"datalink-A5e-5.log <span style='color:#111;'> 41.01KB </span>","children":null,"spread":false},{"title":"datalink-A无参数.log <span style='color:#111;'> 34.84KB </span>","children":null,"spread":false},{"title":"datalink-Bf –ber 5e-4.log <span style='color:#111;'> 93.09KB </span>","children":null,"spread":false}],"spread":false},{"title":"protocol.h <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false},{"title":"datalink.c <span style='color:#111;'> 6.61KB </span>","children":null,"spread":false},{"title":"datalink.dsp <span style='color:#111;'> 3.49KB </span>","children":null,"spread":false},{"title":"实验报告评语.doc <span style='color:#111;'> 37.00KB </span>","children":null,"spread":false},{"title":"datalink.opt <span style='color:#111;'> 52.50KB </span>","children":null,"spread":false},{"title":"datalink.ncb <span style='color:#111;'> 65.00KB </span>","children":null,"spread":false},{"title":"数据链路层滑动窗口协议的设计与实现-实验报告.doc <span style='color:#111;'> 139.50KB </span>","children":null,"spread":false},{"title":"datalink.dsw <span style='color:#111;'> 541B </span>","children":null,"spread":false},{"title":"datalink.plg <span style='color:#111;'> 252B </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"protocol.lib <span style='color:#111;'> 72.94KB </span>","children":null,"spread":false}],"spread":true},{"title":"Release","children":[{"title":"protocol.lib <span style='color:#111;'> 44.55KB </span>","children":null,"spread":false},{"title":"vc60.idb <span style='color:#111;'> 33.00KB </span>","children":null,"spread":false},{"title":"datalink.exe <span style='color:#111;'> 68.00KB </span>","children":null,"spread":false},{"title":"datalink.obj <span style='color:#111;'> 5.12KB </span>","children":null,"spread":false},{"title":"datalink.pch <span style='color:#111;'> 176.28KB </span>","children":null,"spread":false}],"spread":true},{"title":"源程序清单-样板.DOC <span style='color:#111;'> 49.50KB </span>","children":null,"spread":false},{"title":"流程图.JPG <span style='color:#111;'> 77.30KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

  • xiaoxiaoxiaoQAQ :
    谢谢,参考下
    2017-12-04
  • qq_24327707 :
    不错,非常详细
    2015-06-18
  • Sam_zZ泽森 :
    程序可以运行,但是思路太复杂
    2015-06-01
  • 最美的时光_ :
    程序可以运行,但是思路比较复杂
    2015-05-29
  • yuweihuangda1234 :
    可以运行,需要自己好好研究,呵呵
    2015-01-05

免责申明

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