Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3002


This forum is provided to promote discussion amongst students enrolled in Computer Networks (CITS3002).
 
Before posting a question here, you may like to read the article How To Ask Questions The Smart Way.
 
Options:
RSS cloud
Jump to:

There are 61 articles from this person

61 of 768 articles shown, currently no other people reading this forum.

UWA week 26 - mid-year break

photo Re: Addressing a host directly using MAC during BOOTP startup (both)
Wed 24th Jun, 7:04pm, Edward A.
My understanding is that during the BOOTP IP assignment process the BOOTP server would provide IP information to the host via broadcast, except in cases where the host has a direct link to the host (i.e. they are on the same stretch of ethernet). In those...

UWA week 23 - 1st semester, study break

photo Re: When is the file descriptors in Select() 'ready'? (all 5)
Fri 5th Jun, 2:55pm, Edward A.
One thing I found the hard way with select was that if you set your writable or error-able file descriptors to anything but NULL or your language equivalent you'll burn your CPU up really fast as every file descriptor will be arbitrarily writable on each...

UWA week 22 - 1st semester, week 12

photo Re: Ports remain bound for a little while after closing (all 7)
Sun 31st May, 6:29pm, Edward A.  O.P.
I specifically applied for a shorter extension, I don't have much left to give, and there should be no reason to re-run the code, it won't crash ;)
photo Re: Ports remain bound for a little while after closing (all 7)
Sat 30th May, 5:22pm, Edward A.  O.P.
Nope, submitted yesterday so too late on that one. Oh well
photo Re: java equals (all 9)
Sat 30th May, 5:21pm, Edward A.
what was it?
photo Re: java equals (all 9)
Sat 30th May, 5:02pm, Edward A.
ANONYMOUS wrote: ^^ Testing for length is usually a good way of figuring that one out.
photo Re: Java Select (all 5)
Thu 28th May, 3:55pm, Edward A.
It's common to all languages that use the select API, try setting your sockets to be non-blocking. Basically Beej's guide says that if you set your socket to non-blocking it means it can return without having read or written anything, which I think is...
photo Ports remain bound for a little while after closing (all 7)
Thu 28th May, 3:28pm, Edward A.
When my program exits I (usually) do the right thing and close my sockets nicely. However, If I re-run my program really quickly after it exits I occasionally get errors telling me some of the ports are still in use. My first question is does that happen...
photo Re: Java Select (all 5)
Thu 28th May, 3:25pm, Edward A.
ANONYMOUS wrote: Are you setting your socket to be non-blocking? I'm not sure how that works in Java, but in both my C and Python implementations that was an option and according to our lord and saviour Beej that could be your problem. Reference: https://beej.us/guide/bgnet/html//index.html#blocking...
photo Re: Are non-blocking sockets needed if select is being used? (all 3)
Wed 27th May, 10:36am, Edward A.  O.P.
Scratch the second part, receiving UDP requests was crashing my servers 🙃
photo Are non-blocking sockets needed if select is being used? (all 3)
Wed 27th May, 9:27am, Edward A.
The question says most of it, I was wondering if sockets actually need to be set to be non-blocking if we're using select. My theory is that you don't need to, however internet searches aren't proving particularly fruitful here. Also if anyone has any...
photo Re: How to check if the timetable has changed after the server has already started? (all 11)
Mon 25th May, 4:13pm, Edward A.
ANONYMOUS wrote: Yes, but why would you care that someone has looked at it but not changed it? We're only interested in whether the information contained in the file has been altered, hence the interest in mtime.

UWA week 21 - 1st semester, week 11

photo Why is 1970 the reference point for time in C (and everything)? (all 3)
Sun 24th May, 8:24pm, Edward A.
I am curious as to why times in almost all programming languages (or the ones that were conceived in my parents' lifetimes) are represented as seconds since 1970? I understand that this is most likely a standard brought about by the C programming language,...
photo Re: Determining if a route is not valid in a given day? (all 10)
Fri 22nd May, 10:52am, Edward A.
ANONYMOUS wrote: Only maintain the seqno of the node where the packet originated. Then the pairing {origin_node, seqno} is guaranteed to be unique. For example A could be trying to get to C via B. The frame sent to B would contain {{{ origin: A seqno: 1 }}}...
photo Re: Determining if a route is not valid in a given day? (all 10)
Thu 21st May, 5:00pm, Edward A.
I sure do, there's a couple of ways of doing this that I've tried: 1. Record a seqno for each frame and don't forward a frame which you've seen before 2. Record in the frame where it has passed through, if it has already passed through a node before it...
photo Re: Determining if a route is not valid in a given day? (all 10)
Thu 21st May, 4:39pm, Edward A.
The pattern I believe Chris has followed in his solution (from talking to him) and the pattern I have definitely followed in mine is to wait for all the nodes I've sent a query to to respond. As we can assume that UDP has no packet loss locally then every...
photo Re: Just wondering the facicon problem and the structure of the response (all 4)
Thu 21st May, 1:45pm, Edward A.
ANONYMOUS wrote: Can't find the link but Chris basically said to respond with something like this: "Arrival time at final destination: 11:05 Next bus: 9:30, BusB, 10:15, StationB" If your arrival time at your final destination (say TerminalC) was at 11:05...
photo Re: How to check if the timetable has changed after the server has already started? (all 11)
Thu 21st May, 11:30am, Edward A.
ANONYMOUS wrote: I store a time that the timetable file was last checked and then stat the file every time I get a request that needs a response. If the file's modification time is greater than the last time I checked, I reparse it.
photo Re: TCP suddenly stopped working (no longer receiving requests from client) (all 8)
Wed 20th May, 10:04pm, Edward A.
Another idea that has just occurred to me is to try to send a request from your terminal to see what your server says back (if anything), that way you could simulate a syntactically correct request, and incorrect ones. To do so on linux use: {{{ nc localhost...
photo Re: TCP suddenly stopped working (no longer receiving requests from client) (all 8)
Wed 20th May, 9:55pm, Edward A.
ANONYMOUS wrote: Whenever your program terminates your ports should be freed up. I also seriously doubt you've exhausted all your ports, you have 2^16 (65536) to choose from, which even if we discount the 1024 ports that are reserved by your OS for stuff,...
photo Re: Station transit time (all 4)
Wed 20th May, 9:48pm, Edward A.
ANONYMOUS wrote: Short answer: Instantaneous transfer between buses at any given stop. Longer answer: As I understand it from talking to Chris the mental model Chris wanted people to use for this project is to think of the journey as a single bus trip that...
photo Re: Extension of project (all 11)
Wed 20th May, 1:23pm, Edward A.
Chris, more realistically can I request that the project submission be pushed back to the traditional 11:59PM? Call me a product of my environment but I find it very hard to write documentation for any project outside of the hours of 9PM-11:58PM
photo Re: How do we keep track of TCP client socket reference? (both)
Wed 20th May, 1:16pm, Edward A.
Use an appropriate data structure to map a seqno originating from your node to a file descriptor

UWA week 20 - 1st semester, week 10

photo Re: Python UDP ports not decoding message (all 8)
Fri 15th May, 6:50pm, Edward A.
I'd imagine it depends upon what you're then doing with it. In my case I have a frame class in Python which I build by reading in a string representation of a frame. If you're performing minimal manipulation of the bytes coming in and pushing them down...
photo Re: Fastest Route (both)
Fri 15th May, 6:24pm, Edward A.
>Ideally, the returned result will be the fastest journey - even if it leaves later or includes more segments (hops) than other journeys (but firstly, just report any any valid journey!) From the project description. The fastest journey is the one that...
photo Re: Java LocalDateTime and Timetable Files (all 3)
Fri 15th May, 5:03pm, Edward A.
This may be helpful: https://secure.csse.uwa.edu.au/run/help3002?p=np&a=354&all=y5
photo Re: Python UDP ports not decoding message (all 8)
Fri 15th May, 11:46am, Edward A.
ANONYMOUS wrote: This isn't correct, recvfrom returns bytes. and secondly what you're doing here is "new_data = data[0].decode('utf-8')" which means if your data is I should probably clarify here that recvfrom is a function from the Python socket library...
photo Re: Hint request: Getting the fastest path (all 12)
Thu 14th May, 4:05pm, Edward A.  O.P.
The decision about whether a frame has been seen before is derived from the original sender's name and the sequence number the original sender applied, not who happened to be transmitting the frame. I imagine from your answer that that is the source of...
photo Re: Hint request: Getting the fastest path (all 12)
Thu 14th May, 3:54pm, Edward A.  O.P.
Poor choice of words I suppose. However, the point remains that the approach prevents me from achieving an optimal path as some paths which cross more nodes but take less time to do so will not get the response they "deserve" as inefficient paths that...
photo Re: Hint request: Getting the fastest path (all 12)
Thu 14th May, 3:47pm, Edward A.  O.P.
I do respond, but only to say that there is no path this way. The time value returned is -1 (even if technically there would be a path but we don't want to forward the packet)
photo Hint request: Getting the fastest path (all 12)
Thu 14th May, 3:43pm, Edward A.
Has anyone had any luck getting the fastest possible route to a destination? My implementation reliably returns *a* route to a destination but not necessarily the fastest route. Looking at the big randomly-generated networks where this causes a problem...
photo Re: How do avoid buffer space error in Python? (all 10)
Thu 14th May, 3:27pm, Edward A.
I'd say that the problem is as Chris described, I ran my Python implementation with 100 nodes and had no problems.
photo Re: Project - Forking in C (all 6)
Thu 14th May, 2:48pm, Edward A.
How did you change your display picture?
photo Re: HTTP GET Request Problems (all 7)
Thu 14th May, 2:44pm, Edward A.
Sorry forgot to specify that I did that yes. Side question: are 418 I am a teapot responses permitted or should I give proper error messages?
photo Re: HTTP GET Request Problems (all 7)
Thu 14th May, 11:13am, Edward A.
My response to this problem was just to close sockets where the HTTP request doesn't contain the line "to=<Some station>"
photo Re: Clarification (all 5)
Tue 12th May, 12:54pm, Edward A.
Will the timetables with hours after midnight marked at 25 be used for testing? I can definitely see that not playing nicely with the Python time library. Also, if I were to tell you the next available trip was the next day would that be considered incorrect?...
photo buildrandomtimetables.c - No implementation of strdup (both)
Mon 11th May, 10:30am, Edward A.
Just in case anyone was scratching their noodle wondering why Chris' implementation of buildrandomtimetables.c wasn't compiling on their system (Ubuntu 18.04 in my case) and was complaining about a lack of strdup. Apparently strdup is a non-standard function...
photo Re: Portability, Endianness, etc (all 6)
Mon 11th May, 9:33am, Edward A.
Oops answered wrong thread
photo Re: Portability, Endianness, etc (all 6)
Mon 11th May, 9:30am, Edward A.
I found it was annoying that the ports stayed bound to the processes running the background and so I implemented the above to kill the processes to free the ports and allow me to re-run the program.

UWA week 19 - 1st semester, week 9

photo Re: Portability, Endianness, etc (all 6)
Sun 10th May, 10:15pm, Edward A.
If you send all your data as strings then float representation shouldn't matter too much. For example the string "3.14" has the exact same representation in Python, Java and C. Forgive me if you're further ahead on this project than I am and I am yet to...
photo Re: How to close a socket upon keyboard interrupt in Python? (all 4)
Sun 10th May, 5:49pm, Edward A.
Sorry I should have clarified this works on my Ubuntu 18.04 system, no guarantees for Mac (though WSL should work)
photo Re: How to close a socket upon keyboard interrupt in Python? (all 4)
Sun 10th May, 5:47pm, Edward A.
ANONYMOUS wrote: Yes and no is the answer to this one. If you are running a single server and it's bound to your stdin what you have should work, though I'd suggest you look into using the signal lib which lets you specify a callback for a SIGINT, which...
photo Re: Project Design Question (all 10)
Sat 9th May, 11:24am, Edward A.
> Thanks Chris. Clearing the file only applies if you're keeping a file on disk so that's irrelevant now. This is the approach I'm going for and have discussed with Chris. If you think of the project as being a local version of what in reality would be...
photo Re: Some Project Questions (all 3)
Wed 6th May, 1:44pm, Edward A.  O.P.
Sorry, I meant is there a guide on how to make my posts on this forum look nice. For example using "{{{" for code formatting etc.
photo Some Project Questions (all 3)
Wed 6th May, 12:01pm, Edward A.
Hi All, I have a couple of questions, some of which I think have been discussed in the labs and I just want to make the answers explicit: 1. Do we need to compile our code down into binaries, for example on the getting started page the "startstations.sh"...
photo Re: Week 8 Lecture Recording (all 5)
Tue 5th May, 6:09pm, Edward A.  O.P.
God speed Chris
photo Week 8 Lecture Recording (all 5)
Tue 5th May, 4:35pm, Edward A.
Hi Chris, I am sure you are flat out dealing with project questions, I was just wondering when week 8's lecture recording would be uploaded? Cheers

UWA week 17 - 1st semester, week 7

photo Re: Lecture 4: ALOHA question (both)
Fri 24th Apr, 12:11pm, Edward A.  O.P.
The answer to this question lies in the most unlikely of places - the recommended reading for the lecture the question comes from. In Tanenbaum chapter 4.2, under the discussion about pure ALOHA there are the following pearls: >Senders need some way to...

UWA week 16 - 1st semester, mid-semester break

photo Lecture 4: ALOHA question (both)
Sun 19th Apr, 3:36pm, Edward A.
On slide 15 of lecture 4 it says: Is the fact that a whole packet was transmitted and then the re-broadcast message from other stations was examined for a collision a result of the fundamental design of ALOHA or was it just how it worked? I see no reason...
photo Re: Getting plot-to-html.sh for labsheet 2 (all 9)
Thu 16th Apr, 1:55pm, Edward A.  O.P.
Hi Kirra, It may be a problem with the path provided in the shell script to CNET on your system. On my Ubuntu 18.04 system I had to the change the line: {{{ # location of the cnet simulator CNET="/cslinux/bin/cnet" }}} To the location of your cnet install....
photo Re: End of semester exam (all 14)
Thu 16th Apr, 1:46pm, Edward A.
Sent to my student email about an hour ago >Therefore we can offer the option of an ungraded pass to both undergraduate and postgraduate students in our degrees. > >Students are able to choose the ungraded pass if they wish without compromising accreditation....

UWA week 15 - 1st semester, non-teaching week

photo Re: Stop examplify petition (all 11)
Wed 8th Apr, 3:46pm, Edward A.  O.P.
Obviously there are a number of people who are taking this as an opportunity to bash the idea of invigilated, closed book exams, a view I do not agree with. There are also others who are taking this as an opportunity to attempt to avoid assessment altogether,...
photo Re: Stop examplify petition (all 11)
Mon 6th Apr, 11:34am, Edward A.  O.P.
I don't personally agree with the attack on traditional exams as an assessment technique, however that does not diminish the threat to people's privacy and data security that this software represents. Ironic though it may be that people are complaining...

UWA week 14 - 1st semester, week 6

photo Stop examplify petition (all 11)
Sat 4th Apr, 9:07pm, Edward A.
The Examplify software chosen by the University for running exams is incredibly invasive and has the following creepy characteristics: - Monitors your webcam and microphone - Records your screen - Logs your keypresses - Uses AI to monitor these recordings...
photo Re: Lab 3: stop and wait still wins? (all 3)
Thu 2nd Apr, 6:03pm, Edward A.  O.P.
Cloudflare hates plots apparently, so just imagine two very close lines.
photo Re: Lab 3: stop and wait still wins? (all 3)
Thu 2nd Apr, 6:02pm, Edward A.  O.P.
My parameters: messagerate = 100ms, bandwidth = 56Kbps, propagationdelay = 2500ms,
photo Lab 3: stop and wait still wins? (all 3)
Thu 2nd Apr, 6:01pm, Edward A.
I am currently doing lab 3 (very behind, I know) and I am comparing the plots for how many messages delivered in 1 hour for my piggybacking protocol vs the stopandwait protocol and my protocol loses (see plot.html). My nodes are pretty talkative, and messages...

UWA week 13 - 1st semester, week 5

photo Just in case anyone thought Zoom actually wasn't too bad... (both)
Sat 28th Mar, 7:13pm, Edward A.
Here's an article about how they're stealing your data (on a service that UWA pays a commercial license for) and selling it to Google: https://www.theregister.co.uk/2020/03/27/doc_searls_zoom_privacy/
photo Re: Getting plot-to-html.sh for labsheet 2 (all 9)
Tue 24th Mar, 3:08pm, Edward A.  O.P.
Not even Arch, Ubuntu 18.04 for my sins.
photo Getting plot-to-html.sh for labsheet 2 (all 9)
Tue 24th Mar, 12:26pm, Edward A.
Everyone else has probably long completed this labsheet. But if there are any stragglers like me who are getting the following error when attempting to run plot-to-html.sh on Ubuntu: {{{ ./plot-to-html.sh: 26: ./plot-to-html.sh: Syntax error: "(" unexpected...

UWA week 10 - 1st semester, week 2

photo Lab 1 Q2 (both)
Fri 6th Mar, 5:17pm, Edward A.
In regards to Q2 in the lab I am unsure as to what level we are expected to test the CRC functions. I've done some reading on CRCs and as I understand it the code word (checksum in your parlance) appended to the end of messages is used as a means of checking...
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  3:57pm Aug 06 2020