]> sjero.net Git - wget/blobdiff - src/host.h
[svn] Remove K&R support.
[wget] / src / host.h
index 5029c9c24e21ef663a7a2c2a13df9860bfd03e34..786a9645f624e261565dd1667f48c2a33d5138e3 100644 (file)
@@ -49,9 +49,9 @@ struct address_list;
 typedef struct {
   /* Address type. */
   enum { 
-    IPV4_ADDRESS
+    IPV4_ADDRESS
 #ifdef ENABLE_IPV6
-    IPV6_ADDRESS 
+    IPV6_ADDRESS 
 #endif /* ENABLE_IPV6 */
   } type;
 
@@ -61,9 +61,9 @@ typedef struct {
 #ifdef ENABLE_IPV6
     struct {
       struct in6_addr addr;
-#ifdef HAVE_SOCKADDR_IN6_SCOPE_ID
+# ifdef HAVE_SOCKADDR_IN6_SCOPE_ID
       unsigned int scope_id;
-#endif /* HAVE_SOCKADDR_IN6_SCOPE_ID */
+# endif
     } ipv6;
 #endif /* ENABLE_IPV6 */
     struct {
@@ -90,27 +90,29 @@ typedef struct {
 #define ADDRESS_IPV6_DATA(x) ((void *)&(x)->u.ipv6.addr)
 #define ADDRESS_IPV6_SCOPE(x) ((x)->u.ipv6.scope_id)
 
-/* Function declarations */
-struct address_list *lookup_host PARAMS ((const char *, int));
-struct address_list *lookup_host_passive PARAMS ((const char *));
-
-void forget_host_lookup PARAMS ((const char *));
-
-void address_list_get_bounds PARAMS ((const struct address_list *,
-                                     int *, int *));
-const ip_address *address_list_address_at PARAMS ((const struct address_list *,
-                                                  int));
-int address_list_find PARAMS ((const struct address_list *, const ip_address *));
-void address_list_set_faulty PARAMS ((struct address_list *, int));
-void address_list_set_connected PARAMS ((struct address_list *));
-int address_list_connected_p PARAMS ((const struct address_list *));
-void address_list_release PARAMS ((struct address_list *));
-
-const char *pretty_print_address PARAMS ((const ip_address *));
+enum {
+  LH_SILENT  = 1,
+  LH_BIND    = 2,
+  LH_REFRESH = 4
+};
+struct address_list *lookup_host (const char *, int);
+
+void address_list_get_bounds (const struct address_list *, int *, int *);
+const ip_address *address_list_address_at (const struct address_list *, int);
+int address_list_contains (const struct address_list *, const ip_address *);
+void address_list_set_faulty (struct address_list *, int);
+void address_list_set_connected (struct address_list *);
+int address_list_connected_p (const struct address_list *);
+void address_list_release (struct address_list *);
+
+const char *pretty_print_address (const ip_address *);
+#ifdef ENABLE_IPV6
+int is_valid_ipv6_address (const char *, const char *);
+#endif
 
-int accept_domain PARAMS ((struct url *));
-int sufmatch PARAMS ((const char **, const char *));
+int accept_domain (struct url *);
+int sufmatch (const char **, const char *);
 
-void host_cleanup PARAMS ((void));
+void host_cleanup (void);
 
 #endif /* HOST_H */