MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / readLI

Method readLI

GPRS/ByteVector.cpp:242–247  ·  view source on GitHub ↗

Length Indicator: GSM08.16 sec 10.1.2 The length indicator may be 1 or 2 bytes, depending on bit 8, which is 0 to indicate a 15 bit length, or 1 to indicate a 7 bit length.

Source from the content-addressed store, hash-verified

240// The length indicator may be 1 or 2 bytes, depending on bit 8,
241// which is 0 to indicate a 15 bit length, or 1 to indicate a 7 bit length.
242unsigned ByteVector::readLI(size_t &wp)
243{
244 unsigned byte1 = getByte(wp++);
245 if (byte1 & 0x80) { return byte1 & 0x7f; }
246 return (byte1 * 256) + getByte(wp++);
247}
248
249// This is a two byte length indicator as per GSM 08.16 10.1.2
250void ByteVector::appendLI(unsigned len)

Callers 1

parseDLUnitDataBodyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected