Back to index

glibc  2.9
resolv.h
Go to the documentation of this file.
00001 #ifndef _RESOLV_H_
00002 
00003 #define RES_SET_H_ERRNO(r,x)                     \
00004   do                                      \
00005     {                                     \
00006       (r)->res_h_errno = x;               \
00007       __set_h_errno(x);                          \
00008     }                                     \
00009   while (0)
00010 
00011 #include <stdbool.h>
00012 #include <resolv/resolv.h>
00013 
00014 #ifdef _RESOLV_H_
00015 
00016 # ifdef _LIBC_REENTRANT
00017 #  include <tls.h>
00018 #  if USE___THREAD
00019 #   undef _res
00020 #   ifndef NOT_IN_libc
00021 #    define __resp __libc_resp
00022 #   endif
00023 #   define _res (*__resp)
00024 extern __thread struct __res_state *__resp attribute_tls_model_ie;
00025 #  endif
00026 # else
00027 #  ifndef __BIND_NOSTATIC
00028 #   undef _res
00029 extern struct __res_state _res;
00030 #  endif
00031 # endif
00032 
00033 /* Now define the internal interfaces.  */
00034 extern int __res_vinit (res_state, int);
00035 extern int __res_maybe_init (res_state, int);
00036 extern void _sethtent (int);
00037 extern void _endhtent (void);
00038 extern struct hostent *_gethtent (void);
00039 extern struct hostent *_gethtbyname (const char *__name);
00040 extern struct hostent *_gethtbyname2 (const char *__name, int __af);
00041 struct hostent *_gethtbyaddr (const char *addr, size_t __len, int __af);
00042 extern u_int32_t _getlong (const u_char *__src);
00043 extern u_int16_t _getshort (const u_char *__src);
00044 extern void res_pquery (const res_state __statp, const u_char *__msg,
00045                      int __len, FILE *__file);
00046 extern void res_send_setqhook (res_send_qhook __hook);
00047 extern void res_send_setrhook (res_send_rhook __hook);
00048 extern int res_ourserver_p (const res_state __statp,
00049                          const struct sockaddr_in6 *__inp);
00050 extern void __res_iclose (res_state statp, bool free_addr);
00051 extern int __res_nopt(res_state statp, int n0, u_char *buf, int buflen,
00052                     int anslen);
00053 libc_hidden_proto (__res_ninit)
00054 libc_hidden_proto (__res_maybe_init)
00055 libc_hidden_proto (__res_nclose)
00056 libc_hidden_proto (__res_iclose)
00057 libc_hidden_proto (__res_randomid)
00058 libc_hidden_proto (__res_state)
00059 
00060 int __libc_res_nquery (res_state, const char *, int, int, u_char *, int,
00061                      u_char **, u_char **, int *, int *);
00062 int __libc_res_nsearch (res_state, const char *, int, int, u_char *, int,
00063                      u_char **, u_char **, int *, int *);
00064 int __libc_res_nsend (res_state, const u_char *, int, const u_char *, int,
00065                     u_char *, int, u_char **, u_char **, int *, int *)
00066   attribute_hidden;
00067 
00068 libresolv_hidden_proto (_sethtent)
00069 libresolv_hidden_proto (_gethtent)
00070 libresolv_hidden_proto (_gethtbyaddr)
00071 libresolv_hidden_proto (_gethtbyname2)
00072 libresolv_hidden_proto (__dn_expand)
00073 libresolv_hidden_proto (__dn_comp)
00074 libresolv_hidden_proto (__dn_skipname)
00075 libresolv_hidden_proto (__res_hnok)
00076 libresolv_hidden_proto (__res_dnok)
00077 libresolv_hidden_proto (__putlong)
00078 libresolv_hidden_proto (__putshort)
00079 libresolv_hidden_proto (__p_cdnname)
00080 libresolv_hidden_proto (__p_fqnname)
00081 libresolv_hidden_proto (__p_option)
00082 libresolv_hidden_proto (__sym_ntos)
00083 libresolv_hidden_proto (__p_rcode)
00084 libresolv_hidden_proto (__p_class)
00085 libresolv_hidden_proto (__p_type)
00086 libresolv_hidden_proto (__loc_ntoa)
00087 libresolv_hidden_proto (__fp_nquery)
00088 libresolv_hidden_proto (__fp_query)
00089 libresolv_hidden_proto (__hostalias)
00090 libresolv_hidden_proto (__res_nmkquery)
00091 libresolv_hidden_proto (__libc_res_nquery)
00092 libresolv_hidden_proto (__res_nquery)
00093 libresolv_hidden_proto (__res_nquerydomain)
00094 libresolv_hidden_proto (__res_hostalias)
00095 libresolv_hidden_proto (__libc_res_nsearch)
00096 libresolv_hidden_proto (__res_nsearch)
00097 libresolv_hidden_proto (__res_nameinquery)
00098 libresolv_hidden_proto (__res_queriesmatch)
00099 libresolv_hidden_proto (__res_nsend)
00100 libresolv_hidden_proto (__b64_ntop)
00101 libresolv_hidden_proto (__res_nopt)
00102 libresolv_hidden_proto (__dn_count_labels)
00103 libresolv_hidden_proto (__p_secstodate)
00104 
00105 extern const char *_res_opcodes[];
00106 libresolv_hidden_proto (_res_opcodes)
00107 
00108 #endif
00109 
00110 #endif