Description
Takes an array of onload_template_msg_update_iovec
to describe changes to the base packet populated by the onload_msg_template_alloc()
function. Each of the update iovecs should describe a single change. The update function is used to overwrite existing template content or to send the complete template content when the ONLOAD_TEMPLATE_FLAGS_SEND_NOW flag is set.
Definition
extern int onload_msg_template_update(
int fd,
onload_template_handle* handle,
struct onload_template_msg_update_iovec* updates,
int ulen,
unsigned flags);
Formal Parameters
-
fd
- File descriptor to send on.
-
handle
- Template handle, returned from the alloc function.
-
onload_template_msg_update_iovec
- Array of
onload_template_msg_update_iovec
each of which is a change to the template payload. -
ulen
- Length of updates array (the number of changes).
-
flags
- See below. Can also be set to zero.
Return Value
0 on success.
Non-zero otherwise.
Notes
If the ONLOAD_TEMPLATE_FLAGS_SEND_NOW flag is set, ownership of the template is passed to Onload.
This function can be called multiple times and changes are cumulative.
Flags
-
ONLOAD_TEMPLATE_FLAGS_SEND_NOW
- Perform the template update, send the template contents and pass ownership
of the template to Onload.
To send without updating template contents – updates=NULL, ulen=0 and set the send now flag.
-
ONLOAD_TEMPLATE_FLAGS_DONTWAIT
(same as MSG_DONTWAIT) - Do not block.