summaryrefslogtreecommitdiff
path: root/src/headers/ip46-header
diff options
context:
space:
mode:
Diffstat (limited to 'src/headers/ip46-header')
-rw-r--r--src/headers/ip46-header11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/headers/ip46-header b/src/headers/ip46-header
index 3f872be..82c5e81 100644
--- a/src/headers/ip46-header
+++ b/src/headers/ip46-header
@@ -1,11 +1,12 @@
/* ISC license. */
-#ifndef IP46_H
-#define IP46_H
+#ifndef SKALIBS_IP46_H
+#define SKALIBS_IP46_H
#include <string.h>
#include <stdint.h>
#include <errno.h>
+
#include <skalibs/fmtscan.h>
#include <skalibs/socket.h>
@@ -15,7 +16,7 @@
#define IP4_LOCAL "\177\0\0\1"
#define IP6_LOCAL "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1"
-typedef struct ip46full_s ip46full_t, *ip46full_t_ref ;
+typedef struct ip46full_s ip46full, *ip46full_ref ;
struct ip46full_s
{
@@ -26,8 +27,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 size_t ip46full_scan (char const *, ip46full_t *) ;
-extern size_t ip46full_scanlist (ip46full_t *, size_t, char const *, size_t *) ;
+extern size_t ip46full_scan (char const *, ip46full *) ;
+extern size_t ip46full_scanlist (ip46full *, size_t, char const *, size_t *) ;
#define ip46full_from_ip4(i, ip4) (memcpy((i)->ip, ip4, 4), memset((i)->ip + 4, 0, 12), (i)->is6 = 0)
#define ip46full_from_ip6(i, ip6) (memcpy((i)->ip, ip6, 16), (i)->is6 = 1)