15#define SR_packet_sizeOffset 0
16#define SR_packet_destinationOffset (sizeof(SR_packet::size))
17#define SR_packet_payloadOffset (sizeof(SR_packet::size) + sizeof(SR_packet::destination))
18#define SR_packet_headerSize SR_packet_payloadOffset
38 std::cout <<
"SR_packet {\n"
39 <<
"\tsize: " << packet.
size <<
"\n"
42 << std::setfill(
'0') << std::hex;
43 for (uint64_t i = frameSize; i > 0; --i) {
44 std::cout << std::setw(2) << (int)(((uint8_t*)&packet.
payload)[i - 1]) <<
" ";
46 std::cout << std::dec << std::endl;
#define SR_packet_payloadOffset
Definition: packet.h:17
static void SR_packet_print(SR_packet &packet)
Print raw contents of SR network packet.
Definition: packet.h:36
C-compatible struct for communication between SR applications.
Definition: packet.h:25
uint64_t destination
Definition: packet.h:27
uint64_t payload
Start of binary payload data.
Definition: packet.h:28
uint64_t size
Definition: packet.h:26