+union gen_addr {
+ struct in_addr v4;
+ struct in6_addr v6;
+};
+
+typedef struct {
+ int af;
+ int width;
+ int delim;
+ int nrevcomp;
+ int revcompwd;
+ adns_rrtype rrtype;
+ void *(*sockaddr_to_inaddr)(struct sockaddr *sa);
+ int (*sockaddr_equalp)(const struct sockaddr *sa,
+ const struct sockaddr *sb);
+ void (*prefix_mask)(int len, union gen_addr *a);
+ int (*guess_len)(const union gen_addr *a);
+ int (*matchp)(const union gen_addr *addr,
+ const union gen_addr *base, const union gen_addr *mask);
+ int (*rev_parsecomp)(const char *p, size_t n);
+ void (*rev_mkaddr)(union gen_addr *addr, const byte *ipv);
+ char *(*rev_mkname)(const struct sockaddr *sa, char *buf);
+} afinfo;
+
+struct afinfo_addr { const afinfo *ai; union gen_addr addr; };
+