view src/dns.h @ 1494:9225a90ad7dd

make Doctree a non-virtual class Doctree now is a proper class with it's own implementation. StyleEngine no longer needs to provide the Doctree interface itself. This hopefully make the code easier to understand and should also be a bit faster as no virtual methods are involved.
author Johannes Hofmann <>
date Thu, 07 Jan 2010 16:23:05 +0100
parents d598ecc970c6
children 879c110ecb57
line wrap: on
line source
#ifndef __DNS_H__
#define __DNS_H__

#include <netinet/in.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

typedef void (*DnsCallback_t)(int Status, Dlist *addr_list, void *data);

void a_Dns_init (void);
void a_Dns_freeall(void);
void a_Dns_resolve(const char *hostname, DnsCallback_t cb_func, void *cb_data);

#ifdef ENABLE_IPV6
#  define DILLO_ADDR_MAX sizeof(struct in6_addr)
#  define DILLO_ADDR_MAX sizeof(struct in_addr)

typedef struct _DilloHost
  int af;
  int alen;
  char data[DILLO_ADDR_MAX];
} DilloHost;
void a_Dns_dillohost_to_string(DilloHost *host, char *dst, size_t size);

#ifdef __cplusplus
#endif /* __cplusplus */

#endif /* __DNS_H__ */