Blame agent/mibgroup/mibII/route_headers.h

Packit fcad23
#if defined(NETSNMP_CAN_USE_SYSCTL)
Packit fcad23
Packit fcad23
#include <stddef.h>
Packit fcad23
#include <stdlib.h>
Packit fcad23
#include <syslog.h>
Packit fcad23
#include <time.h>
Packit fcad23
Packit fcad23
#include <sys/types.h>
Packit fcad23
#include <sys/param.h>
Packit fcad23
#include <sys/queue.h>
Packit fcad23
#include <sys/socket.h>
Packit fcad23
#include <sys/sysctl.h>
Packit fcad23
#if HAVE_SYS_TIME_H
Packit fcad23
#include <sys/time.h>
Packit fcad23
#endif
Packit fcad23
Packit fcad23
#include <net/if_dl.h>
Packit fcad23
#if HAVE_SYS_STREAM_H
Packit fcad23
#include <sys/stream.h>
Packit fcad23
#endif
Packit fcad23
#include <net/route.h>
Packit fcad23
#include <netinet/in.h>
Packit fcad23
Packit fcad23
#include <net-snmp/net-snmp-includes.h>
Packit fcad23
#include <net-snmp/agent/net-snmp-agent-includes.h>
Packit fcad23
Packit fcad23
#include "ip.h"
Packit fcad23
#include "kernel.h"
Packit fcad23
#include "interfaces.h"
Packit fcad23
Packit fcad23
#else /* !NETSNMP_CAN_USE_SYSCTL */
Packit fcad23
Packit fcad23
#define GATEWAY                 /* MultiNet is always configured this way! */
Packit fcad23
#include <stdio.h>
Packit fcad23
#include <sys/types.h>
Packit fcad23
#if HAVE_SYS_PARAM_H
Packit fcad23
#include <sys/param.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_SYS_SOCKET_H
Packit fcad23
#include <sys/socket.h>
Packit fcad23
#endif
Packit fcad23
#if TIME_WITH_SYS_TIME
Packit fcad23
# include <sys/time.h>
Packit fcad23
# include <time.h>
Packit fcad23
#else
Packit fcad23
# if HAVE_SYS_TIME_H
Packit fcad23
#  include <sys/time.h>
Packit fcad23
# else
Packit fcad23
#  include <time.h>
Packit fcad23
# endif
Packit fcad23
#endif
Packit fcad23
#if HAVE_SYS_SELECT_H
Packit fcad23
#include <sys/select.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_NETINET_IN_H
Packit fcad23
#include <netinet/in.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_ARPA_INET_H
Packit fcad23
#include <arpa/inet.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_SYSLOG_H
Packit fcad23
#include <syslog.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_MACHINE_PARAM_H
Packit fcad23
#include <machine/param.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_SYS_MBUF_H
Packit fcad23
#include <sys/mbuf.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_NET_IF_H
Packit fcad23
#include <net/if.h>
Packit fcad23
#endif
Packit fcad23
#ifdef HAVE_NET_IF_VAR_H
Packit fcad23
#include <net/if_var.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_SYS_HASHING_H
Packit fcad23
#include <sys/hashing.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_NETINET_IN_VAR_H
Packit fcad23
#include <netinet/in_var.h>
Packit fcad23
#endif
Packit fcad23
#define KERNEL                  /* to get routehash and RTHASHSIZ */
Packit fcad23
#if HAVE_SYS_STREAM_H
Packit fcad23
#include <sys/stream.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_NET_ROUTE_H
Packit fcad23
#include <net/route.h>
Packit fcad23
#endif
Packit fcad23
#undef	KERNEL
Packit fcad23
#ifdef RTENTRY_4_4
Packit fcad23
#ifndef HAVE_STRUCT_RTENTRY_RT_UNIT
Packit fcad23
#define rt_unit rt_refcnt       /* Reuse this field for device # */
Packit fcad23
#endif
Packit fcad23
#ifndef HAVE_STRUCT_RTENTRY_RT_DST
Packit fcad23
#define rt_dst rt_nodes->rn_key
Packit fcad23
#endif
Packit fcad23
#else                           /* RTENTRY_4_3 */
Packit fcad23
#ifndef HAVE_STRUCT_RTENTRY_RT_DST
Packit fcad23
#define rt_dst rt_nodes->rn_key
Packit fcad23
#endif
Packit fcad23
#ifndef HAVE_STRUCT_RTENTRY_RT_HASH
Packit fcad23
#define rt_hash rt_pad1
Packit fcad23
#endif
Packit fcad23
#ifndef HAVE_STRUCT_RTENTRY_RT_REFCNT
Packit fcad23
#ifndef hpux10
Packit fcad23
#define rt_refcnt rt_pad2
Packit fcad23
#endif
Packit fcad23
#endif
Packit fcad23
#ifndef HAVE_STRUCT_RTENTRY_RT_USE
Packit fcad23
#define rt_use rt_pad3
Packit fcad23
#endif
Packit fcad23
#ifndef HAVE_STRUCT_RTENTRY_RT_UNIT
Packit fcad23
#define rt_unit rt_refcnt       /* Reuse this field for device # */
Packit fcad23
#endif
Packit fcad23
#endif
Packit fcad23
#ifndef NULL
Packit fcad23
#define NULL 0
Packit fcad23
#endif
Packit fcad23
#if HAVE_KVM_OPENFILES
Packit fcad23
#include <fcntl.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_KVM_H
Packit fcad23
#include <kvm.h>
Packit fcad23
#endif
Packit fcad23
Packit fcad23
#if HAVE_STRING_H
Packit fcad23
#include <string.h>
Packit fcad23
#else
Packit fcad23
#include <strings.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_STDLIB_H
Packit fcad23
#include <stdlib.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_INET_MIB2_H
Packit fcad23
#include <inet/mib2.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_SYS_SYSCTL_H
Packit fcad23
#include <sys/sysctl.h>
Packit fcad23
#endif
Packit fcad23
#if HAVE_NET_IF_DL_H
Packit fcad23
#ifndef dynix
Packit fcad23
#include <net/if_dl.h>
Packit fcad23
#else
Packit fcad23
#include <sys/net/if_dl.h>
Packit fcad23
#endif
Packit fcad23
#endif
Packit fcad23
Packit fcad23
#if HAVE_NLIST_H
Packit fcad23
#include <nlist.h>
Packit fcad23
#endif
Packit fcad23
Packit fcad23
#ifdef solaris2
Packit fcad23
#include "kernel_sunos5.h"
Packit fcad23
/* Solaris 2.6/7 need sys/stream.h (mblk_t) to include inet/ip.h */
Packit fcad23
#ifdef HAVE_SYS_STREAM_H
Packit fcad23
#include <sys/stream.h>
Packit fcad23
#endif
Packit fcad23
/* Solaris 2.6 needs inet/common.h (u16) to include inet/ip.h */
Packit fcad23
#ifdef HAVE_INET_COMMON_H
Packit fcad23
#include <inet/common.h>
Packit fcad23
#endif
Packit fcad23
#ifdef HAVE_INET_IP_H
Packit fcad23
#include <inet/ip.h>
Packit fcad23
#endif /* HAVE_INET_IP_H */
Packit fcad23
#endif
Packit fcad23
Packit fcad23
#ifdef HAVE_SYS_SYSCTL_H
Packit fcad23
# ifdef CTL_NET
Packit fcad23
#  ifdef PF_ROUTE
Packit fcad23
#   ifdef NET_RT_DUMP
Packit fcad23
#    define USE_SYSCTL_ROUTE_DUMP
Packit fcad23
#   endif
Packit fcad23
#  endif
Packit fcad23
# endif
Packit fcad23
#endif
Packit fcad23
Packit fcad23
#ifdef cygwin
Packit fcad23
#include <windows.h>
Packit fcad23
#endif
Packit fcad23
Packit fcad23
#endif /* !NETSNMP_CAN_USE_SYSCTL */