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 selected article
Showing 1 of 503 articles.
Currently 44 other people reading this forum.


 UWA week 12 (1st semester, week 4) ↓
SVG not supported

Login to reply

👍x1
helpful
4:31pm Tue 19th Mar, Christopher M.

ANONYMOUS wrote:
> I'm thinking about how I would implement piggybacking. Is it better to combine DL_ACK and DL_DATA in the header and somehow seperate them at the other end, or is it best to make a seperate FRAMEKIND, like DL_DATA_ACK, that signifies that data and an acknowledgement has been sent?
Either way can work - the best way, initially, is the way that simplest for your to implement and get working. If your frame-types are mutually exclusive, you can give them all distinct values, and just store one of them in a header field. With piggybacking, you'll also need multiple (2) fields fro sequence-numbers, as both data and acks have a sequence.
> This is kinda outside the scope of the lab, but if it's the latter, how would this work if I wanted to combine more than just acknowledgements and data? For example, if I had 4 different frame types that could all piggyback each other, I would have an additional 6(?) things in the FRAMEKINDs enum. This would explode by a huge amount as I have more frame types, or if I allow more than 2 frame types to piggyback each other. Would you use bitwise flags (I think that's what they're called) instead?
Not out of scope, at all. Here we have a situation where a frame may be carrying data, an ack, or both. So we can use constants that are powers-of-2 to represent multiple possibilities: #define DATA 1 #define ACK 2 #define DATA_ACK (DATA | ACK) // is 3 = 1 + 2 or, more confusing, but easier to edit/extend: #define DATA (1<<0) #define ACK (1<<1) #define DATA_ACK (DATA | ACK) // is 3 = 1 + 2

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