class NetlinkEncoder
Defined at line 252 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 256 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void WriteSpan (const std::span<const uint8_t> & data)
Defined at line 260 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void WriteString (const std::string_view & data)
Defined at line 262 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 266 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 272 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void NetlinkEncoder ()
Defined at line 276 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void NetlinkEncoder (__u16 type, __u16 flags)
Defined at line 277 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void StartMessage (__u16 type, __u16 flags)
Starts a new netlink message
Defined at line 280 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void BeginGenetlinkHeader (__u8 cmd)
Begins a genetlink message
Defined at line 294 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void BeginNla (__u16 type)
Starts encoding an NLA
Defined at line 303 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
void EndNla ()
Finishes encoding an NLA
Defined at line 313 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
template <typename T>
void AddRtAttr (uint16_t type, T & attr)
Defined at line 321 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 330 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 342 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h
uint32_t sequence ()
Defined at line 344 of file ../../src/starnix/tests/syscalls/cpp/test_helper.h