diff options
author | dzwdz | 2022-08-22 18:14:31 +0200 |
---|---|---|
committer | dzwdz | 2022-08-22 18:14:31 +0200 |
commit | fcdadf5df39e1d72f9ac79fa384fc6b98be0b1aa (patch) | |
tree | 988b1c47a3f4e0689df4644bd7b16095d01877a5 /src/user/app/netstack/util.h | |
parent | 55900142023f7a27d467c7ce6a61d2e5ecead4e3 (diff) |
user/netstack: ip_parse
Diffstat (limited to 'src/user/app/netstack/util.h')
-rw-r--r-- | src/user/app/netstack/util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/user/app/netstack/util.h b/src/user/app/netstack/util.h index 5472b05..b8fa5c6 100644 --- a/src/user/app/netstack/util.h +++ b/src/user/app/netstack/util.h @@ -8,6 +8,8 @@ uint32_t crc32(const uint8_t *buf, size_t len); uint16_t ip_checksum(const uint8_t *buf, size_t len); +/* 0 on success, negative failure */ +int ip_parse(const char *s, uint32_t *ip); static inline void nput16(void *vbuf, uint16_t n) { uint8_t *b = vbuf; |