It's UWAweek 17 (1st semester, week 8)

help3002

This forum is provided to promote discussion amongst students enrolled in CITS3002 Computer Networks.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message. How do I ask a good question?

Displaying selected article
Showing 1 of 274 articles.
Currently no other people reading this forum.


 UWA week 14 (1st semester, non-teaching week) ↓
SVG not supported

Login to reply

👍?
helpful
3:53am Thu 4th Apr, Christopher M.

ANONYMOUS wrote:
> I'm struggling a lot trying to implement the piggybacking in stopandwait.c. When it comes to the concepts I'm able to pinpoint where I need to implement the code and how the code should look like, but I'm unable to use things like #define EV_PIGGYBACK_TIMER EV_TIMER2 or CNET_start_timer(EV_PIGGYBACK_TIMER, PIGGYBACK_TIMEOUT, 0);.
Hi, I'm not sure how to answer your question as I'm not sure what you mean by "I'm unable to use things..." The approach to piggybacking requires two timers, one supporting the retransmission of unacknowledged (outgoing) data, and one to force the sending of an acknowledgement 'by itself' if we have no data to send. The header file cnet.h defines 10 timers, named EV_TIMER0..EV_TIMER9, but doesn't define the constant EV_PIGGYBACK_TIMER (as cnet tries not to force you to write your protocols or data structures in any way). But it makes protocols easier to ready if we give the timers more meaningful names, as with:
#define EV_PIGGYBACK_TIMER      EV_TIMER2

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy