darwin9.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. * While Darwin 9 (aka, Mac OS X 10.5 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 9
  37. #ifndef darwin9
  38. # define darwin9 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_HRSWINST_REWRITES
  54. #define NETSNMP_INCLUDE_HRSWRUN_REWRITES
  55. #undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT
  56. #define NETSNMP_CAN_GET_DISK_LABEL 1
  57. /*
  58. * Enabling this restricts the compiler to mostly public APIs.
  59. */
  60. #ifndef __APPLE_API_STRICT_CONFORMANCE
  61. #define __APPLE_API_STRICT_CONFORMANCE 1
  62. #endif
  63. #ifndef __APPLE_API_UNSTABLE
  64. #define __APPLE_API_UNSTABLE 1
  65. #endif
  66. /*
  67. * Darwin's tools are capable of building multiple architectures in one pass.
  68. * As a result, platform definitions should be deferred until compile time.
  69. */
  70. #ifdef BYTE_ORDER
  71. # undef WORDS_BIGENDIAN
  72. # if BYTE_ORDER == BIG_ENDIAN
  73. # define WORDS_BIGENDIAN 1
  74. # endif
  75. #endif
  76. /*
  77. * Although Darwin does have an fstab.h file, getfsfile etc. always return null.
  78. * At least, as of 5.3.
  79. */
  80. #undef HAVE_FSTAB_H
  81. #define SWAPFILE_DIR "/private/var/vm"
  82. #define SWAPFILE_PREFIX "swapfile"
  83. /*
  84. * These apparently used to be in netinet/tcp_timers.h, but went away in
  85. * 10.4.2. Define them here til we find out a way to get the real values.
  86. */
  87. #define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */
  88. #define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */
  89. /*
  90. * Because Mac OS X is built on Mach, it does not provide a BSD-compatible
  91. * VM statistics API.
  92. */
  93. #define USE_MACH_HOST_STATISTICS 1
  94. /*
  95. * This tells code that manipulates IPv6 that the structures are unified,
  96. * i.e., IPv4 and IPv6 use the same structs.
  97. * This should eventually be replaced with a configure directive.
  98. */
  99. /* #define USE_UNIFIED_IPV6_STRUCTS 1 */
  100. #undef STRUCT_in6pcb_HAS_inp_vflag
  101. /*
  102. * utility macro used in several darwin specific files
  103. */
  104. #define SNMP_CFRelease(x) do { if (x) { CFRelease(x); x = NULL; } } while(0)
  105. /*
  106. * Mac OS X runs on both PPC and Intel hardware,
  107. * which handle udpTable index values differently
  108. */
  109. #include <TargetConditionals.h>
  110. #ifdef TARGET_RT_LITTLE_ENDIAN
  111. #define UDP_ADDRESSES_IN_HOST_ORDER 1
  112. #endif