X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=blobdiff_plain;f=secnet.h;h=a38b77c00f6f78e3bbe94a3683222f554afe0905;hp=3a91d3f04da28c480f3f07d97e49c40ac7f2b13a;hb=8607c2f37c532b8ab1b7fafc48dcccfd5c252423;hpb=22fb98aea620037f03a00d107320eab0c3e933cc diff --git a/secnet.h b/secnet.h index 3a91d3f..a38b77c 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 */ @@ -293,7 +295,7 @@ struct buffer_if; will be freed once resolve_answer_fn returns. It is in network byte order. */ typedef void resolve_answer_fn(void *st, const struct comm_addr *addrs, - int naddrs); + int 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); @@ -342,6 +344,7 @@ struct comm_addr { equivalent. */ struct comm_if *comm; union iaddr ia; + int ix; }; /* Return True if the packet was processed, and shouldn't be passed to @@ -569,6 +572,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);