资源简介
计网rdt实验sim模拟器,以及协议代码。 亲测可用。。。

代码片段和文件信息
/* Protocol 1 (utopia) provides for data transmission in one direction only from
sender to receiver. The communication channel is assumed to be error free
and the receiver is assumed to be able to process all the input infinitely fast.
Consequently the sender just sits in a loop pumping data out onto the line as
fast as it can. */
typedef enum {frame_arrival} event_type;
#include “protocol.h“
void sender1(void)
{
frame s; /* buffer for an outbound frame */
packet buffer; /* buffer for an outbound packet */
while (true) {
from_network_layer(&buffer); /* go get something to send */
s.info = buffer; /* copy it into s for transmission */
to_physical_layer(&s); /* send it on its way */
} /* tomorrow and tomorrow and tomorrow
Creeps in this petty pace from day to day
To the last syllable of recorded time;
- Macbeth V v */
}
void receiver1(void)
{
frame r;
event_type event; /* filled in by wait but not used here */
while (true) {
wait_for_event(&event); /* only possibility is frame_arrival */
from_physical_layer(&r); /* go get the inbound frame */
to_network_layer(&r.info); /* pass the data to the network layer */
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 999 1996-03-24 22:47 simulator_new\common.h
文件 3667 1996-03-24 22:47 simulator_new\doc
文件 1852 1996-03-26 11:52 simulator_new\exercises
文件 283 1996-03-26 11:55 simulator_new\Makefile
文件 1238 1996-03-24 22:47 simulator_new\p1.c
文件 1395 2018-06-05 00:11 simulator_new\p2.c
文件 1336 2018-06-05 00:13 simulator_new\p2.o
文件 2138 2018-06-05 00:18 simulator_new\p3.c
文件 1536 2018-06-05 00:18 simulator_new\p3.o
文件 2102 1996-03-24 22:47 simulator_new\p4.c
文件 1448 2018-06-05 00:10 simulator_new\p4.o
文件 4171 1996-03-24 22:47 simulator_new\p5.c
文件 2020 2018-06-05 00:10 simulator_new\p5.o
文件 5533 1996-03-25 00:23 simulator_new\p6.c
文件 2732 2018-06-05 00:10 simulator_new\p6.o
文件 1784 1996-03-24 22:47 simulator_new\protocol.h
文件 19 1996-03-25 19:26 simulator_new\r1
文件 1549 1996-03-26 11:54 simulator_new\README
文件 109 1996-04-30 16:13 simulator_new\run
文件 23036 2018-06-05 00:18 simulator_new\sim
文件 9064 2017-05-17 22:23 simulator_new\sim.c
文件 9064 2017-05-17 22:23 simulator_new\sim.c~
文件 7684 2018-06-05 00:10 simulator_new\sim.o
文件 19153 2018-06-04 22:57 simulator_new\worker.c
文件 17820 2017-05-17 22:21 simulator_new\worker.c~
文件 11072 2018-06-05 00:10 simulator_new\worker.o
目录 0 2018-06-05 10:52 simulator_new
----------- --------- ---------- ----- ----
132804 27
............此处省略0个文件信息
- 上一篇:FPFH点云配准
- 下一篇:UniWebView应用demo源码
相关资源
- 实验三 消息中间件应用开发:Active
- 信号奇异点Lipschitz指数计算
- 基于stm32f103ve的程序——跑马灯实验
- 华为-热设计培训教材
- 04741计算机网络原理知识点整理.docx(
- 2018全国大学生计算机博弈大赛 棋谱
- FTP课程设计(服务端+客户端)
- FPGA实现PID.v
- GBT 15532-2008 计算机软件测试规范
- axure 框架图模板设计.rp
- labview编程软件滤波器以及编写程序设
- 计算机图形学 边填充算法实现代码
- 电力系统潮流计算程序集合
- oracle数据迁移项目实施方案
- 60个HFSS 仿真模型库
-
Actionsc
ript 1.0实现能跟随鼠标运动的 - 中深层地热单井换热数值计算
- 大斜度定向井钻井设计优化及应用实
- 基于MCS_51单片机的工业屏柜散热方案
- MCS_51单片机与8255A的接口设计
- 基于蓝牙4.0的设备通信方案设计与实
- 电脑卡西欧计算器 fx-991CN X Emulator19中
- LED灯串电路图说明
- 基于xilinx FPGA的PCIe设计实战
- 基于PCIe的FPGA动态配置设计与实现
- Quartus II 15.0中仿真Altera三速以太网I
- 周立功开发板ProASIC3实验-syn_FIFO代码
- 编译原理实验工具及参考源码(lex&
- SSM+Shiro+redis实现单点登陆
- UNIX/LINUX编程实践教程的源码
评论
共有 条评论