expectedLength is in BYTES!
| 293 | |
| 294 | // expectedLength is in BYTES! |
| 295 | void 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. |
| 308 | void L3OctetAlignedProtocolElement::text(std::ostream&os) const { |