summaryrefslogtreecommitdiff
path: root/accel-pppd/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/utils.h')
-rw-r--r--accel-pppd/utils.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/accel-pppd/utils.h b/accel-pppd/utils.h
index 87582648..d3e06083 100644
--- a/accel-pppd/utils.h
+++ b/accel-pppd/utils.h
@@ -2,11 +2,25 @@
#define __UTILS_H
#include <netinet/in.h>
+#include <stdint.h>
+
+char *u_ip6str(const struct in6_addr *addr, char *buf);
void u_inet_ntoa(in_addr_t, char *str);
int u_readlong(long int *dst, const char *src, long int min, long int max);
+
+size_t u_parse_spaces(const char *str);
+size_t u_parse_endstr(const char *str);
+
+size_t u_parse_u8(const char *str, uint8_t *val);
+size_t u_parse_u16(const char *str, uint16_t *val);
+size_t u_parse_u32(const char *str, uint32_t *val);
+
int u_parse_ip4addr(const char *src, struct in_addr *addr,
const char **err_msg);
+size_t u_parse_ip6addr(const char *str, struct in6_addr *addr);
+size_t u_parse_ip6cidr(const char *str, struct in6_addr *netp, uint8_t *plen);
+
int u_randbuf(void *buf, size_t buf_len, int *err);
#endif