ares_library_init.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef HEADER_CARES_LIBRARY_INIT_H
  2. #define HEADER_CARES_LIBRARY_INIT_H
  3. /* Copyright 1998 by the Massachusetts Institute of Technology.
  4. * Copyright (C) 2004-2011 by Daniel Stenberg
  5. *
  6. * Permission to use, copy, modify, and distribute this
  7. * software and its documentation for any purpose and without
  8. * fee is hereby granted, provided that the above copyright
  9. * notice appear in all copies and that both that copyright
  10. * notice and this permission notice appear in supporting
  11. * documentation, and that the name of M.I.T. not be used in
  12. * advertising or publicity pertaining to distribution of the
  13. * software without specific, written prior permission.
  14. * M.I.T. makes no representations about the suitability of
  15. * this software for any purpose. It is provided "as is"
  16. * without express or implied warranty.
  17. */
  18. #include "ares_setup.h"
  19. #ifdef USE_WINSOCK
  20. #include <iphlpapi.h>
  21. #include <ares_iphlpapi.h>
  22. typedef DWORD (WINAPI *fpGetNetworkParams_t) (FIXED_INFO*, DWORD*);
  23. typedef BOOLEAN (APIENTRY *fpSystemFunction036_t) (void*, ULONG);
  24. typedef ULONG (WINAPI *fpGetAdaptersAddresses_t) ( ULONG, ULONG, void*, IP_ADAPTER_ADDRESSES*, ULONG* );
  25. typedef NETIO_STATUS (WINAPI *fpGetBestRoute2_t) ( NET_LUID *, NET_IFINDEX, const SOCKADDR_INET *, const SOCKADDR_INET *, ULONG, PMIB_IPFORWARD_ROW2, SOCKADDR_INET * );
  26. /* Forward-declaration of variables defined in ares_library_init.c */
  27. /* that are global and unique instances for whole c-ares library. */
  28. extern fpGetNetworkParams_t ares_fpGetNetworkParams;
  29. extern fpSystemFunction036_t ares_fpSystemFunction036;
  30. extern fpGetAdaptersAddresses_t ares_fpGetAdaptersAddresses;
  31. extern fpGetBestRoute2_t ares_fpGetBestRoute2;
  32. #endif /* USE_WINSOCK */
  33. #endif /* HEADER_CARES_LIBRARY_INIT_H */