Description
Get per-stack options for all subsequently created stacks. These override any global per-stack environment options already set. When using this function, check the scope field on the environment variable, for example:
- EF_NAME
-
Default: none
Maximum: 8 chars
Scope: per-stack
Definition
int onload_stack_opt_get_str(const char* name, char* value, size_t* value_len)
Formal Parameters
-
name - Stack option to get.
-
value - Location to receive the stack option.
-
value_len - Chars available to receive the stack option.
Example
onload_stack_opt_get_str(“EF_NAME”, &value, &value_len);
Return Value
0 on success
errno set to EINVAL if the requested option is not found or ENOMEM.
When buffer is too small -ENOSPC is returned, and the required buffer size is stored in value_len.
Notes
- Cannot be used to get per-process options - only per-stack options.