chiark / gitweb /
udp: Support IPv6 (mostly)
[secnet.git] / secnet.h
index 628a7555f3e38213eb44efe883fe1250dd8dbf7f..ead74716e3fd7e18a2c51cac78278350534cc74f 100644 (file)
--- a/secnet.h
+++ b/secnet.h
@@ -114,7 +114,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 */
@@ -339,6 +339,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 +575,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);