History log of /system/connectivity/wifilogd/memory_reader.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5a4f6db6c026bcfd575f7a91698266fe66fbed06 14-Oct-2016 mukesh agrawal <quiche@google.com> add MemoryReader

When dumping log messages, we want to deconstruct an
arbitrary memory region into semantically meaningful
parts. E.g. protocol::Command header, protocol::AsciiMessage
header, message tag, message data.

MemoryReader aids in this deconstruction. A MemoryReader
refers to an un-owned memory region, and provides convenient
ways to:
a) read a trivially-copyable object out the memory region, and
b) read |n| bytes out of the memory region.

In both cases, MemoryReader verifies that the requested read
operation does not exceed the number of available bytes.

Bug: 32256071
Test: ./runtests.sh (on angler)
Change-Id: I8ca77aceff7204756fe225149178f34dd584c757
/system/connectivity/wifilogd/memory_reader.cpp