#if defined(NETSNMP_CAN_USE_SYSCTL) #include #include #include #include #include #include #include #include #include #if HAVE_SYS_TIME_H #include #endif #include #if HAVE_SYS_STREAM_H #include #endif #include #include #include #include #include "ip.h" #include "kernel.h" #include "interfaces.h" #else /* !NETSNMP_CAN_USE_SYSCTL */ #define GATEWAY /* MultiNet is always configured this way! */ #include #include #if HAVE_SYS_PARAM_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #if HAVE_SYS_SELECT_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_ARPA_INET_H #include #endif #if HAVE_SYSLOG_H #include #endif #if HAVE_MACHINE_PARAM_H #include #endif #if HAVE_SYS_MBUF_H #include #endif #if HAVE_NET_IF_H #include #endif #ifdef HAVE_NET_IF_VAR_H #include #endif #if HAVE_SYS_HASHING_H #include #endif #if HAVE_NETINET_IN_VAR_H #include #endif #define KERNEL /* to get routehash and RTHASHSIZ */ #if HAVE_SYS_STREAM_H #include #endif #if HAVE_NET_ROUTE_H #include #endif #undef KERNEL #ifdef RTENTRY_4_4 #ifndef HAVE_STRUCT_RTENTRY_RT_UNIT #define rt_unit rt_refcnt /* Reuse this field for device # */ #endif #ifndef HAVE_STRUCT_RTENTRY_RT_DST #define rt_dst rt_nodes->rn_key #endif #else /* RTENTRY_4_3 */ #ifndef HAVE_STRUCT_RTENTRY_RT_DST #define rt_dst rt_nodes->rn_key #endif #ifndef HAVE_STRUCT_RTENTRY_RT_HASH #define rt_hash rt_pad1 #endif #ifndef HAVE_STRUCT_RTENTRY_RT_REFCNT #ifndef hpux10 #define rt_refcnt rt_pad2 #endif #endif #ifndef HAVE_STRUCT_RTENTRY_RT_USE #define rt_use rt_pad3 #endif #ifndef HAVE_STRUCT_RTENTRY_RT_UNIT #define rt_unit rt_refcnt /* Reuse this field for device # */ #endif #endif #ifndef NULL #define NULL 0 #endif #if HAVE_KVM_OPENFILES #include #endif #if HAVE_KVM_H #include #endif #if HAVE_STRING_H #include #else #include #endif #if HAVE_STDLIB_H #include #endif #if HAVE_INET_MIB2_H #include #endif #if HAVE_SYS_SYSCTL_H #include #endif #if HAVE_NET_IF_DL_H #ifndef dynix #include #else #include #endif #endif #if HAVE_NLIST_H #include #endif #ifdef solaris2 #include "kernel_sunos5.h" /* Solaris 2.6/7 need sys/stream.h (mblk_t) to include inet/ip.h */ #ifdef HAVE_SYS_STREAM_H #include #endif /* Solaris 2.6 needs inet/common.h (u16) to include inet/ip.h */ #ifdef HAVE_INET_COMMON_H #include #endif #ifdef HAVE_INET_IP_H #include #endif /* HAVE_INET_IP_H */ #endif #ifdef HAVE_SYS_SYSCTL_H # ifdef CTL_NET # ifdef PF_ROUTE # ifdef NET_RT_DUMP # define USE_SYSCTL_ROUTE_DUMP # endif # endif # endif #endif #ifdef cygwin #include #endif #endif /* !NETSNMP_CAN_USE_SYSCTL */