darwin13.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. * While Darwin 10 (aka, Mac OS X 10.6 Snow Leopard) is "BSD-like", it differs
  3. * substantially enough to not warrant pretending it is a BSD flavor.
  4. * This first section are the vestigal BSD remnants.
  5. */
  6. /* Portions of this file are subject to the following copyright(s). See
  7. * the Net-SNMP's COPYING file for more details and other copyrights
  8. * that may apply:
  9. */
  10. /*
  11. * Portions of this file are copyrighted by:
  12. * Copyright (C) 2007 Apple, Inc. All rights reserved.
  13. * Use is subject to license terms specified in the COPYING file
  14. * distributed with the Net-SNMP package.
  15. */
  16. /*
  17. * BSD systems use a different method of looking up sockaddr_in values
  18. */
  19. /* #define NEED_KLGETSA 1 */
  20. #define CHECK_RT_FLAGS 1
  21. /*
  22. * this is not good enough before freebsd3!
  23. */
  24. /* #undef HAVE_NET_IF_MIB_H */
  25. /*
  26. * This section adds the relevant definitions from generic.h
  27. * (a file we don't include here)
  28. */
  29. /*
  30. * udp_inpcb list symbol, e.g. for mibII/udpTable.c
  31. */
  32. #define INP_NEXT_SYMBOL inp_next
  33. /*
  34. * This section defines Mac OS X 10.5 (and later) specific additions.
  35. */
  36. #define darwin 13
  37. #ifndef darwin13
  38. # define darwin13 darwin
  39. #endif
  40. /*
  41. * Mac OS X should only use the modern API and definitions.
  42. */
  43. #ifndef NETSNMP_NO_LEGACY_DEFINITIONS
  44. #define NETSNMP_NO_LEGACY_DEFINITIONS 1
  45. #endif
  46. /*
  47. * looks like the IFTable stuff works better than the mibII versions
  48. */
  49. #define NETSNMP_INCLUDE_IFTABLE_REWRITES
  50. /*
  51. * use new host resources files as well
  52. */
  53. #define NETSNMP_INCLUDE_HOST_RESOURCES
  54. #define NETSNMP_INCLUDE_HRSWINST_REWRITES
  55. #define NETSNMP_INCLUDE_HRSWRUN_REWRITES
  56. #undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT
  57. #define NETSNMP_CAN_GET_DISK_LABEL 1
  58. /*
  59. * Enabling this restricts the compiler to mostly public APIs.
  60. */
  61. #ifndef __APPLE_API_STRICT_CONFORMANCE
  62. #define __APPLE_API_STRICT_CONFORMANCE 1
  63. #endif
  64. #ifndef __APPLE_API_UNSTABLE
  65. #define __APPLE_API_UNSTABLE 1
  66. #endif
  67. /*
  68. * Darwin's tools are capable of building multiple architectures in one pass.
  69. * As a result, platform definitions should be deferred until compile time.
  70. */
  71. #ifdef BYTE_ORDER
  72. # undef WORDS_BIGENDIAN
  73. # if BYTE_ORDER == BIG_ENDIAN
  74. # define WORDS_BIGENDIAN 1
  75. # endif
  76. #endif
  77. /*
  78. * Although Darwin does have an fstab.h file, getfsfile etc. always return null.
  79. * At least, as of 5.3.
  80. */
  81. #undef HAVE_FSTAB_H
  82. #define SWAPFILE_DIR "/private/var/vm"
  83. #define SWAPFILE_PREFIX "swapfile"
  84. /*
  85. * These apparently used to be in netinet/tcp_timers.h, but went away in
  86. * 10.4.2. Define them here til we find out a way to get the real values.
  87. */
  88. #define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */
  89. #define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */
  90. /*
  91. * Because Mac OS X is built on Mach, it does not provide a BSD-compatible
  92. * VM statistics API.
  93. */
  94. #define USE_MACH_HOST_STATISTICS 1
  95. /*
  96. * This tells code that manipulates IPv6 that the structures are unified,
  97. * i.e., IPv4 and IPv6 use the same structs.
  98. * This should eventually be replaced with a configure directive.
  99. */
  100. /* #define USE_UNIFIED_IPV6_STRUCTS 1 */
  101. #undef STRUCT_in6pcb_HAS_inp_vflag
  102. /*
  103. * utility macro used in several darwin specific files
  104. */
  105. #define SNMP_CFRelease(x) do { if (x) { CFRelease(x); x = NULL; } } while(0)
  106. /*
  107. * Mac OS X runs on both PPC and Intel hardware,
  108. * which handle udpTable index values differently
  109. */
  110. #include <TargetConditionals.h>
  111. #ifdef TARGET_RT_LITTLE_ENDIAN
  112. #define UDP_ADDRESSES_IN_HOST_ORDER 1
  113. #endif