
#include <pthread.h>

#ifndef _RES_INTERNAL_H
#define _RES_INTERNAL_H

struct res_data {
    struct hostent_answer answer;
    struct __res_state state;
    FILE *hostfp;
    int keep_hostfp_open;
    int errval;
    int socket;
};

typedef union {
    HEADER hdr;
    unsigned char buf[MAXPACKET];
} querybuf;

typedef union {
    long al;
    char ac;
} align;

__BEGIN_DECLS
struct hostent *_res_parse_answer(querybuf *answer, int anslen,
				  int type, struct hostent_answer *result,
				  struct res_data *data);
void _res_set_error(int val);
struct res_data *_res_init(void);
struct hostent *_gethtent(const char *name, struct hostent_answer *result);
__END_DECLS

#endif

