zaninime / go-hdlc Goto Github PK
View Code? Open in Web Editor NEWHigh-Level Data Link Control implementation in Go.
License: MIT License
High-Level Data Link Control implementation in Go.
License: MIT License
} else if b < 0x20 {
// skip byte introduced by DCE
}
if (b) < 0x20 || ((b)&0x7f) == 0x7d || ((b)&0x7f) == 0x7e {
// ...
}
RFC 1662, section 4.2 Transparency:
After FCS computation, the transmitter examines the entire frame
between the two Flag Sequences. Each Flag Sequence, Control Escape
octet, and any octet which is flagged in the sending Async-Control-
Character-Map (ACCM), is replaced by a two octet sequence consisting
of the Control Escape octet followed by the original octet
exclusive-or'd with hexadecimal 0x20.
On reception, prior to FCS computation, each octet with value less
than hexadecimal 0x20 is checked. If it is flagged in the receiving
ACCM, it is simply removed (it may have been inserted by intervening
data communications equipment). Each Control Escape octet is also
removed, and the following octet is exclusive-or'd with hexadecimal
0x20, unless it is the Flag Sequence (which aborts a frame).
If no asyncmap option is given, the default is zero, so pppd will ask the peer not to escape any control characters.
Add decoding of flags when the frame shifted n bits. There are situations when a frame is not a multiple of a byte and the flag is shifted by several bits.
like this:
[]byte{0x3F, 0x81, 0x84, 0x00, 0xF8, 0xE0, 0x6B, 0xFD, 0xFC}
0x3F and 0xFC - HDLC Flags
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.