It's UWAweek 47

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 the 2 articles in this topic
Showing 2 of 503 articles.
Currently 23 other people reading this forum.


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

Login to reply

👍?
helpful
7:48pm Tue 2nd Apr, ANONYMOUS

Hi Chris, 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);. Was there a resource I'm missing to complete this question? I can't help but feel that I needed something else to finish this question that wasn't covered in our lectures. Please correct me if I'm wrong and point me in the right direction.


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  8:08AM Aug 25 2024
Privacy policy