diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2018-11-30 17:36:16 +0100 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2018-12-04 06:26:37 +0300 |
commit | 68475cd0e1bfb30f8391e04ad2ec1770482ff74c (patch) | |
tree | b390f0aa2da2f8b2187fbde681be52224ce6c63d /crypto | |
parent | 896b7ae69c33721d70837202257d3674d22fe465 (diff) | |
download | accel-ppp-68475cd0e1bfb30f8391e04ad2ec1770482ff74c.tar.gz accel-ppp-68475cd0e1bfb30f8391e04ad2ec1770482ff74c.zip |
utils: add string parsing helpers
Define parsers for IPv6 addresses and CIDR notations, unsigned
integers, separators (variable number of space characters) and end of
strings (variable number of spaces followed by '\0').
All of these functions work on constant string and return the number
bytes parsed. If the input string doesn't have the expected format,
these functions return 0 (no forward progress).
Also implement a convenient wrapper around inet_ntop() that can be used
easily in printf-like functions.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions