Debian Codegraph @

agent/mibgroup/mibII/route_headers.h

raw
1 #if defined(NETSNMP_CAN_USE_SYSCTL)
2
3 #include <stddef.h>
4 #include <stdlib.h>
5 #include <syslog.h>
6 #include <time.h>
7
8 #include <sys/types.h>
9 #include <sys/param.h>
10 #include <sys/queue.h>
11 #include <sys/socket.h>
12 #include <sys/sysctl.h>
13 #ifdef HAVE_SYS_TIME_H
14 #include <sys/time.h>
15 #endif
16
17 #include <net/if_dl.h>
18 #ifdef HAVE_SYS_STREAM_H
19 #include <sys/stream.h>
20 #endif
21 #include <net/route.h>
22 #include <netinet/in.h>
23
24 #include <net-snmp/net-snmp-includes.h>
25 #include <net-snmp/agent/net-snmp-agent-includes.h>
26
27 #include "ip.h"
28 #include "kernel.h"
29 #include "interfaces.h"
30
31 #else /* !NETSNMP_CAN_USE_SYSCTL */
32
33 #define GATEWAY /* MultiNet is always configured this way! */
34 #include <stdio.h>
35 #include <sys/types.h>
36 #ifdef HAVE_SYS_PARAM_H
37 #include <sys/param.h>
38 #endif
39 #ifdef HAVE_SYS_SOCKET_H
40 #include <sys/socket.h>
41 #endif
42 #ifdef TIME_WITH_SYS_TIME
43 # include <sys/time.h>
44 # include <time.h>
45 #else
46 # ifdef HAVE_SYS_TIME_H
47 # include <sys/time.h>
48 # else
49 # include <time.h>
50 # endif
51 #endif
52 #ifdef HAVE_SYS_SELECT_H
53 #include <sys/select.h>
54 #endif
55 #ifdef HAVE_NETINET_IN_H
56 #include <netinet/in.h>
57 #endif
58 #ifdef HAVE_ARPA_INET_H
59 #include <arpa/inet.h>
60 #endif
61 #ifdef HAVE_SYSLOG_H
62 #include <syslog.h>
63 #endif
64 #ifdef HAVE_MACHINE_PARAM_H
65 #include <machine/param.h>
66 #endif
67 #ifdef HAVE_SYS_MBUF_H
68 #include <sys/mbuf.h>
69 #endif
70 #ifdef HAVE_NET_IF_H
71 #include <net/if.h>
72 #endif
73 #ifdef HAVE_NET_IF_VAR_H
74 #include <net/if_var.h>
75 #endif
76 #ifdef HAVE_SYS_HASHING_H
77 #include <sys/hashing.h>
78 #endif
79 #ifdef HAVE_NETINET_IN_VAR_H
80 #include <netinet/in_var.h>
81 #endif
82 #define KERNEL /* to get routehash and RTHASHSIZ */
83 #ifdef HAVE_SYS_STREAM_H
84 #include <sys/stream.h>
85 #endif
86 #ifdef HAVE_NET_ROUTE_H
87 #include <net/route.h>
88 #endif
89 #undef KERNEL
90 #ifdef RTENTRY_4_4
91 #ifndef HAVE_STRUCT_RTENTRY_RT_UNIT
92 #define rt_unit rt_refcnt /* Reuse this field for device # */
93 #endif
94 #ifndef HAVE_STRUCT_RTENTRY_RT_DST
95 #define rt_dst rt_nodes->rn_key
96 #endif
97 #else /* RTENTRY_4_3 */
98 #ifndef HAVE_STRUCT_RTENTRY_RT_DST
99 #define rt_dst rt_nodes->rn_key
100 #endif
101 #ifndef HAVE_STRUCT_RTENTRY_RT_HASH
102 #define rt_hash rt_pad1
103 #endif
104 #ifndef HAVE_STRUCT_RTENTRY_RT_REFCNT
105 #ifndef hpux10
106 #define rt_refcnt rt_pad2
107 #endif
108 #endif
109 #ifndef HAVE_STRUCT_RTENTRY_RT_USE
110 #define rt_use rt_pad3
111 #endif
112 #ifndef HAVE_STRUCT_RTENTRY_RT_UNIT
113 #define rt_unit rt_refcnt /* Reuse this field for device # */
114 #endif
115 #endif
116 #ifndef NULL
117 #define NULL 0
118 #endif
119 #ifdef HAVE_KVM_OPENFILES
120 #include <fcntl.h>
121 #endif
122 #ifdef HAVE_KVM_H
123 #include <kvm.h>
124 #endif
125
126 #ifdef HAVE_STRING_H
127 #include <string.h>
128 #else
129 #include <strings.h>
130 #endif
131 #ifdef HAVE_STDLIB_H
132 #include <stdlib.h>
133 #endif
134 #ifdef HAVE_INET_MIB2_H
135 #include <inet/mib2.h>
136 #endif
137 #ifdef HAVE_SYS_SYSCTL_H
138 #include <sys/sysctl.h>
139 #endif
140 #ifdef HAVE_NET_IF_DL_H
141 #ifndef dynix
142 #include <net/if_dl.h>
143 #else
144 #include <sys/net/if_dl.h>
145 #endif
146 #endif
147
148 #ifdef HAVE_NLIST_H
149 #include <nlist.h>
150 #endif
151
152 #ifdef solaris2
153 #include "kernel_sunos5.h"
154 /* Solaris 2.6/7 need sys/stream.h (mblk_t) to include inet/ip.h */
155 #ifdef HAVE_SYS_STREAM_H
156 #include <sys/stream.h>
157 #endif
158 /* Solaris 2.6 needs inet/common.h (u16) to include inet/ip.h */
159 #ifdef HAVE_INET_COMMON_H
160 #include <inet/common.h>
161 #endif
162 #ifdef HAVE_INET_IP_H
163 #include <inet/ip.h>
164 #endif /* HAVE_INET_IP_H */
165 #endif
166
167 #ifdef HAVE_SYS_SYSCTL_H
168 # ifdef CTL_NET
169 # ifdef PF_ROUTE
170 # ifdef NET_RT_DUMP
171 # define USE_SYSCTL_ROUTE_DUMP
172 # endif
173 # endif
174 # endif
175 #endif
176
177 #ifdef cygwin
178 #include <windows.h>
179 #endif
180
181 #endif /* !NETSNMP_CAN_USE_SYSCTL */