~ubuntu-branches/ubuntu/gutsy/net-snmp/gutsy-security

« back to all changes in this revision

Viewing changes to agent/mibgroup/mibII/route_headers.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2004-09-13 12:06:21 UTC
  • Revision ID: james.westby@ubuntu.com-20040913120621-g952ntonlleihcvm
Tags: upstream-5.1.1
ImportĀ upstreamĀ versionĀ 5.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#if defined(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
#if HAVE_SYS_TIME_H
 
14
#include <sys/time.h>
 
15
#endif
 
16
 
 
17
#include <net/if_dl.h>
 
18
#if 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
#include "struct.h"
 
31
#include "util_funcs.h"
 
32
 
 
33
#else /* !CAN_USE_SYSCTL */
 
34
 
 
35
#define GATEWAY                 /* MultiNet is always configured this way! */
 
36
#include <stdio.h>
 
37
#include <sys/types.h>
 
38
#if HAVE_SYS_PARAM_H
 
39
#include <sys/param.h>
 
40
#endif
 
41
#if HAVE_SYS_SOCKET_H
 
42
#include <sys/socket.h>
 
43
#endif
 
44
#if TIME_WITH_SYS_TIME
 
45
# ifdef WIN32
 
46
#  include <sys/timeb.h>
 
47
# else
 
48
# include <sys/time.h>
 
49
# endif
 
50
# include <time.h>
 
51
#else
 
52
# if HAVE_SYS_TIME_H
 
53
#  include <sys/time.h>
 
54
# else
 
55
#  include <time.h>
 
56
# endif
 
57
#endif
 
58
#if HAVE_SYS_SELECT_H
 
59
#include <sys/select.h>
 
60
#endif
 
61
#if HAVE_NETINET_IN_H
 
62
#include <netinet/in.h>
 
63
#endif
 
64
#if HAVE_ARPA_INET_H
 
65
#include <arpa/inet.h>
 
66
#endif
 
67
#if HAVE_SYSLOG_H
 
68
#include <syslog.h>
 
69
#endif
 
70
#if HAVE_MACHINE_PARAM_H
 
71
#include <machine/param.h>
 
72
#endif
 
73
#if HAVE_SYS_MBUF_H
 
74
#include <sys/mbuf.h>
 
75
#endif
 
76
#if HAVE_NET_IF_H
 
77
#include <net/if.h>
 
78
#endif
 
79
#ifdef HAVE_NET_IF_VAR_H
 
80
#include <net/if_var.h>
 
81
#endif
 
82
#if HAVE_SYS_HASHING_H
 
83
#include <sys/hashing.h>
 
84
#endif
 
85
#if HAVE_NETINET_IN_VAR_H
 
86
#include <netinet/in_var.h>
 
87
#endif
 
88
#define KERNEL                  /* to get routehash and RTHASHSIZ */
 
89
#if HAVE_SYS_STREAM_H
 
90
#include <sys/stream.h>
 
91
#endif
 
92
#if HAVE_NET_ROUTE_H
 
93
#include <net/route.h>
 
94
#endif
 
95
#undef  KERNEL
 
96
#ifdef RTENTRY_4_4
 
97
#ifndef STRUCT_RTENTRY_HAS_RT_UNIT
 
98
#define rt_unit rt_refcnt       /* Reuse this field for device # */
 
99
#endif
 
100
#ifndef STRUCT_RTENTRY_HAS_RT_DST
 
101
#define rt_dst rt_nodes->rn_key
 
102
#endif
 
103
#else                           /* RTENTRY_4_3 */
 
104
#ifndef STRUCT_RTENTRY_HAS_RT_DST
 
105
#define rt_dst rt_nodes->rn_key
 
106
#endif
 
107
#ifndef STRUCT_RTENTRY_HAS_RT_HASH
 
108
#define rt_hash rt_pad1
 
109
#endif
 
110
#ifndef STRUCT_RTENTRY_HAS_RT_REFCNT
 
111
#ifndef hpux10
 
112
#define rt_refcnt rt_pad2
 
113
#endif
 
114
#endif
 
115
#ifndef STRUCT_RTENTRY_HAS_RT_USE
 
116
#define rt_use rt_pad3
 
117
#endif
 
118
#ifndef STRUCT_RTENTRY_HAS_RT_UNIT
 
119
#define rt_unit rt_refcnt       /* Reuse this field for device # */
 
120
#endif
 
121
#endif
 
122
#ifndef NULL
 
123
#define NULL 0
 
124
#endif
 
125
#if HAVE_KVM_OPENFILES
 
126
#include <fcntl.h>
 
127
#endif
 
128
#if HAVE_KVM_H
 
129
#include <kvm.h>
 
130
#endif
 
131
 
 
132
#if HAVE_STRING_H
 
133
#include <string.h>
 
134
#else
 
135
#include <strings.h>
 
136
#endif
 
137
#if HAVE_STDLIB_H
 
138
#include <stdlib.h>
 
139
#endif
 
140
#if HAVE_INET_MIB2_H
 
141
#include <inet/mib2.h>
 
142
#endif
 
143
#if HAVE_SYS_SYSCTL_H
 
144
#include <sys/sysctl.h>
 
145
#endif
 
146
#if HAVE_NET_IF_DL_H
 
147
#ifndef dynix
 
148
#include <net/if_dl.h>
 
149
#else
 
150
#include <sys/net/if_dl.h>
 
151
#endif
 
152
#endif
 
153
 
 
154
#if HAVE_WINSOCK_H
 
155
#include <winsock.h>
 
156
#endif
 
157
 
 
158
#if HAVE_NLIST_H
 
159
#include <nlist.h>
 
160
#endif
 
161
 
 
162
#if solaris2
 
163
#include "kernel_sunos5.h"
 
164
#endif
 
165
 
 
166
#ifdef HAVE_SYS_SYSCTL_H
 
167
# ifdef CTL_NET
 
168
#  ifdef PF_ROUTE
 
169
#   ifdef NET_RT_DUMP
 
170
#    define USE_SYSCTL_ROUTE_DUMP
 
171
#   endif
 
172
#  endif
 
173
# endif
 
174
#endif
 
175
 
 
176
#if HAVE_DMALLOC_H
 
177
#include <dmalloc.h>
 
178
#endif
 
179
 
 
180
#ifdef cygwin
 
181
#define WIN32
 
182
#include <windows.h>
 
183
#endif
 
184
 
 
185
#endif /* !CAN_USE_SYSCTL */