| 1 |
/* |
| 2 |
* This file was created to separate data storage from MIB implementation. |
| 3 |
* |
| 4 |
* Portions of this file are copyrighted by: |
| 5 |
* Copyright (c) 2016 VMware, Inc. All rights reserved. |
| 6 |
* Use is subject to license terms specified in the COPYING file |
| 7 |
* distributed with the Net-SNMP package. |
| 8 |
*/ |
| 9 |
|
| 10 |
|
| 11 |
#ifndef _MIBGROUP_SNMPNOTIFYTABLE_DATA_H |
| 12 |
#define _MIBGROUP_SNMPNOTIFYTABLE_DATA_H |
| 13 |
|
| 14 |
|
| 15 |
/* |
| 16 |
* we may use header_complex from the header_complex module |
| 17 |
*/ |
| 18 |
config_require(header_complex); |
| 19 |
config_require(target/target); |
| 20 |
config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage); |
| 21 |
|
| 22 |
#define NOTIFY_NAME_MAX 32 |
| 23 |
#define NOTIFY_TAG_MAX 255 |
| 24 |
|
| 25 |
/* |
| 26 |
* our storage structure(s) |
| 27 |
*/ |
| 28 |
struct snmpNotifyTable_data { |
| 29 |
char *snmpNotifyName; |
| 30 |
size_t snmpNotifyNameLen; |
| 31 |
char *snmpNotifyTag; |
| 32 |
size_t snmpNotifyTagLen; |
| 33 |
long snmpNotifyType; |
| 34 |
long snmpNotifyStorageType; |
| 35 |
long snmpNotifyRowStatus; |
| 36 |
}; |
| 37 |
|
| 38 |
|
| 39 |
/* |
| 40 |
* enum definitions from the covered mib sections |
| 41 |
*/ |
| 42 |
|
| 43 |
#define SNMPNOTIFYTYPE_TRAP 1 |
| 44 |
#define SNMPNOTIFYTYPE_INFORM 2 |
| 45 |
|
| 46 |
|
| 47 |
/* |
| 48 |
* function prototypes |
| 49 |
*/ |
| 50 |
void init_snmpNotifyTable_data(void); |
| 51 |
void shutdown_snmpNotifyTable_data(void); |
| 52 |
|
| 53 |
int snmpNotifyTable_add(struct snmpNotifyTable_data *thedata); |
| 54 |
int snmpNotifyTable_remove(struct snmpNotifyTable_data *thedata); |
| 55 |
struct snmpNotifyTable_data * |
| 56 |
snmpNotifyTable_extract(struct snmpNotifyTable_data *thedata); |
| 57 |
void snmpNotifyTable_dispose(struct snmpNotifyTable_data *thedata); |
| 58 |
|
| 59 |
void snmpNotifyTable_unregister_notification(const char *, u_char); |
| 60 |
|
| 61 |
struct snmpNotifyTable_data *get_notifyTable2(const char *name, size_t len); |
| 62 |
struct snmpNotifyTable_data *find_row_notifyTable(struct variable *vp, |
| 63 |
oid * name, size_t * length, |
| 64 |
int exact, size_t * var_len, |
| 65 |
WriteMethod ** write_method); |
| 66 |
|
| 67 |
|
| 68 |
#endif /* _MIBGROUP_SNMPNOTIFYTABLE_DATA_H */ |