[ovs-dev] [PATCH v3 2/3] util: Introduce ovs_scan_len()

Pravin Shelar pshelar at nicira.com
Tue Nov 11 16:47:26 UTC 2014


On Tue, Nov 11, 2014 at 7:51 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Mon, Nov 10, 2014 at 12:46:11PM -0800, Pravin B Shelar wrote:
>> This is similar to ovs_scan but takes int pointer as extra
>> parameter, this pointer point to starting index of the string.
>> On successful scan this API stores number of characters
>> scanned.  This API is useful for parsing complex odp actions
>> e.g. tun_push action.
>>
>> Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
>
> Isn't this the same as the %n format specifier?

Nope, %n gives me string length for current call. I need to track
string offset across many call to ovs_scan, this function keeps
current offset in new parameter.



More information about the dev mailing list