freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

三種arq協(xié)議的c語言算法-資料下載頁

2025-05-31 01:52本頁面
  

【正文】 while (between(ack_expected, , next_frame_to_send)) { nbuffered = nbuffered 1。 /* handle piggybacked ack */ stop_timer(ack_expected % NR_BUFS)。 /* frame arrived intact */ inc(ack_expected)。 /* advance lower edge of sender39。s window */ } break。 case cksum_err: if (no_nak) send_frame(nak, 0, frame_expected, out_buf)。 break。 /* damaged frame */ case timeout: send_frame(data, oldest_frame, frame_expected, out_buf)。 break。 /* we timed out */ case ack_timeout: send_frame(ack,0,frame_expected, out_buf)。 /* ack timer expired。 send ack */ } if (nbuffered NR_BUFS) enable_network_layer()。 else disable_network_layer()。 }} 四、協(xié)議中用到的H文件define MAX_PKT 4 /* determines packet size in bytes */typedef enum {false, true} boolean。 /* boolean type */typedef unsigned int seq_nr。 /* sequence or ack numbers */typedef struct {unsigned char data[MAX_PKT]。} packet。 /* packet definition */typedef enum {data, ack, nak} frame_kind。 /* frame_kind definition */typedef struct { /* frames are transported in this layer */ frame_kind kind。 /* what kind of a frame is it? */ seq_nr seq。 /* sequence number */ seq_nr ack。 /* acknowledgement number */ packet info。 /* the network layer packet */} frame。/* Wait for an event to happen。 return its type in event. */void wait_for_event(event_type *event)。/* Fetch a packet from the network layer for transmission on the channel. */void from_network_layer(packet *p)。/* Deliver information from an inbound frame to the network layer. */void to_network_layer(packet *p)。/* Go get an inbound frame from the physical layer and copy it to r. */void from_physical_layer(frame *r)。/* Pass the frame to the physical layer for transmission. */void to_physical_layer(frame *s)。/* Start the clock running and enable the timeout event. */void start_timer(seq_nr k)。/* Stop the clock and disable the timeout event. */void stop_timer(seq_nr k)。/* Start an auxiliary timer and enable the ack_timeout event. */void start_ack_timer(void)。/* Stop the auxiliary timer and disable the ack_timeout event. */void stop_ack_timer(void)。/* Allow the network layer to cause a network_layer_ready event. */void enable_network_layer(void)。/* Forbid the network layer from causing a network_layer_ready event. */void disable_network_layer(void)。/* Macro inc is expanded inline: Increment k circularly. */define inc(k) if (k MAX_SEQ) k = k + 1。 else k = 0
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1