10#define SR_packet_sizeOffset 0
11#define SR_packet_destinationOffset (sizeof(SR_packet::size))
12#define SR_packet_payloadOffset (sizeof(SR_packet::size) + sizeof(SR_packet::destination))
13#define SR_packet_headerSize SR_packet_payloadOffset
33 std::cout <<
"SR_packet {\n"
34 <<
"\tsize: " << packet.
size <<
"\n"
37 << std::setfill(
'0') << std::hex;
38 for (uint64_t i = frameSize; i > 0; --i) {
39 std::cout << std::setw(2) << (int)(((uint8_t*)&packet.
payload)[i - 1]) <<
" ";
41 std::cout << std::dec << std::endl;
#define SR_packet_payloadOffset
Definition: packet.h:12
static void SR_packet_print(SR_packet &packet)
Print raw contents of SR network packet.
Definition: packet.h:31
C-compatible struct for communication between SR applications.
Definition: packet.h:20
uint64_t destination
Definition: packet.h:22
uint64_t payload
Start of binary payload data.
Definition: packet.h:23
uint64_t size
Definition: packet.h:21