Figure 11.6 The design of the simplest protocol with no flow or error co 没有流量控制和差错控制的最简单协议 Sender Receiver Network Get data Deliver data Network Data link Data link Physical Send frame Receive frame Physical Data frames- Event: Request from network layer Repeat forever Repeat forever Algorithm for sender site Algorithm for receiver site Notification from Event: physical layer 11.16
11.16 Figure 11.6 The design of the simplest protocol with no flow or error control 没有流量控制和差错控制的最简单协议
Algorithm 11.1 Sender-site algorithm for the simplest protocol 最简单协议中发送方的算法 1 while(true) /Repeat forever 2 3 WaitForEvent(); /Sleep until an event occurs if(Event(RequestToSend)) //There is a packet to send 6 GetData(); 7 MakeFrame(); SendFrame(); //Send the frame 9 10 11.17
11.17 Algorithm 11.1 Sender-site algorithm for the simplest protocol 最简单协议中发送方的算法
Algorithm 11.2 Receiver-site algorithm for the simplest protocol 最简单协议中接收方的算法 1 while(true) /Repeat forever 2 3 WaitForEvent () /Sleep until an event occurs ¥ if(Event (ArrivalNotification))//Data frame arrived 6 ReceiveFrame(); 2 ExtractData(); 8 DeliverData(); //Deliver data to network layer 9 10 11.18
11.18 Algorithm 11.2 Receiver-site algorithm for the simplest protocol 最简单协议中接收方的算法
Example 11.I Figure 11.7 shows an example of communication using this protocol.It is very simple.The sender sends a sequence of frames without even thinking about the receiver.To send three frames,three events occur at the sender site and three events at the receiver site.Note that the data frames are shown by tilted boxes;the height of the box defines the transmission time difference between the first bit and the last bit in the frame. 图11.7例举了使用最简单协议的例子。发送方发送一个 帧序列而不用考虑接收方。发了三帧,在发送方和接 收方各发生了三个事件。 11.19
11.19 Figure 11.7 shows an example of communication using this protocol. It is very simple. The sender sends a sequence of frames without even thinking about the receiver. To send three frames, three events occur at the sender site and three events at the receiver site. Note that the data frames are shown by tilted boxes; the height of the box defines the transmission time difference between the first bit and the last bit in the frame. 图11.7例举了使用最简单协议的例子。发送方发送一个 帧序列而不用考虑接收方。发了三帧,在发送方和接 收方各发生了三个事件。 Example 11.1
Figure 11.7 Flow diagram for Example 11.1 三个帧的流量图示 Sender Receiver Request- Frame Arrival Request- Frame Arrival Request Frame Arrival Time Time 11.20
11.20 Figure 11.7 Flow diagram for Example 11.1 三个帧的流量图示