This structure provides the pointer to basic functions that are needed for generic header operations. All header fields will have pointer to this structure, so that they can be manipulated uniformly.
Pointer to function to shallow clone the header. Shallow cloning will just make a memory copy of the original header, thus all pointers in original header will be kept intact. Because the function does not need to perform deep copy, the operation should be faster, but the application must make sure that the original header is still valid throughout the lifetime of new header.
Pointer to function to print the header to the specified buffer. Returns the length of string written, or -1 if the remaining buffer is not enough to hold the header.
Parameters
hdr
The header to print.
buf
The buffer.
len
The size of the buffer.
Returns
The size copied to buffer, or -1 if there's not enough space.
The documentation for this struct was generated from the following file: