Skip to content

yahdlc - Yet Another HDLC implementation

License

Notifications You must be signed in to change notification settings

austinbes/yahdlc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 

Repository files navigation

yahdlc - Yet Another HDLC

Build Status Coverage Status Scan_Coverity License

The Yet Another High-Level Data Link Control implementation is a framing protocol optimized for embedded communication with single pass operations. It uses the HDLC asynchronous framing format. For more information see:

https://en.wikipedia.org/wiki/High-Level_Data_Link_Control

The supported frames are limited to DATA (I-frame with Poll bit), ACK (S-frame Receive Ready with Final bit) and NACK (S-frame Reject with Final bit). All DATA frames must be acknowledged or negative acknowledged using the defined ACK and NACK frames. The Address and Control fields uses the 8-bit format which means that the highest sequence number is 7. The FCS field is 16-bit.

Below are some examples on the usage:

Acknowledge of frames:
A ----> B   DATA [Seq No = 1]
A <---- B   DATA [Seq No = 4]
A <---- B    ACK [Seq No = 2]
A ----> B    ACK [Seq No = 5]

Negative acknowledge of frame:
A ----> B   DATA [Seq No = 1]
A <---- B   NACK [Seq No = 1]
A ----> B   DATA [Seq No = 1]

Acknowledge frame lost:
A ----> B   DATA [Seq No = 1]
A  X<-- B    ACK [Seq No = 2]
*Timeout*
A ----> B   DATA [Seq No = 1]

Programming languages

Currently yahdlc supports C/C++ and Python. Python bindings for yahdlc has been implemented by SkypLabs and can be found here:

https://github.com/SkypLabs/python4yahdlc

About

yahdlc - Yet Another HDLC implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 54.9%
  • C 42.8%
  • Makefile 2.3%