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 47 other people reading this forum.


 UWA week 10 (1st semester, week 2) ↓
SVG not supported

Login to reply

👍?
helpful
11:34am Fri 8th Mar, Christopher M.

"Sebastian Gazey" <23*1*1*1@s*u*e*t*u*a*e*u*a*> wrote:
> I am a little confused how to read a file from the drive as if it was going to be sent over the network - is the question wanting us to convert the file into another format (as in, convert a text file into a file containing ints)? In other words - how do we go about making the frames from the file? Or is the question expecting us to use a binary file and convert that into ints (similar to question 1 on the labsheet) > > Otherwise, how would you use the corrupt files function (or the CRC functions) on the frames?
Hi Sebastian, For this exercise, we're not really passing frames across a network, and not having the network (possibly) corrupt those frames, we're just simulating/emulating all of the actions with a single process on a single computer (no network required). We can read the contents of any file (doesn't matter whether it's a text file or a 'binary' file) by reading the contents into an array of bytes, using the read() system call. We could read the whole file into a huge array but, more realistically, we'll read them in a size representative of a frame, say 1KB. We then pass each of the read 'frames' to the corrupt_frame() function, which may modify the contents of the frame. In some pseudo-code: foreach frame to be 'transmitted' calculate the checksum of the frame before 'transmitting' it // pretend we've transmitted it // call corrupt_frame() to change it while it's in transit // receive the frame at the other end calculate the checksum of the frame that 'arrived' if the pre-transmission-checksum is different to the post-transmission-checksum the checksum algorithm has successfully detected the corruption otherwise the checksum algorithm has failed to detect the corruption You've been given a number of (real) checksum algorithms, and you can 'invent' some addition brutal or gentle ways to corrupt each frame. We're interested in knowing how effective (and eventually, how fast) each checksum algorithm is. Hope this helps,

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