onload_stackname_restore

Onload User Guide (UG1586)

Document ID
UG1586
Release Date
2023-07-31
Revision
1.2 English

Description

Restore stack state saved with a previous call to onload_stackname_save(). All updates/changes to state of the current stack will be deleted and all state previously saved will be restored. To avoid unexpected results, the stack should be restored in the same thread as used to call onload_stackname_save().

Definition

int onload_stackname_restore (void)

Formal Parameters

none

Return Value

0 on success

non-zero if an error occurs.

Notes

The API stackname save and restore functions provide flexibility when binding sockets to an Onload stack.

Using a combination of onload_set_stackname(), onload_stackname_save() and onload_stackname_restore(), the user is able to create default stack settings which apply to one or more sockets, save this state and then create changed stack settings which are applied to other sockets. The original default settings can then be restored to apply to subsequent sockets.