chiark / gitweb /
Make list_length and string_item_to_ipaddr const-correct.
[secnet.git] / secnet.h
index 1c88e3a0c744ce5251a6085c38fdad56a189ec89..56872ed00e6c6eaf437b8af98aef2ad619591d1b 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 */