Some helpers for en/decoding XDR faster
For 64 bit platforms only: Decodes 4 bytes at this string position as a signed 32 bit int in network byte order
There is no index bounds check!
For 64 bit platforms only: Encodes 4 bytes at this string position as a signed 32 bit int in network byte order
There is no index bounds check!
let pos' = s_read_string_array s pos len max a
:
Decodes the XDR repr of an array of strings without length field.
The array must start at pos
in s
, and may have up to len
bytes.
The array is passed in a
, and the elements are set by this routine.
Returns in pos'
the position of the first
byte after the array. It is checked whether
the array is represented within the allowed len
bytes. If not,
pos'=-1
will be returned, together with an empty array.
max
is the maximum length of the string elements. max
is
unsigned. If this is violated, pos'=-2
will be returned.