Pack a vrt header from metadata (big endian format).
Packing contract
Requirements:
- packet_buff points to a valid address space with enough space to write the entire buffer, regardless of its length. At the very least, it must be able to hold an entire header.
- if_packet_info has the following members set to correct values:
- has_* members all set accordingly
- For every true has_* member, the corresponding variable holds a valid value (e.g. if has_sid is true, sid contains a valid SID)
- num_payload_bytes and num_payload_words32 are both set to the correct values
Result:
- packet_buff now points to a valid header that can be sent over the transport without further modification
- The following members on if_packet_info are set:
- num_header_words32
- num_packet_words32
- Parameters
-
packet_buff | memory to write the packed vrt header |
if_packet_info | the if packet info (read/write) |