tfInsertUsmEntry
Table of Contents >> SNMP Programmer's Reference
| #include <trapi.h> |
| int tfInsertUsmEntry | (ttSnmpUsmUserTablePtr usmUserEntryPtr); |
Function Description
This function either inserts the new entry into the linked list of ttSnmpUsmUserTableâs, if the compound table index does not coinside with any index in the entries in the linked list, or replaces the old entry with the new one, if the identical index is found. The struct ttSnmpUsmUserTable is defined in trsnmpv3.h The table index consists of suutEngineId, svatPrefix and suutName. This function takes a pointer to a dynamically-allocated ttSnmpUsmUserTablePtr. This memory is not freed upon error. If this function returns TM_SNMPAPI_NOERROR, the memory is now owned by the Treck stack and will be freed when Treck no longer requires it.
Parameters
- usmUserEntryPtr
- Pointer to a dynamically-allocated ttSnmpUsmUserTable entry to be inserted. Upon successful return, Treck owns the memory pointed to by this variable and will free it when it is no longer needed. Upon error, Treck does not take ownership of this memory.
Returns
- TM_SNMPAPI_NOERROR
- Success.
- TM_ALLOCATION_ERROR
- Failure to allocate memory for the agent global variables.