From fcdadf5df39e1d72f9ac79fa384fc6b98be0b1aa Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 22 Aug 2022 18:14:31 +0200 Subject: user/netstack: ip_parse --- src/user/app/netstack/util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/user/app/netstack/util.h') 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; -- cgit v1.2.3