Make this more like a struct sockaddr again (like it used to be). In
[platform/upstream/libsoup.git] / libsoup / soup-dns.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2000-2003, Ximian, Inc.
4  */
5
6 #ifndef SOUP_DNS_H
7 #define SOUP_DNS_H
8
9 #include <glib.h>
10 #include <sys/types.h>
11 #include <sys/socket.h>
12 #include <netdb.h>
13
14 #include <libsoup/soup-error.h>
15
16 typedef gpointer SoupDNSHandle;
17 typedef void   (*SoupGetHostByFn)          (SoupDNSHandle       handle,
18                                             SoupKnownErrorCode  status,
19                                             struct hostent     *h,
20                                             gpointer            user_data);
21
22 SoupDNSHandle    soup_gethostbyname        (const char         *name, 
23                                             SoupGetHostByFn     func,
24                                             gpointer            data);
25
26 SoupDNSHandle    soup_gethostbyaddr        (gpointer            addr,
27                                             int                 family,
28                                             SoupGetHostByFn     func,
29                                             gpointer            data);
30
31 void             soup_gethostby_cancel     (SoupDNSHandle       id);
32
33 char            *soup_ntop                 (gconstpointer       addr,
34                                             int                 family);
35
36 #endif /* SOUP_DNS_H */