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

Method parseV

GSM/GSML3Message.cpp:295–305  ·  view source on GitHub ↗

expectedLength is in BYTES!

Source from the content-addressed store, hash-verified

293
294// expectedLength is in BYTES!
295void L3OctetAlignedProtocolElement::parseV(const L3Frame&src, size_t&rp, size_t expectedLength) {
296 LOG(DEBUG) <<LOGVAR(rp) <<LOGVAR(expectedLength) << " (these are not supposed to match)";
297 mExtant = true;
298 if (!expectedLength) return;
299 char *tmp = (char *)malloc(expectedLength);
300 for (unsigned i = 0; i < expectedLength; i++) {
301 tmp[i] = src.readField(rp,8);
302 }
303 mData = string(tmp,expectedLength);
304 free(tmp);
305}
306
307// Print it out as a hex string.
308void L3OctetAlignedProtocolElement::text(std::ostream&os) const {

Callers 3

parseBodyMethod · 0.45
parseBodyMethod · 0.45
parseBodyMethod · 0.45

Calls 1

readFieldMethod · 0.80

Tested by

no test coverage detected