class NetlinkEncoder
Defined at line 248 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
Encoder for serializing netlink messages
Public Methods
template <typename T>
void Write (const T & value)
Writes a value to the buffer at the current offset
Defined at line 252 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void WriteSpan (const std::span<const uint8_t> & data)
Defined at line 256 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void WriteString (const std::string_view & data)
Defined at line 258 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
template <typename T>
void Write (T & value, size_t offset)
Writes a value to the buffer at a specified offset
Defined at line 262 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
template <typename T>
void Read (T & out, size_t offset)
Reads a value from the buffer at a specified offset
Defined at line 268 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void NetlinkEncoder ()
Defined at line 272 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void NetlinkEncoder (__u16 type, __u16 flags)
Defined at line 273 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void StartMessage (__u16 type, __u16 flags)
Starts a new netlink message
Defined at line 276 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void BeginGenetlinkHeader (__u8 cmd)
Begins a genetlink message
Defined at line 290 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void BeginNla (__u16 type)
Starts encoding an NLA
Defined at line 299 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void EndNla ()
Finishes encoding an NLA
Defined at line 309 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
template <typename T>
void AddRtAttr (uint16_t type, T & attr)
Defined at line 317 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void Finalize (iovec & out)
Finalizes the message, allowing it to be sent using sendmsg.
Defined at line 326 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void Clear ()
Clears the buffer, invalidating any iovecs that were
obtained from this encoder.
Defined at line 338 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
uint32_t sequence ()
Defined at line 340 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h