~ubuntu-branches/ubuntu/trusty/net-snmp/trusty

1.1.6 by Steve Kowalik
Import upstream version 5.4.1~dfsg
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
 */
1.3.2 by Hideki Yamane
Import upstream version 5.7.2~dfsg
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
 */
1.1.6 by Steve Kowalik
Import upstream version 5.4.1~dfsg
16
17
/*
18
 * BSD systems use a different method of looking up sockaddr_in values 
19
 */
20
/* #define NEED_KLGETSA 1 */
21
22
/*
23
 * ARP_Scan_Next needs a 4th ifIndex argument 
24
 */
25
#define ARP_SCAN_FOUR_ARGUMENTS 1
26
27
#define CHECK_RT_FLAGS 1
28
29
/*
30
 * this is not good enough before freebsd3! 
31
 */
32
/* #undef HAVE_NET_IF_MIB_H */
33
34
/*
35
 * This section adds the relevant definitions from generic.h
36
 * (a file we don't include here)
37
 */
38
39
/*
40
 * udp_inpcb list symbol, e.g. for mibII/udpTable.c
41
 */
42
#define INP_NEXT_SYMBOL inp_next
43
44
/*
45
 * This section defines Mac OS X 10.5 (and later) specific additions.
46
 */
47
#define darwin 9
1.3.2 by Hideki Yamane
Import upstream version 5.7.2~dfsg
48
#ifndef darwin9
49
#   define darwin9 darwin
50
#endif
1.1.6 by Steve Kowalik
Import upstream version 5.4.1~dfsg
51
52
/*
53
 * Mac OS X should only use the modern API and definitions.
54
 */
55
#ifndef NETSNMP_NO_LEGACY_DEFINITIONS
56
#define NETSNMP_NO_LEGACY_DEFINITIONS 1
57
#endif
58
59
/*
60
 * looks like the IFTable stuff works better than the mibII versions
61
 */
62
 
63
#define NETSNMP_INCLUDE_IFTABLE_REWRITES
64
65
/*
1.3.2 by Hideki Yamane
Import upstream version 5.7.2~dfsg
66
 * use new host resources files as well
67
 */
68
#define NETSNMP_INCLUDE_HRSWINST_REWRITES
69
#define NETSNMP_INCLUDE_HRSWRUN_REWRITES
70
#undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT
71
#define NETSNMP_CAN_GET_DISK_LABEL 1
72
73
/*
1.1.6 by Steve Kowalik
Import upstream version 5.4.1~dfsg
74
 * Enabling this restricts the compiler to mostly public APIs.
75
 */
76
#ifndef __APPLE_API_STRICT_CONFORMANCE
77
#define __APPLE_API_STRICT_CONFORMANCE 1
78
#endif
79
#ifndef __APPLE_API_UNSTABLE
80
#define __APPLE_API_UNSTABLE 1
81
#endif
82
83
/*
84
 * Darwin's tools are capable of building multiple architectures in one pass.
85
 * As a result, platform definitions should be deferred until compile time.
86
 */
87
#ifdef BYTE_ORDER
88
# undef WORDS_BIGENDIAN
89
# if BYTE_ORDER == BIG_ENDIAN
90
#  define WORDS_BIGENDIAN 1
91
# endif
92
#endif
93
94
/*
95
 * Darwin's tools are capable of building multiple architectures in one pass.
96
 * As a result, platform definitions should be deferred until compile time.
97
 */
98
#ifdef BYTE_ORDER
99
# undef WORDS_BIGENDIAN
100
# if BYTE_ORDER == BIG_ENDIAN
101
#  define WORDS_BIGENDIAN 1
102
# endif
103
#endif
104
105
/*
106
 * Although Darwin does have an fstab.h file, getfsfile etc. always return null.
107
 * At least, as of 5.3.
108
 */
109
#undef HAVE_FSTAB_H
110
111
#define SWAPFILE_DIR "/private/var/vm"
112
#define SWAPFILE_PREFIX "swapfile"
113
114
/*
115
 * These apparently used to be in netinet/tcp_timers.h, but went away in
116
 * 10.4.2. Define them here til we find out a way to get the real values.
117
 */
118
#define TCPTV_MIN       (  1*PR_SLOWHZ)         /* minimum allowable value */
119
#define TCPTV_REXMTMAX  ( 64*PR_SLOWHZ)         /* max allowable REXMT value */
120
121
/*
122
 * Because Mac OS X is built on Mach, it does not provide a BSD-compatible
123
 * VM statistics API.
124
 */
125
#define USE_MACH_HOST_STATISTICS 1
126
127
/*
128
 * This tells code that manipulates IPv6 that the structures are unified,
129
 * i.e., IPv4 and IPv6 use the same structs.
130
 * This should eventually be replaced with a configure directive.
131
 */
132
/* #define USE_UNIFIED_IPV6_STRUCTS 1 */
133
#undef STRUCT_in6pcb_HAS_inp_vflag
1.2.1 by Jochen Friedrich
Import upstream version 5.4.2.1~dfsg
134
135
/*
1.3.2 by Hideki Yamane
Import upstream version 5.7.2~dfsg
136
 * utility macro used in several darwin specific files
137
 */
138
#define SNMP_CFRelease(x) do { if (x) { CFRelease(x); x = NULL; } } while(0)
139
140
/*
1.2.1 by Jochen Friedrich
Import upstream version 5.4.2.1~dfsg
141
 * Mac OS X runs on both PPC and Intel hardware,
142
 *   which handle udpTable index values differently
143
 */
144
#include <TargetConditionals.h>
145
#ifdef TARGET_RT_LITTLE_ENDIAN
146
#define UDP_ADDRESSES_IN_HOST_ORDER 1
147
#endif
1.3.2 by Hideki Yamane
Import upstream version 5.7.2~dfsg
148