summaryrefslogtreecommitdiff
path: root/src/headers/ip46-header
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-01-25 15:52:18 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-01-25 15:52:18 +0000
commit00c9cb1b22cc17c4db573e0e613a5f116ff0092e (patch)
tree53178b2c52c6e97c6193f73378f3c5e5a781a914 /src/headers/ip46-header
parent2746b131aa482ac17c94bc6b82e58dbcc1b752cf (diff)
downloadskalibs-00c9cb1b22cc17c4db573e0e613a5f116ff0092e.tar.xz
More work on the types. This commit builds but has errors.
Rework src/headers entirely: build skalibs/types.h Convert skalibs/fmtscan.h types. Propagate changes until it builds. There are a lot of incompatible pointer issues remaining, those will be fixed with the buffer overhaul.
Diffstat (limited to 'src/headers/ip46-header')
-rw-r--r--src/headers/ip46-header7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/headers/ip46-header b/src/headers/ip46-header
index ba310d3..91d0c86 100644
--- a/src/headers/ip46-header
+++ b/src/headers/ip46-header
@@ -3,8 +3,9 @@
#ifndef IP46_H
#define IP46_H
+#include <sys/types.h>
+#include <stdint.h>
#include <errno.h>
-#include <skalibs/uint16.h>
#include <skalibs/bytestr.h>
#include <skalibs/fmtscan.h>
#include <skalibs/tai.h>
@@ -27,8 +28,8 @@ struct ip46full_s
#define ip46full_is6(i) ((i)->is6)
#define ip46full_fmt(s, i) ((i)->is6 ? ip6_fmt(s, (i)->ip) : ip4_fmt(s, (i)->ip))
-extern unsigned int ip46full_scan (char const *, ip46full_t *) ;
-extern unsigned int ip46full_scanlist (ip46full_t *, unsigned int, char const *, unsigned int *) ;
+extern size_t ip46full_scan (char const *, ip46full_t *) ;
+extern size_t ip46full_scanlist (ip46full_t *, size_t, char const *, size_t *) ;
#define ip46full_from_ip4(i, ip4) (byte_copy((i)->ip, 4, ip4), byte_zero((i)->ip + 4, 12), (i)->is6 = 0)
#define ip46full_from_ip6(i, ip6) (byte_copy((i)->ip, 16, ip6), (i)->is6 = 1)