9static char fnserver[4 + IPFMT];
10static char fncurve[4 + IPFMT];
11static char fnedns0[4 + IPFMT];
12static char fnctxtq[4 + IPFMT];
26 fnserver[0] = fncurve[0] = fnctxtq[0] = fnedns0[0] =
'i';
27 fnserver[1] = fncurve[1] = fnctxtq[1] = fnedns0[1] =
'p';
28 fnserver[2] = fncurve[2] = fnctxtq[2] = fnedns0[2] =
'/';
35 if (byte_equal(
ip,12,V4mappedprefix)) {
36 fnserver[4 + ip4_fmt(fnserver + 4,
ip + 12)] = 0;
37 fncurve[4 + ip4_fmt(fncurve + 4,
ip + 12)] = 0;
38 fnedns0[4 + ip4_fmt(fnedns0 + 4,
ip + 12)] = 0;
39 fnctxtq[4 + ip4_fmt(fnctxtq + 4,
ip + 12)] = 0;
41 fnserver[4 + ip6_fmt(fnserver + 4,
ip)] = 0;
42 fncurve[4 + ip6_fmt(fncurve + 4,
ip)] = 0;
43 fnedns0[4 + ip6_fmt(fnedns0 + 4,
ip)] = 0;
44 fnctxtq[4 + ip6_fmt(fnctxtq + 4,
ip)] = 0;
47 if (stat(fnedns0,&st) == 0)
return 2;
48 if (stat(fnserver,&st) == 0)
return 1;
49 if (stat(fncurve,&st) == 0)
return -1;
50 if (stat(fnctxtq,&st) == 0)
return -2;
int serverok(char ip[16])