From ad541c67761b8aa6da1566802c347cac4018d0c2 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 2 Nov 2026 20:50:24 +0100 Subject: Move the build sources into src/ --- ot_ip.h | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 ot_ip.h (limited to 'ot_ip.h') diff --git a/ot_ip.h b/ot_ip.h deleted file mode 100644 index 533403e..0000000 --- a/ot_ip.h +++ /dev/null @@ -1,31 +0,0 @@ -/* This software was written by Dirk Engling - It is considered beerware. Prost. Skol. Cheers or whatever. */ - -#ifndef OT_IP_H__ -#define OT_IP_H__ - -#include -#include - -#include "trackerlogic.h" - -/* opentracker holds every address as sixteen bytes, writing IPv4 as the v4 - mapped form of RFC 4291 section 2.5.5.2. */ -extern const char ip_v4mapped_prefix[12]; - -static inline int ip_is_v4mapped(const void *ip) { return !memcmp(ip, ip_v4mapped_prefix, sizeof(ip_v4mapped_prefix)); } - -/* Read an address and return how many characters it took, or zero if src - does not start with one. A plain IPv4 address is accepted and stored in - its v4 mapped form. - - The count lets the caller carry on where the address ended, which is how - "address:port" and "address/bits" are read. */ -size_t ip_parse(const char *src, ot_ip6 ip); - -/* Write an address and return how many characters it took. Nothing is - terminated, so a caller may keep appending. A v4 mapped address is written - as the plain dotted quad rather than "::ffff:1.2.3.4". */ -size_t ip_format(char *dest, const ot_ip6 ip); - -#endif -- cgit v1.3