OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

snmpnotificationlogtable.c.
To handle the requests from the manager for the module notificationlogtable. The notificationLogTable stores information of the traps sent from the Agent. Row Description

See Also :snmpnotificationlogtable.h
Return Type Method Summary
CHAR CreateAndAddNewSnmpNotificationLogTableEntry(INT32 reqID, U_INT32 notificationLogTime, INT32 notificationLogVarBinds, CHAR *notificationLogOID, INT32 notificationVersion)
             It will take all columns value as input and create an instance then add it to the vector.
CHAR CreateAndAddSnmpNotificationLogTableEntry(OID *instance, INT32 instanceLen, INT32 reqID, U_INT32 notificationLogTime, INT32 notificationLogVarBinds, CHAR *notificationLogOID, INT32 notificationVersion)
             It will take all columns value and its instance value as input and add create an entry then add it to the vector.
OID* CreateSnmpNotificationLogTableInstance(INT32 *instanceLen, INT32 reqID)
             This method is called from the method CreateAndAddNewSnmpNotificationLogTableTableEntry().
void FreeSnmpNotificationLogTableEntryMemory(Entry *entryPtr)
             This method is called from FreeSnmpNotificationLogTableVector().
Vector* GetSnmpNotificationLogTableInfo(INT32 startIdx, INT32 numOfRows, INT32 *flag)
             It will return the table vector reference, before that it will verify the total size of the table and set flag value.
void InitSnmpNotificationLogTable()
             It will register the treeCell with agent and initialize all data structures related to the module "notificationLogTable".
CHAR ReadFromSnmpNotificationLogTableFile()
             It will read the "notificationLogTable" enteries from the file and add it to the table(vector).
U_CHAR* ReadSnmpNotificationLogOID(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationLogOID.
U_CHAR* ReadSnmpNotificationLogTime(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationLogTime.
U_CHAR* ReadSnmpNotificationLogVarBinds(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationLogVarBinds.
U_CHAR* ReadSnmpNotificationVersion(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationVersion.
U_CHAR* SnmpNotificationLogTableProcessReadReq(U_CHAR pduType, OID *reqOid, INT32 *reqOidLen, INT32 *varValLen, U_CHAR *status)
             This method is called from agent api (pdureqhdlr.
CHAR UpdateSnmpNotificationLogTable(U_CHAR command)
             This method will be called from the agent api after successful SET/GET/GET-NEXT operation, in order to update the original or user application's data structrue with the changes made to SnmpNotificationLogTable.
CHAR WriteToSnmpNotificationLogTableFile()
             It will write the "notificationLogTable" enteries from the table(vector).
   
Method Details

CreateAndAddNewSnmpNotificationLogTableEntry()

CHAR CreateAndAddNewSnmpNotificationLogTableEntry(INT32 reqID, U_INT32 notificationLogTime, INT32 notificationLogVarBinds, CHAR *notificationLogOID, INT32 notificationVersion)

It will take all columns value as input and create an instance then add it to the vector.

Arguments:
1. Table column reqID (IN).
2. Table column notificationLogTime (IN).
3. Table column notificationLogVarBinds (IN).
4. Table column notificationLogOID (IN).
5. Table column notificationVersion (IN).
Return type:
SUCCESS or FAILURE.
Bugs:
null

CreateAndAddSnmpNotificationLogTableEntry()

CHAR CreateAndAddSnmpNotificationLogTableEntry(OID *instance, INT32 instanceLen, INT32 reqID, U_INT32 notificationLogTime, INT32 notificationLogVarBinds, CHAR *notificationLogOID, INT32 notificationVersion)

It will take all columns value and its instance value as input and add create an entry then add it to the vector.

Arguments:
1. Instance Oid (IN).
2. Instance Oid Length (IN).
3. Table column reqID (IN).
4. Table column notificationLogTime (IN).
5. Table column notificationLogVarBinds (IN).
6. Table column notificationLogOID (IN).
7. Table column notificationVersion (IN).
Return type:
SUCCESS or FAILURE.
Bugs:
null

CreateSnmpNotificationLogTableInstance()

OID* CreateSnmpNotificationLogTableInstance(INT32 *instanceLen, INT32 reqID)

This method is called from the method CreateAndAddNewSnmpNotificationLogTableTableEntry(). It is used to create a oid representation of the instance value by taking table index columns value as input.

Arguments:
1. Instance Oid Length(IN/OUT).
2. Table column reqID (IN).
Return type:
Nothing.
Bugs:
null

FreeSnmpNotificationLogTableEntryMemory()

void FreeSnmpNotificationLogTableEntryMemory(Entry *entryPtr)

This method is called from FreeSnmpNotificationLogTableVector(). This method is used to free the reserved memory for an entry while deleting an entry from the vector. The user can also call this method to free a particular entry in the table vector.

Arguments:
1. Reference of the table entry (IN).
Return type:
Nothing.
Bugs:
null

GetSnmpNotificationLogTableInfo()

Vector* GetSnmpNotificationLogTableInfo(INT32 startIdx, INT32 numOfRows, INT32 *flag)

It will return the table vector reference, before that it will verify the total size of the table and set flag value.

Arguments:
1. Starting Row index (IN).
2. Number of rows (IN).
3. Flag about remaining number of rows (OUT).
Return type:
Nothing.
Bugs:
null

InitSnmpNotificationLogTable()

void InitSnmpNotificationLogTable(void)

It will register the treeCell with agent and initialize all data structures related to the module "notificationLogTable".

Arguments:
Nothing.
Return type:
Nothing.
Bugs:
null
See Also:
CreateAndAddNewSnmpNotificationLogTableEntry()

ReadFromSnmpNotificationLogTableFile()

CHAR ReadFromSnmpNotificationLogTableFile()

It will read the "notificationLogTable" enteries from the file and add it to the table(vector). After Successfully reading from the file it returns SUCCESS else FAILURE.

Arguments:
Nothing.
Return type:
SUCCESS or FAILURE.
Bugs:
null
See Also:
WriteToSnmpNotificationLogTableFile()

ReadSnmpNotificationLogOID()

U_CHAR* ReadSnmpNotificationLogOID(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)

Get method for (table) column notificationLogOID. OID for which the Trap is generated to be mentioned here.

Arguments:
1. Pointer of the entry (IN).
2. Pointer of the variable value length (OUT).
3. Status which is used to return SNMP Error (OUT).
Return type:
The Current value of "notificationLogOID".
Bugs:
null

ReadSnmpNotificationLogTime()

U_CHAR* ReadSnmpNotificationLogTime(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)

Get method for (table) column notificationLogTime. The upTime of the Agent and the time stating when the Trap was sent.

Arguments:
1. Pointer of the entry (IN).
2. Pointer of the variable value length (OUT).
3. Status which is used to return SNMP Error (OUT).
Return type:
The Current value of "notificationLogTime".
Bugs:
null

ReadSnmpNotificationLogVarBinds()

U_CHAR* ReadSnmpNotificationLogVarBinds(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)

Get method for (table) column notificationLogVarBinds. The Varbinds present in the Trap. If the version is of v1 type, the varbinds would be represented in Integer values and if the version is of V2c type, the varbinds would be represented as a combination of the LogTime and LogOID.

Arguments:
1. Pointer of the entry (IN).
2. Pointer of the variable value length (OUT).
3. Status which is used to return SNMP Error (OUT).
Return type:
The Current value of "notificationLogVarBinds".
Bugs:
null

ReadSnmpNotificationVersion()

U_CHAR* ReadSnmpNotificationVersion(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)

Get method for (table) column notificationVersion. Version of the Trap to be specified here.

Arguments:
1. Pointer of the entry (IN).
2. Pointer of the variable value length (OUT).
3. Status which is used to return SNMP Error (OUT).
Return type:
The Current value of "notificationVersion".
Bugs:
null

SnmpNotificationLogTableProcessReadReq()

U_CHAR* SnmpNotificationLogTableProcessReadReq(U_CHAR pduType, OID *reqOid, INT32 *reqOidLen, INT32 *varValLen, U_CHAR *status)

This method is called from agent api (pdureqhdlr.c) when a get/get-next request is made from the manager. This method will identify the exact scalar/table column for which the request is made and call the corresponding get method which is available in the instrument file. output from this function will be the value of the requested variable, length of the variable, the error status if any.

Arguments:
1. PduType (GET/GET-NEXT) (IN).
2. Requested Oid (IN).
3. Requested Oid Length (IN).
4. Variable value length (IN).
5. It is used to return snmp error or exception(IN/OUT).
Return type:
Pointer to the return variable value.
Bugs:
null

UpdateSnmpNotificationLogTable()

CHAR UpdateSnmpNotificationLogTable(U_CHAR command)

This method will be called from the agent api after successful SET/GET/GET-NEXT operation, in order to update the original or user application's data structrue with the changes made to SnmpNotificationLogTable. If FILE_TO_VECTOR is enabled then the corresponding text file will be updated here. If the storagetype is NoStorage then the user should call this method to update the changes done by the management.The user can also free the resources in this function if required.

Arguments:
command type.
Return type:
SUCCESS or FAILURE.
Bugs:
null

WriteToSnmpNotificationLogTableFile()

CHAR WriteToSnmpNotificationLogTableFile()

It will write the "notificationLogTable" enteries from the table(vector). After successfully writing into the file it returns SUCCESS else FAILURE.

Arguments:
Nothing.
Return type:
SUCCESS or FAILURE.
Bugs:
null
See Also:
ReadFromSnmpNotificationLogTableFile()


OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

Copyright (c) 2009 ZOHO Corp. All Rights Reserved.