Skip to content
Commit e088b06e authored by Johan Hedberg's avatar Johan Hedberg
Browse files

net: buf: Add API for saving & restoring parsing state



Occasionally it may be useful to pass a buffer to a subroutine and
have the routine do parsing of the buffer. However, since there isn't
necessarily a guarantee of how the subroutine performs the parsing it
may be necessary to restore to a well known state after the routine
returns.

This patch adds a simple struct for storing the parsing state as well
as two new functions to save and restore the state.

Change-Id: If9153ff9997021c76243ea9ebff13dfe94c45faa
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent d84dcb96
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment