chiark / gitweb /
Make list_length and string_item_to_ipaddr const-correct.
[secnet.git] / secnet.h
index 3fba00f406862d14abe59e97e54dad5cdfe12b58..78dc676f4eb72f3180c03601e98917c8b79b6d9f 100644 (file)
--- a/secnet.h
+++ b/secnet.h
@@ -33,6 +33,9 @@ typedef _Bool bool_t;
 union iaddr {
     struct sockaddr sa;
     struct sockaddr_in sin;
+#ifdef CONFIG_IPV6
+    struct sockaddr_in6 sin6;
+#endif
 };
 
 #define ASSERT(x) do { if (!(x)) { fatal("assertion failed line %d file " \
@@ -111,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 */