9 static stralloc data = {0};
11 static int init(
char ip[256])
33 if (i == -1)
return -1;
37 for (j = 0;j < data.len;++j)
38 if (data.s[j] ==
'\n') {
41 while ((data.s[i] ==
' ') || (data.s[i] ==
'\t'))
44 if (
ip6_scan(data.s + i,ip + iplen)) {
54 byte_copy(ip,16,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1");
62 static unsigned int uses;
63 static struct taia deadline;
75 if (init(ip) == -1)
return -1;
void byte_copy(void *, unsigned int, const void *)
int openreadclose(const char *fn, stralloc *sa, unsigned int bufsize)
int dns_resolvconfip(char s[256])
int stralloc_append(stralloc *, const char *)
int taia_now(struct taia *)
int taia_less(const struct taia *, const struct taia *)
unsigned int ip6_scan(const char *src, char *ip)
void taia_add(struct taia *, const struct taia *, const struct taia *)
void byte_zero(void *, unsigned int)
void taia_uint(struct taia *, unsigned int)
char * env_get(const char *s)
#define byte_equal(s, n, t)