Introduce the ByteBuffer abstraction
Added the "common" directory for common packet manipulation and testing helpers. This CL introduces the ByteBuffer interface and two specializations thereof where one is stack allocated and the other is based on malloc. The general idea is here is that transport and packet layers don't need to know how a packet is allocated and a buffer interface should abstract away its allocation, move, and copy semantics. In the future we can add various specializations of this, e.g. using a malloc or VMO backed slab allocator. This CL also adds a top-level BUILD.gn defining the high-level build groups. Change-Id: I93b01625e3bdaac0a9754c2cabc86e29dee2c660
Showing
- .clang-format 1 addition, 0 deletions.clang-format
- BUILD.gn 16 additions, 0 deletionsBUILD.gn
- common/BUILD.gn 31 additions, 0 deletionscommon/BUILD.gn
- common/byte_buffer.cc 71 additions, 0 deletionscommon/byte_buffer.cc
- common/byte_buffer.h 139 additions, 0 deletionscommon/byte_buffer.h
- common/byte_buffer_unittest.cc 87 additions, 0 deletionscommon/byte_buffer_unittest.cc
- common/test_helpers.h 51 additions, 0 deletionscommon/test_helpers.h
- test/BUILD.gn 15 additions, 0 deletionstest/BUILD.gn
- test/test_main.cc 13 additions, 0 deletionstest/test_main.cc
Loading
Please register or sign in to comment