X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/61dbc9e060153651a0d4eecac5a5fab1c36fa530..d4a85f9aa0b85e9e5b7cac3c4036a485900b0fc9:/secnet.h diff --git a/secnet.h b/secnet.h index 628a755..6724698 100644 --- a/secnet.h +++ b/secnet.h @@ -3,6 +3,8 @@ #ifndef secnet_h #define secnet_h +#define ADNS_FEATURE_MANYAF + #include "config.h" #include #include @@ -114,7 +116,7 @@ extern cstring_t *dict_keys(dict_t *dict); /* List-manipulation functions */ extern list_t *list_new(void); -extern int32_t list_length(list_t *a); +extern int32_t list_length(const list_t *a); extern list_t *list_append(list_t *a, item_t *i); extern list_t *list_append_list(list_t *a, list_t *b); /* Returns an item from the list (index starts at 0), or NULL */ @@ -295,7 +297,8 @@ struct buffer_if; actually found in the DNS, which may be bigger if addrs is equal to MAX_PEER_ADDRS (ie there were too many). */ typedef void resolve_answer_fn(void *st, const struct comm_addr *addrs, - int naddrs, int was_naddrs); + int naddrs, int was_naddrs, + const char *failwhy); typedef bool_t resolve_request_fn(void *st, cstring_t name, int remoteport, struct comm_if *comm, resolve_answer_fn *cb, void *cst); @@ -339,6 +342,7 @@ struct comm_addr { freely copy it. */ struct comm_if *comm; union iaddr ia; + int ix; /* see comment `Re comm_addr.ix' in udp.c */ }; /* Return True if the packet was processed, and shouldn't be passed to @@ -574,6 +578,7 @@ extern void log_from_fd(int fd, cstring_t prefix, struct log_if *log); #define STRING(x) STRING2(x) #define FILLZERO(obj) (memset(&(obj),0,sizeof((obj)))) +#define ARRAY_SIZE(ary) (sizeof((ary))/sizeof((ary)[0])) /* * void COPY_OBJ( OBJECT& dst, const OBJECT& src);