Debian Codegraph @

agent/mibgroup/disman/expr/expObject.h

raw
1 #ifndef EXPOBJECT_H
2 #define EXPOBJECT_H
3
4 #include "disman/expr/expExpression.h"
5
6 /*
7 * Flags relating to the expression object table
8 */
9 #define EXP_OBJ_FLAG_OWILD 0x01 /* for expObjectIDWildcard */
10 #define EXP_OBJ_FLAG_DDISC 0x02 /* non-trivial expObjDiscontinuityID */
11 #define EXP_OBJ_FLAG_DWILD 0x04 /* for expObjDiscontinuityIDWildcard */
12 #define EXP_OBJ_FLAG_CWILD 0x08 /* for expObjConditionalWildcard */
13 #define EXP_OBJ_FLAG_PREFIX 0x10 /* expExpressionPrefix object */
14 #define EXP_OBJ_FLAG_ACTIVE 0x20 /* for expObjectEntryStatus */
15 #define EXP_OBJ_FLAG_FIXED 0x40 /* for snmpd.conf persistence */
16 #define EXP_OBJ_FLAG_VALID 0x80 /* for row creation/undo */
17
18 /*
19 * Standard lengths for various Expression-MIB OCTET STRING objects:
20 * short tags ( 32 characters)
21 * SnmpAdminString-style values (255 characters)
22 * "long" DisplayString values (1024 characters)
23 */
24 #define EXP_STR1_LEN 32
25 #define EXP_STR2_LEN 255
26 #define EXP_STR3_LEN 1024
27
28 /*
29 * Data structure for an expObject row.
30 */
31 struct expObject {
32 /*
33 * Index values
34 */
35 char expOwner[ EXP_STR1_LEN+1 ];
36 char expName[ EXP_STR1_LEN+1 ];
37 u_long expObjectIndex;
38
39 /*
40 * Column values
41 */
42 oid expObjectID[ MAX_OID_LEN ];
43 oid expObjDeltaD[ MAX_OID_LEN ];
44 oid expObjCond[ MAX_OID_LEN ];
45 size_t expObjectID_len;
46 size_t expObjDeltaD_len;
47 size_t expObjCond_len;
48 long expObjectSampleType;
49 long expObjDiscontinuityType;
50
51 netsnmp_variable_list *vars, *old_vars;
52 netsnmp_variable_list *dvars, *old_dvars;
53 netsnmp_variable_list *cvars, *old_cvars;
54
55 long flags;
56 };
57
58 /*
59 * Container structure for the expObjectTable,
60 * and initialisation routine to create this.
61 */
62 extern netsnmp_tdata *expObject_table_data;
63 void init_expObject_table_data(void);
64
65 /*
66 * function declarations
67 */
68 void init_expObject(void);
69 struct expObject * expObject_createEntry( const char *, const char *, long, int );
70 netsnmp_tdata_row * expObject_createRow( const char *, const char *, long, int );
71 void expObject_removeEntry( netsnmp_tdata_row * );
72
73 netsnmp_tdata_row * expObject_getFirst( const char *, const char * );
74 netsnmp_tdata_row * expObject_getNext( netsnmp_tdata_row * );
75 void expObject_getData( struct expExpression *,
76 struct expObject * );
77 #endif /* EXPOBJECT_H */