| 1 |
/* |
| 2 |
* This file was created to separate notification data storage from |
| 3 |
* the MIB implementation. |
| 4 |
* |
| 5 |
* Portions of this file are copyrighted by: |
| 6 |
* Copyright (c) 2016 VMware, Inc. All rights reserved. |
| 7 |
* Use is subject to license terms specified in the COPYING file |
| 8 |
* distributed with the Net-SNMP package. |
| 9 |
*/ |
| 10 |
|
| 11 |
#ifndef _MIBGROUP_SNMPTARGETPARAMSENTRY_DATA_H |
| 12 |
#define _MIBGROUP_SNMPTARGETPARAMSENTRY_DATA_H |
| 13 |
|
| 14 |
/* |
| 15 |
* Magic number definitions: |
| 16 |
*/ |
| 17 |
#define SNMPTARGETPARAMSMPMODEL 1 |
| 18 |
#define SNMPTARGETPARAMSSECURITYMODEL 2 |
| 19 |
#define SNMPTARGETPARAMSSECURITYNAME 3 |
| 20 |
#define SNMPTARGETPARAMSSECURITYLEVEL 4 |
| 21 |
#define SNMPTARGETPARAMSSTORAGETYPE 5 |
| 22 |
#define SNMPTARGETPARAMSROWSTATUS 6 |
| 23 |
#define SNMPTARGETPARAMSMPMODELCOLUMN 2 |
| 24 |
#define SNMPTARGETPARAMSSECURITYMODELCOLUMN 3 |
| 25 |
#define SNMPTARGETPARAMSSECURITYNAMECOLUMN 4 |
| 26 |
#define SNMPTARGETPARAMSSECURITYLEVELCOLUMN 5 |
| 27 |
#define SNMPTARGETPARAMSSTORAGETYPECOLUMN 6 |
| 28 |
#define SNMPTARGETPARAMSROWSTATUSCOLUMN 7 |
| 29 |
|
| 30 |
/* |
| 31 |
* structure definitions |
| 32 |
*/ |
| 33 |
struct targetParamTable_struct { |
| 34 |
char *paramNameData; |
| 35 |
size_t paramNameLen; |
| 36 |
int mpModel; |
| 37 |
int secModel; |
| 38 |
char *secNameData; |
| 39 |
size_t secNameLen; |
| 40 |
int secLevel; |
| 41 |
int storageType; |
| 42 |
int rowStatus; |
| 43 |
struct targetParamTable_struct *next; |
| 44 |
time_t updateTime; |
| 45 |
}; |
| 46 |
|
| 47 |
/* |
| 48 |
* utility functions |
| 49 |
*/ |
| 50 |
struct targetParamTable_struct *get_paramEntry2(const char *name, |
| 51 |
size_t nameLen); |
| 52 |
|
| 53 |
void snmpTargetParamTable_add(struct targetParamTable_struct *newEntry); |
| 54 |
void snmpTargetParamTable_remove(struct targetParamTable_struct *entry); |
| 55 |
struct targetParamTable_struct *search_snmpTargetParamsTable(oid * baseName, |
| 56 |
size_t nameLen, |
| 57 |
oid * name, |
| 58 |
size_t * length, |
| 59 |
int exact); |
| 60 |
|
| 61 |
struct targetParamTable_struct *snmpTargetParamTable_create(void); |
| 62 |
|
| 63 |
void snmpTargetParamTable_dispose(struct targetParamTable_struct *); |
| 64 |
|
| 65 |
/* |
| 66 |
* function definitions |
| 67 |
*/ |
| 68 |
|
| 69 |
void init_snmpTargetParamsEntry_data(void); |
| 70 |
void shutdown_snmpTargetParamsEntry_data(void); |
| 71 |
|
| 72 |
#endif /* _MIBGROUP_SNMPTARGETPARAMSENTRY_DATA_H */ |