OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

snmpnotificationvarbindtable.c.
To handle the requests from the manager for the module snmpnotificationvarbindtable. The Varbind Table stores information of the varbind values present in the Trap PDU. The Varbind Table stores information of the varbind values present in the Trap PDU.

See Also :snmpnotificationvarbindtable.h
Return Type Method Summary
CHAR CreateAndAddNewSnmpNotificationVarBindTableEntry(INT32 reqID, INT32 notificationVarBindIndex, CHAR *notificationVarBindID, U_CHAR *notificationVarBindType, U_INT32 notificationCounter32Value, U_INT32 notificationUnsigned32Value, U_INT32 notificationTimeTicksValue, INT32 notificationInteger32Value, U_CHAR *notificationOctetStringValue, INT32 notificationOctetStringValueLen , U_CHAR *notificationIPAddressValue, CHAR *notificationOIDValue, counter64 notificationCounter64Value)
             It will take all columns value as input and create an instance then add it to the vector.
CHAR CreateAndAddSnmpNotificationVarBindTableEntry(OID *instance, INT32 instanceLen, INT32 reqID, INT32 notificationVarBindIndex, CHAR *notificationVarBindID, U_CHAR *notificationVarBindType, U_INT32 notificationCounter32Value, U_INT32 notificationUnsigned32Value, U_INT32 notificationTimeTicksValue, INT32 notificationInteger32Value, U_CHAR *notificationOctetStringValue, INT32 notificationOctetStringValueLen , U_CHAR *notificationIPAddressValue, CHAR *notificationOIDValue, counter64 notificationCounter64Value)
             It will take all columns value and its instance value as input and add create an entry then add it to the vector.
OID* CreateSnmpNotificationVarBindTableInstance(INT32 *instanceLen, INT32 reqID, INT32 notificationVarBindIndex)
             This method is called from the method CreateAndAddNewSnmpNotificationVarBindTableTableEntry().
CHAR DeleteSnmpNotificationVarBindTableEntryForreqIDMatchingColumn (INT32 reqID)
            
void FreeSnmpNotificationVarBindTableEntryMemory(Entry *entryPtr)
             This method is called from FreeSnmpNotificationVarBindTableVector().
Vector* GetSnmpNotificationVarBindTableInfo(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 InitSnmpNotificationVarBindTable()
             It will register the treeCell with agent and initialize all data structures related to the module "snmpNotificationVarBindTable".
CHAR ReadFromSnmpNotificationVarBindTableFile()
             It will read the "notificationVarBindTable" enteries from the file and add it to the table(vector).
U_CHAR* ReadSnmpNotificationCounter32Value(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationCounter32Value.
U_CHAR* ReadSnmpNotificationCounter64Value(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationCounter64Value.
U_CHAR* ReadSnmpNotificationIPAddressValue(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationIPAddressValue.
U_CHAR* ReadSnmpNotificationInteger32Value(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationInteger32Value.
U_CHAR* ReadSnmpNotificationOIDValue(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationOIDValue.
U_CHAR* ReadSnmpNotificationOctetStringValue(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationOctetStringValue.
U_CHAR* ReadSnmpNotificationTimeTicksValue(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationTimeTicksValue.
U_CHAR* ReadSnmpNotificationUnsigned32Value(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationUnsigned32Value.
U_CHAR* ReadSnmpNotificationVarBindID(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationVarBindID.
U_CHAR* ReadSnmpNotificationVarBindType(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Get method for (table) column notificationVarBindType.
U_CHAR* SnmpNotificationVarBindTableProcessReadReq(U_CHAR pduType, OID *reqOid, INT32 *reqOidLen, INT32 *varValLen, U_CHAR *status)
             This method is called from agent api (pdureqhdlr.
CHAR UpdateSnmpNotificationVarBindTable(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 SnmpNotificationVarBindTable.
CHAR WriteToSnmpNotificationVarBindTableFile()
             It will write the "notificationVarBindTable" enteries from the table(vector).
   
Method Details

CreateAndAddNewSnmpNotificationVarBindTableEntry()

CHAR CreateAndAddNewSnmpNotificationVarBindTableEntry(INT32 reqID, INT32 notificationVarBindIndex, CHAR *notificationVarBindID, U_CHAR *notificationVarBindType, U_INT32 notificationCounter32Value, U_INT32 notificationUnsigned32Value, U_INT32 notificationTimeTicksValue, INT32 notificationInteger32Value, U_CHAR *notificationOctetStringValue, INT32 notificationOctetStringValueLen , U_CHAR *notificationIPAddressValue, CHAR *notificationOIDValue, counter64 notificationCounter64Value)

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

Arguments:
1. Parent Table index column reqID (IN).
2. Table column notificationVarBindIndex (IN).
3. Table column notificationVarBindID (IN).
4. Table column notificationVarBindType (IN).
5. Table column notificationCounter32Value (IN).
6. Table column notificationUnsigned32Value (IN).
7. Table column notificationTimeTicksValue (IN).
8. Table column notificationInteger32Value (IN).
9. Table column notificationOctetStringValue (IN).
10. Table column notificationIPAddressValue (IN).
11. Table column notificationOIDValue (IN).
12. Table column notificationCounter64Value (IN).
Return type:
SUCCESS or FAILURE.
Bugs:
null

CreateAndAddSnmpNotificationVarBindTableEntry()

CHAR CreateAndAddSnmpNotificationVarBindTableEntry(OID *instance, INT32 instanceLen, INT32 reqID, INT32 notificationVarBindIndex, CHAR *notificationVarBindID, U_CHAR *notificationVarBindType, U_INT32 notificationCounter32Value, U_INT32 notificationUnsigned32Value, U_INT32 notificationTimeTicksValue, INT32 notificationInteger32Value, U_CHAR *notificationOctetStringValue, INT32 notificationOctetStringValueLen , U_CHAR *notificationIPAddressValue, CHAR *notificationOIDValue, counter64 notificationCounter64Value)

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 notificationVarBindIndex (IN).
4. Table column notificationVarBindID (IN).
5. Table column notificationVarBindType (IN).
6. Table column notificationCounter32Value (IN).
7. Table column notificationUnsigned32Value (IN).
8. Table column notificationTimeTicksValue (IN).
9. Table column notificationInteger32Value (IN).
10. Table column notificationOctetStringValue (IN).
11. Table column notificationIPAddressValue (IN).
12. Table column notificationOIDValue (IN).
13. Table column notificationCounter64Value (IN).
Return type:
SUCCESS or FAILURE.
Bugs:
null

CreateSnmpNotificationVarBindTableInstance()

OID* CreateSnmpNotificationVarBindTableInstance(INT32 *instanceLen, INT32 reqID, INT32 notificationVarBindIndex)

This method is called from the method CreateAndAddNewSnmpNotificationVarBindTableTableEntry(). 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. Parent Table index column reqID (IN).
3. Table column notificationVarBindIndex (IN).
Return type:
Nothing.
Bugs:
null

DeleteSnmpNotificationVarBindTableEntryForreqIDMatchingColumn()

CHAR DeleteSnmpNotificationVarBindTableEntryForreqIDMatchingColumn (INT32 reqID)

This method will be called from the base table's Update methods of respective handler files

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

FreeSnmpNotificationVarBindTableEntryMemory()

void FreeSnmpNotificationVarBindTableEntryMemory(Entry *entryPtr)

This method is called from FreeSnmpNotificationVarBindTableVector(). 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

GetSnmpNotificationVarBindTableInfo()

Vector* GetSnmpNotificationVarBindTableInfo(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

InitSnmpNotificationVarBindTable()

void InitSnmpNotificationVarBindTable(void)

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

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

ReadFromSnmpNotificationVarBindTableFile()

CHAR ReadFromSnmpNotificationVarBindTableFile()

It will read the "notificationVarBindTable" 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:
WriteToSnmpNotificationVarBindTableFile()

ReadSnmpNotificationCounter32Value()

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

Get method for (table) column notificationCounter32Value. If the trap is sent for a Counter32 value, this particular column gets filled. Else shows a NULL value.

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 "notificationCounter32Value".
Bugs:
null

ReadSnmpNotificationCounter64Value()

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

Get method for (table) column notificationCounter64Value. f the trap is sent for a Counter64 value, this particular column gets filled. Else shows a NULL value.

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 "notificationCounter64Value".
Bugs:
null

ReadSnmpNotificationIPAddressValue()

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

Get method for (table) column notificationIPAddressValue. If the trap is sent for a IP Address type, this particular column gets filled. Else shows a NULL value.

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 "notificationIPAddressValue".
Bugs:
null

ReadSnmpNotificationInteger32Value()

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

Get method for (table) column notificationInteger32Value. If the trap is sent for a Integer32 value, this particular column gets filled. Else shows a NULL value.

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 "notificationInteger32Value".
Bugs:
null

ReadSnmpNotificationOIDValue()

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

Get method for (table) column notificationOIDValue. If the trap is sent for a OID value, this particular column gets filled. Else shows a NULL value.

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 "notificationOIDValue".
Bugs:
null

ReadSnmpNotificationOctetStringValue()

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

Get method for (table) column notificationOctetStringValue. If the trap is sent for a OctetString value, this particular column gets filled. Else showsa NULL value.

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 "notificationOctetStringValue".
Bugs:
null

ReadSnmpNotificationTimeTicksValue()

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

Get method for (table) column notificationTimeTicksValue. If the trap is sent for a TimeTicks value, this particular column gets filled. Else shows a NULL value.

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 "notificationTimeTicksValue".
Bugs:
null

ReadSnmpNotificationUnsigned32Value()

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

Get method for (table) column notificationUnsigned32Value. f the trap is sent for a Unsigned32 value, this particular column gets filled. Else shows a NULL value.

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 "notificationUnsigned32Value".
Bugs:
null

ReadSnmpNotificationVarBindID()

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

Get method for (table) column notificationVarBindID. he ID of the Trap PDU should 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 "notificationVarBindID".
Bugs:
null

ReadSnmpNotificationVarBindType()

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

Get method for (table) column notificationVarBindType. Type of the Varbind sent as a Notification.

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 "notificationVarBindType".
Bugs:
null

SnmpNotificationVarBindTableProcessReadReq()

U_CHAR* SnmpNotificationVarBindTableProcessReadReq(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

UpdateSnmpNotificationVarBindTable()

CHAR UpdateSnmpNotificationVarBindTable(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 SnmpNotificationVarBindTable. 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

WriteToSnmpNotificationVarBindTableFile()

CHAR WriteToSnmpNotificationVarBindTableFile()

It will write the "notificationVarBindTable" 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:
ReadFromSnmpNotificationVarBindTableFile()


OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

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