2011-04-24

HW 4 simulator question.

Originally Posted By: Jay_Reynolds_Freeman
I have some questions on the format of information in the input file.

First, may we assume only one record per line? That is, is each line is of the form

,,

(The example given appears to show two records per line, but HTML formatting sometimes wraps lines when not intended, so I thought I would ask.)


Second, may we assume only IPv4 addresses, or are we required to handle IPv6 as well?
'''Originally Posted By: Jay_Reynolds_Freeman''' I have some questions on the format of information in the input file.<br><br>First, may we assume only one record per line? That is, is each line is of the form<br><br>,,<br><br>(The example given appears to show two records per line, but HTML formatting sometimes wraps lines when not intended, so I thought I would ask.)<br><br><br>Second, may we assume only IPv4 addresses, or are we required to handle IPv6 as well?

-- HW 4 simulator question
Oops, I should have validated my HTMl: I had a p tag matching a close pre tag. It should look better now. Yes, there should be only
one entry per line. You only have to handle IPv4. Thanks for pointing out the typo.

Best,
Chris
Oops, I should have validated my HTMl: I had a p tag matching a close pre tag. It should look better now. Yes, there should be only<br>one entry per line. You only have to handle IPv4. Thanks for pointing out the typo.<br><br>Best,<br>Chris

-- HW 4 simulator question
Originally Posted By: Shabana
I had a doubt regarding each line in the file. So is there a space after the comma, which needs to be ignored?
'''Originally Posted By: Shabana''' I had a doubt regarding each line in the file. So is there a space after the comma, which needs to be ignored?
2011-04-25

-- HW 4 simulator question
Originally Posted By: razgriz
As I understand it, all whitespace in the file is to be ignored except the newline character. So he could give us ,[bunch of spaces], and it should run fine. (sorry about the pseudocode, but whitespace doesn't display well)

My question is about the user input. Are we looking at or , for the IP address input. And if we're just being given what are we supposed to do with the mask data?
'''Originally Posted By: razgriz''' As I understand it, all whitespace in the file is to be ignored except the newline character. So he could give us ,[bunch of spaces], and it should run fine. (sorry about the pseudocode, but whitespace doesn't display well)<br><br>My question is about the user input. Are we looking at or , for the IP address input. And if we're just being given what are we supposed to do with the mask data?

-- HW 4 simulator question
Originally Posted By: Shabana
Here is the response that I received from Dr. Pollett:
Q.Is there a space after the comma in every line of the file? For example,Is it ,, ( No space after the comma)
or , , ( Space after the comma)

Whitespace before or after commas (excluding newlines) should be ignored

Q.If the program doesn't find the port to forward to, should the output be "Default" or should we assign some default port in the program?

This is up to you, but default seems like a good idea.
'''Originally Posted By: Shabana''' Here is the response that I received from Dr. Pollett:<br>Q.Is there a space after the comma in every line of the file? For example,Is it ,, ( No space after the comma)<br> or , , ( Space after the comma)<br> <br>Whitespace before or after commas (excluding newlines) should be ignored<br><br>Q.If the program doesn't find the port to forward to, should the output be &quot;Default&quot; or should we assign some default port in the program?<br><br>This is up to you, but default seems like a good idea.
2011-04-26

-- HW 4 simulator question
Ania suggested I post an example input file and some test networks. The following is based on the books example.

Input file:
128.96.34.0 , 255.255.255.128 ,0
128.96.34.128, 255.255.255.128, 1
128.96.33.0 , 255.255.255.0 , 2

Spacing is intentional in the input above. An example input might be:
Please enter an IP address to forward:
128.96.34.139
For which the program outputs:
1
On the input:
130.1.1.1
The program outputs:
default
On the input:
128.96.34.1
The program outputs
0
On the input
128.96.33.129
The program outputs
2
Your source code will be looked at by the grader. The above are just
examples, you can assume other tests will be made, but hopefully
the above helps your testing.
Ania suggested I post an example input file and some test networks. The following is based on the books example.<br><br>Input file:<br>128.96.34.0 , 255.255.255.128 ,0<br>128.96.34.128, 255.255.255.128, 1<br>128.96.33.0 , 255.255.255.0 , 2<br><br>Spacing is intentional in the input above. An example input might be:<br>Please enter an IP address to forward:<br>128.96.34.139<br>For which the program outputs:<br>1<br>On the input:<br>130.1.1.1<br>The program outputs:<br>default<br>On the input:<br>128.96.34.1<br>The program outputs<br>0<br>On the input<br>128.96.33.129<br>The program outputs<br>2<br>Your source code will be looked at by the grader. The above are just<br>examples, you can assume other tests will be made, but hopefully<br>the above helps your testing.
X