| 1 |
#ifndef MTEOBJECTS_H |
| 2 |
#define MTEOBJECTS_H |
| 3 |
|
| 4 |
#include "disman/event/mteTrigger.h" |
| 5 |
|
| 6 |
/* |
| 7 |
* Flags relating to the mteObjectsTable |
| 8 |
*/ |
| 9 |
#define MTE_OBJECT_FLAG_WILD 0x01 /* for mteObjectsIDWildcard */ |
| 10 |
#define MTE_OBJECT_FLAG_ACTIVE 0x02 /* for mteObjectsEntryStatus */ |
| 11 |
#define MTE_OBJECT_FLAG_FIXED 0x04 /* for snmpd.conf persistence */ |
| 12 |
#define MTE_OBJECT_FLAG_VALID 0x08 /* for row creation/undo */ |
| 13 |
#define MTE_OBJECT_FLAG_NEXT 0x10 /* for appending a new row */ |
| 14 |
|
| 15 |
#define MTE_STR1_LEN 32 |
| 16 |
|
| 17 |
/* |
| 18 |
* Data structure for an object row |
| 19 |
*/ |
| 20 |
struct mteObject { |
| 21 |
/* |
| 22 |
* Index values |
| 23 |
*/ |
| 24 |
char mteOwner[MTE_STR1_LEN+1]; |
| 25 |
char mteOName[MTE_STR1_LEN+1]; |
| 26 |
long mteOIndex; |
| 27 |
|
| 28 |
/* |
| 29 |
* Column values |
| 30 |
*/ |
| 31 |
oid mteObjectID[MAX_OID_LEN]; |
| 32 |
size_t mteObjectID_len; |
| 33 |
|
| 34 |
long flags; |
| 35 |
}; |
| 36 |
|
| 37 |
/* |
| 38 |
* Container structure for the mteObjectsTable, |
| 39 |
* and routine to create this. |
| 40 |
*/ |
| 41 |
extern netsnmp_tdata *objects_table_data; |
| 42 |
extern void init_objects_table_data(void); |
| 43 |
|
| 44 |
void init_mteObjects(void); |
| 45 |
void mteObjects_removeEntry(netsnmp_tdata_row *row); |
| 46 |
void mteObjects_removeEntries(const char *owner, char *oname); |
| 47 |
netsnmp_tdata_row *mteObjects_createEntry( const char *owner, |
| 48 |
const char *oname, |
| 49 |
int oindex, int flags); |
| 50 |
struct mteObject * mteObjects_addOID(const char *owner, const char *oname, int index, |
| 51 |
const char *oid_name_buf, int wild ); |
| 52 |
|
| 53 |
int mteObjects_vblist( netsnmp_variable_list *vblist, |
| 54 |
char *owner, char *oname, |
| 55 |
oid *suffix, size_t sfx_len ); |
| 56 |
int mteObjects_internal_vblist( netsnmp_variable_list *vblist, |
| 57 |
char *oname, struct mteTrigger *trigger, |
| 58 |
netsnmp_session *s); |
| 59 |
|
| 60 |
#endif /* MTEOBJECTS_H */ |