Question
Programming assignment 2 HDLC ( Layer 2 Protocol ) HDLC (high-level data-link control) is a standard published by ISO that has achieved wide use throughout
Programming assignment 2
HDLC ( Layer 2 Protocol )
HDLC (high-level data-link control) is a standard published by ISO that has achieved wide use throughout the world. HDLC is considered a superset to several other protocols. It provides for a number of options in its implementation. HDLC supports both half-duplex and full-duplex transmission, point-to-point and multipoint configurations, as well as switched or non-switched channels. HDLC uses the term frame to indicate an Independent entity of data transmitted across the link from one station to another. The frame consists of five or six fields. All frames must start and with the flag fields. The stations attached to the data link are required to continuously monitor for the flag sequence. The flag sequence consists of 01111110. Flags can be continuously transmitted on the link between HDLC frames.
Flag | Address | Control | Information | FCS | Flag |
Figure 1: HDLC Frame Format
Your assignment is to write a program that will receive the characters from the keyboard (0's , l's or any other character) until it detects an HDLC flag. Upon detection of the first flag, the program will continue to receive the characters from the keyboard and shows them on the screen until a flag is detected again. The program prints to the screen that the end flag has been detected and that the is the information keyed in between the two flags. No Carriage Return is allowed as part of your input at any time.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started