Guest_imported
New member
- Jan 1, 1970
- 0
Hi
I'm working on a project where I need to include a program which simulates some features of the data link layer.
The program will need to read an input file message.1 . This file will consist of a number of messages, and other information.
Input:
The format of the file is as follows:
BYTES CONTENT CHECK?
n Noise No
1 to n SYN 0x16 No
1 SOH 0x1 Yes
1 Address (Short Unsigned Yes
Integer)is(0x7)
1 STX 0x2 Yes
n Data (Any character except Yes
ETX 0x3)
1 ETX 0x3 Yes
2 Checksum (Short Signed No
Integers High order byte first)
1 EOT 0x4 No
Output:
The program needs to print any message having a correct checksum which is addressed to you ((0x7)is my address).
If I receive a message addressed to me which has an incorrect checksum, I need to print a message and the two checksum values.
Ignore all messages which are not mine.
I would really appreciate any help or reference.
Thank you
I'm working on a project where I need to include a program which simulates some features of the data link layer.
The program will need to read an input file message.1 . This file will consist of a number of messages, and other information.
Input:
The format of the file is as follows:
BYTES CONTENT CHECK?
n Noise No
1 to n SYN 0x16 No
1 SOH 0x1 Yes
1 Address (Short Unsigned Yes
Integer)is(0x7)
1 STX 0x2 Yes
n Data (Any character except Yes
ETX 0x3)
1 ETX 0x3 Yes
2 Checksum (Short Signed No
Integers High order byte first)
1 EOT 0x4 No
Output:
The program needs to print any message having a correct checksum which is addressed to you ((0x7)is my address).
If I receive a message addressed to me which has an incorrect checksum, I need to print a message and the two checksum values.
Ignore all messages which are not mine.
I would really appreciate any help or reference.
Thank you