資源簡介
計網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源碼
評論
共有 條評論