2
0

getgateway.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* $Id: getgateway.h,v 1.3 2008/07/02 22:33:06 nanard Exp $ */
  2. /* libnatpmp
  3. * Copyright (c) 2007, Thomas BERNARD <miniupnp@free.fr>
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
  16. #ifndef __GETGATEWAY_H__
  17. #define __GETGATEWAY_H__
  18. #ifdef WIN32
  19. #ifdef _MSC_VER
  20. typedef unsigned __int32 uint32_t;
  21. #else
  22. #include <stdint.h>
  23. #endif
  24. #define in_addr_t uint32_t
  25. #endif
  26. #include "declspec.h"
  27. /* getdefaultgateway() :
  28. * return value :
  29. * 0 : success
  30. * -1 : failure */
  31. LIBSPEC int getdefaultgateway(in_addr_t * addr);
  32. #endif