added files
[bcm963xx.git] / userapps / opensource / net-snmp / include / net-snmp / types.h
1 #ifndef NET_SNMP_TYPES_H
2 #define NET_SNMP_TYPES_H
3
4     /**
5      *  Definitions of data structures, used within the library API.
6      */
7
8 #include <stdio.h>
9
10 #ifndef NET_SNMP_CONFIG_H
11 #error "Please include <net-snmp/net-snmp-config.h> before this file"
12 #endif
13
14                         /*
15                          * For 'timeval' 
16                          */
17 #if TIME_WITH_SYS_TIME
18 # ifdef WIN32
19 #  include <sys/timeb.h>
20 # else
21 #  include <sys/time.h>
22 # endif
23 # include <time.h>
24 #else
25 # if HAVE_SYS_TIME_H
26 #  include <sys/time.h>
27 # else
28 #  include <time.h>
29 # endif
30 #endif
31
32 #include <sys/types.h>
33 #ifdef HAVE_WINSOCK_H
34 #include <winsock.h>
35 #endif
36
37 #if HAVE_NETINET_IN_H
38 #include <netinet/in.h>         /* For definition of in_addr_t */
39 #endif
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 #ifndef MAX_SUBID               /* temporary - duplicate definition protection */
46 #ifndef EIGHTBIT_SUBIDS
47 typedef u_long  oid;
48 #define MAX_SUBID   0xFFFFFFFF
49 #else
50 typedef u_char  oid;
51 #define MAX_SUBID   0xFF
52 #endif
53 #endif
54
55 #ifndef HAVE_SOCKLEN_T
56 typedef u_int socklen_t;
57 #endif
58
59 #ifndef HAVE_IN_ADDR_T
60 typedef u_int in_addr_t;
61 #endif
62
63
64     /*
65      *  For the initial release, this will just refer to the
66      *  relevant UCD header files.
67      *    In due course, the types and structures relevant to the
68      *  Net-SNMP API will be identified, and defined here directly.
69      *
70      *  But for the time being, this header file is primarily a placeholder,
71      *  to allow application writers to adopt the new header file names.
72      */
73
74
75 #include <net-snmp/definitions.h>
76 #include <net-snmp/library/snmp_api.h>
77 /*
78  * #include <net-snmp/library/libsnmp.h> 
79  */
80
81     typedef struct netsnmp_index_s {
82        int          len;
83        oid         *oids;
84     } netsnmp_index;
85
86
87     typedef struct netsnmp_void_array_s {
88        size_t  size;
89        void * *array;
90     } netsnmp_void_array;
91
92 #ifdef __cplusplus
93 };
94 #endif
95
96 #endif                          /* NET_SNMP_TYPES_H */