[go: up one dir, main page]

File: ip-mib.h

package info (click to toggle)
scli 0.3.1-3.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,872 kB
  • ctags: 8,627
  • sloc: ansic: 32,657; sh: 7,388; makefile: 321
file content (180 lines) | stat: -rw-r--r-- 6,089 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
/*							-- DO NOT EDIT --
 * Generated by smidump version 0.4.3:
 *   smidump -f scli \
 *     --scli-exclude='icmp' IP-MIB
 *
 * Derived from IP-MIB:
 *   The MIB module for managing IP and ICMP implementations,
 *   but excluding their management of IP routes.
 *
 * Revision 1994-11-01 00:00:
 *   [Revision added by libsmi due to a LAST-UPDATED clause.]
 *
 * Revision 1991-03-31 00:00:
 *   The initial revision of this MIB module was part of MIB-
 *   II.
 *
 * $Id: ip-mib.h 1787 2006-02-21 20:45:55Z schoenw $
 */

#ifndef _IP_MIB_H_
#define _IP_MIB_H_

#include "gsnmp.h"

G_BEGIN_DECLS

/*
 * Tables to map enumerations to strings and vice versa.
 */

#define IP_MIB_IPFORWARDING_FORWARDING    1
#define IP_MIB_IPFORWARDING_NOTFORWARDING 2

extern GNetSnmpEnum const ip_mib_enums_ipForwarding[];

#define IP_MIB_IPNETTOMEDIATYPE_OTHER   1
#define IP_MIB_IPNETTOMEDIATYPE_INVALID 2
#define IP_MIB_IPNETTOMEDIATYPE_DYNAMIC 3
#define IP_MIB_IPNETTOMEDIATYPE_STATIC  4

extern GNetSnmpEnum const ip_mib_enums_ipNetToMediaType[];


/*
 * C type definitions for IP-MIB::ip.
 */

#define IP_MIB_IPFORWARDING      (1 << 0) 
#define IP_MIB_IPDEFAULTTTL      (1 << 1) 
#define IP_MIB_IPINRECEIVES      (1 << 2) 
#define IP_MIB_IPINHDRERRORS     (1 << 3) 
#define IP_MIB_IPINADDRERRORS    (1 << 4) 
#define IP_MIB_IPFORWDATAGRAMS   (1 << 5) 
#define IP_MIB_IPINUNKNOWNPROTOS (1 << 6) 
#define IP_MIB_IPINDISCARDS      (1 << 7) 
#define IP_MIB_IPINDELIVERS      (1 << 8) 
#define IP_MIB_IPOUTREQUESTS     (1 << 9) 
#define IP_MIB_IPOUTDISCARDS     (1 << 10) 
#define IP_MIB_IPOUTNOROUTES     (1 << 11) 
#define IP_MIB_IPREASMTIMEOUT    (1 << 12) 
#define IP_MIB_IPREASMREQDS      (1 << 13) 
#define IP_MIB_IPREASMOKS        (1 << 14) 
#define IP_MIB_IPREASMFAILS      (1 << 15) 
#define IP_MIB_IPFRAGOKS         (1 << 16) 
#define IP_MIB_IPFRAGFAILS       (1 << 17) 
#define IP_MIB_IPFRAGCREATES     (1 << 18) 
#define IP_MIB_IPROUTINGDISCARDS (1 << 19) 

typedef struct {
    gint32   *ipForwarding;          /* rw */
    gint32   *ipDefaultTTL;          /* rw */
    guint32  *ipInReceives;          /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipInHdrErrors;         /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipInAddrErrors;        /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipForwDatagrams;       /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipInUnknownProtos;     /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipInDiscards;          /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipInDelivers;          /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipOutRequests;         /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipOutDiscards;         /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipOutNoRoutes;         /* ro SNMPv2-SMI::Counter32 */
    gint32   *ipReasmTimeout;        /* ro Integer32 */
    guint32  *ipReasmReqds;          /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipReasmOKs;            /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipReasmFails;          /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipFragOKs;             /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipFragFails;           /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipFragCreates;         /* ro SNMPv2-SMI::Counter32 */
    guint32  *ipRoutingDiscards;     /* ro SNMPv2-SMI::Counter32 */
} ip_mib_ip_t;

extern ip_mib_ip_t *
ip_mib_new_ip(void);

extern void
ip_mib_get_ip(GNetSnmp *s, ip_mib_ip_t **ip, gint64 mask);

extern void
ip_mib_set_ip(GNetSnmp *s, ip_mib_ip_t *ip, gint64 mask);

extern void
ip_mib_free_ip(ip_mib_ip_t *ip);

/*
 * C type definitions for IP-MIB::ipAddrEntry.
 */

#define IP_MIB_IPADENTADDR         (1 << 0) 
#define IP_MIB_IPADENTIFINDEX      (1 << 1) 
#define IP_MIB_IPADENTNETMASK      (1 << 2) 
#define IP_MIB_IPADENTBCASTADDR    (1 << 3) 
#define IP_MIB_IPADENTREASMMAXSIZE (1 << 4) 

typedef struct {
    guchar   ipAdEntAddr[4];          /* ro SNMPv2-SMI::IpAddress */
#define IP_MIB_IPADENTADDRLENGTH 4
    gint32   *ipAdEntIfIndex;          /* ro */
    guchar   *ipAdEntNetMask;          /* ro SNMPv2-SMI::IpAddress */
#define IP_MIB_IPADENTNETMASKLENGTH 4
    gint32   *ipAdEntBcastAddr;        /* ro */
    gint32   *ipAdEntReasmMaxSize;     /* ro */
} ip_mib_ipAddrEntry_t;

extern void
ip_mib_get_ipAddrTable(GNetSnmp *s, ip_mib_ipAddrEntry_t ***ipAddrEntry, gint64 mask);

extern void
ip_mib_free_ipAddrTable(ip_mib_ipAddrEntry_t **ipAddrEntry);

extern ip_mib_ipAddrEntry_t *
ip_mib_new_ipAddrEntry(void);

extern void
ip_mib_get_ipAddrEntry(GNetSnmp *s, ip_mib_ipAddrEntry_t **ipAddrEntry, guchar *ipAdEntAddr, gint64 mask);

extern void
ip_mib_free_ipAddrEntry(ip_mib_ipAddrEntry_t *ipAddrEntry);

/*
 * C type definitions for IP-MIB::ipNetToMediaEntry.
 */

#define IP_MIB_IPNETTOMEDIAIFINDEX     (1 << 0) 
#define IP_MIB_IPNETTOMEDIAPHYSADDRESS (1 << 1) 
#define IP_MIB_IPNETTOMEDIANETADDRESS  (1 << 2) 
#define IP_MIB_IPNETTOMEDIATYPE        (1 << 3) 

typedef struct {
    gint32   ipNetToMediaIfIndex;          /* rw */
    guchar   ipNetToMediaNetAddress[4];   /* rw SNMPv2-SMI::IpAddress */
#define IP_MIB_IPNETTOMEDIANETADDRESSLENGTH 4
    guchar   *ipNetToMediaPhysAddress;     /* rw SNMPv2-TC::PhysAddress */
#define IP_MIB_IPNETTOMEDIAPHYSADDRESSMINLENGTH 0
#define IP_MIB_IPNETTOMEDIAPHYSADDRESSMAXLENGTH 65535
    guint16  _ipNetToMediaPhysAddressLength;
    gint32   *ipNetToMediaType;            /* rw */
} ip_mib_ipNetToMediaEntry_t;

extern void
ip_mib_get_ipNetToMediaTable(GNetSnmp *s, ip_mib_ipNetToMediaEntry_t ***ipNetToMediaEntry, gint64 mask);

extern void
ip_mib_free_ipNetToMediaTable(ip_mib_ipNetToMediaEntry_t **ipNetToMediaEntry);

extern ip_mib_ipNetToMediaEntry_t *
ip_mib_new_ipNetToMediaEntry(void);

extern void
ip_mib_get_ipNetToMediaEntry(GNetSnmp *s, ip_mib_ipNetToMediaEntry_t **ipNetToMediaEntry, gint32 ipNetToMediaIfIndex, guchar *ipNetToMediaNetAddress, gint64 mask);

extern void
ip_mib_set_ipNetToMediaEntry(GNetSnmp *s, ip_mib_ipNetToMediaEntry_t *ipNetToMediaEntry, gint64 mask);

extern void
ip_mib_free_ipNetToMediaEntry(ip_mib_ipNetToMediaEntry_t *ipNetToMediaEntry);


G_END_DECLS

#endif /* _IP_MIB_H_ */