Encode all data that follows the headers as metadata-> \return Whether the stream is still valid.
| 279 | /// Encode all data that follows the headers as metadata-> |
| 280 | /// \return Whether the stream is still valid. |
| 281 | bool BpfReader::readHeaderExtraData() |
| 282 | { |
| 283 | if (m_stream.position() < m_header.m_len) |
| 284 | { |
| 285 | std::streampos size = m_header.m_len - m_stream.position(); |
| 286 | std::vector<uint8_t> buf(size); |
| 287 | m_stream.get(buf); |
| 288 | m_metadata.addEncoded("header_data", buf.data(), buf.size()); |
| 289 | } |
| 290 | return (bool)m_stream; |
| 291 | } |
| 292 | |
| 293 | |
| 294 | bool BpfReader::readPolarData() |