OverView Index Help                                                                AdventNet Agent Toolkit C Edition 6 

managerlist.c
This file has routines to add/delete manager list. The list contains all the information about each manager like user name, host name, port number etc..

See Also :managerlist.h
Return Type Method Summary
CHAR CreateAndAddManagerTableEntry(OID *instance, INT32 instanceLen, INT32 managerHostType, CHAR *managerHost, U_INT32 managerPort, INT32 managerVersion, CHAR *community, CHAR *userName, INT32 secModel, INT32 secLevel, U_CHAR *contextName, INT32 contextNameLen, U_INT32 timeOut, U_INT32 retries, INT32 managerStatus, Vector *managerVector) or CHAR CreateAndAddManagerTableEntry(OID *instance, INT32 instanceLen, INT32 managerHostType, CHAR *managerHost, U_INT32 managerPort, INT32 managerVersion, CHAR *community, U_INT32 timeOut, U_INT32 retries, INT32 managerStatus, Vector *managerVector)
             It will take all columns value and its instance value as input and add create an Entry then add it to the Vector.
CHAR CreateManagerEntry(INT32 managerHostType, CHAR *managerHost, U_INT32 managerPort, INT32 managerVersion, CHAR *community, CHAR *userName, INT32 secModel, INT32 secLevel, U_CHAR *contextName, INT32 contextNameLen, U_INT32 timeOut, U_INT32 retries, INT32 managerStatus) or CHAR CreateManagerEntry(INT32 managerHostType, CHAR *managerHost, U_INT32 managerPort, INT32 managerVersion, CHAR *community, U_INT32 timeOut, U_INT32 retries, INT32 managerStatus)
             It will take all columns value as input and create an instance then add it to the Vector.
CHAR CreateManagerEntryForManagerVector(INT32 managerHostType, CHAR *managerHost, U_INT32 managerPort, INT32 managerVersion, CHAR *community, CHAR *userName, INT32 secModel, INT32 secLevel, U_CHAR *contextName, INT32 contextNameLen, U_INT32 timeOut, U_INT32 retries, INT32 managerStatus, Vector *managerVector) or CHAR CreateManagerEntryForManagerVector(INT32 managerHostType, CHAR *managerHost, U_INT32 managerPort, INT32 managerVersion, CHAR *community, U_INT32 timeOut, U_INT32 retries, INT32 managerStatus, Vector *managerVector)
             It will take all columns value as input and create an instance then add it to the Vector.
void* CreateManagerTableRowWithDefaultValues(U_CHAR **indexList, INT32 *indexListLen, INT32 len)
             It will create a new row and assign default value for each table column.
CHAR DeleteManagerEntry(CHAR *userName, INT32 managerHostType, CHAR *managerHost, U_INT32 portNum) or CHAR DeleteManagerEntry(INT32 managerHostType, CHAR * managerHost, U_INT32 portNum)
             Deletes an object from the manger list.
void FreeManagerTableEntryMemory(Entry *entryPtr)
             It will free the reserved memeory for an Entry.
void InitManagerTable()
             It will register the manager treeCell with tree of agent and initialize all data structures related to the module managerTable.
U_CHAR* ManagerTableProcessReadReq(U_CHAR pduType, OID *reqOid, INT32 *reqOidLen, INT32 *varValLen, U_CHAR *status)
             It will process the GET & GET-NEXT requests and send back the appropriate result.
U_CHAR* ManagerTableProcessWriteReq(INT32 pduVersion, OID *reqOid, INT32 reqOidLen, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)
             It will process the SET requests and send back the modified result.
U_CHAR* ReadCommunity(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Read method for (table) column community.
U_CHAR* ReadContextName(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Read method for (table) column contextName.
CHAR ReadFromManagerTableFile()
             It will read the table enteries from the file and add it to the Vector.
U_CHAR* ReadManagerHost(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Read method for (table) column managerHost.
U_CHAR* ReadManagerHostType(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Read method for (table) column managerHostType.
U_CHAR* ReadManagerPort(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Read method for (table) column managerPort.
U_CHAR* ReadManagerStatus(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Read method for (table) column managerStatus.
U_CHAR ReadManagerTableEntry(U_CHAR ***cols, INT32 index)
            
Vector* ReadManagerTableInfo(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.
U_CHAR* ReadManagerVersion(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Read method for (table) column managerVersion.
U_CHAR* ReadRetries(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Read method for (table) column retries.
U_CHAR* ReadSecLevel(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Read method for (table) column secLevel.
U_CHAR* ReadSecModel(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Read method for (table) column secModel.
U_CHAR* ReadTimeOut(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Read method for (table) column timeOut.
U_CHAR* ReaduserName(void *tableEntryPtr, INT32 *varValLen, U_CHAR *status)
             Read method for (table) column userName.
CHAR UpdateManagerTableFile(U_CHAR command)
             It will update the changes of ManagerTableFile.
U_CHAR* WriteCommunity(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)
             Write method for (table) column community.
U_CHAR* WriteContextName(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)
             Write method for (table) column contextName.
U_CHAR* WriteManagerStatus(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)
             Write method for (table) column managerStatus.
U_CHAR* WriteManagerVersion(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)
             Write method for (table) column ManagerVersion.
U_CHAR* WriteRetries(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)
             Write method for (table) column retries.
U_CHAR* WriteSecLevel(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)
             Write method for (table) column secLevel.
U_CHAR* WriteSecModel(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)
             Write method for (table) column secModel.
U_CHAR* WriteTimeOut(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)
             Write method for (table) column timeOut.
CHAR WriteToManagerTableFile()
             It will write the table enteries from the Vector into the file.
U_CHAR* WriteUserName(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)
             Write method for (table) column userName.
   
Method Details

CreateAndAddManagerTableEntry()

CHAR CreateAndAddManagerTableEntry(OID *instance, INT32 instanceLen, INT32 managerHostType,CHAR *managerHost, U_INT32 managerPort, INT32 managerVersion, CHAR *community, CHAR *userName, INT32 secModel, INT32 secLevel, U_CHAR *contextName, INT32 contextNameLen, U_INT32 timeOut, U_INT32 retries, INT32 managerStatus, Vector *managerVector) or CHAR CreateAndAddManagerTableEntry(OID *instance, INT32 instanceLen,INT32 managerHostType, CHAR *managerHost, U_INT32 managerPort, INT32 managerVersion, CHAR *community, U_INT32 timeOut, U_INT32 retries, INT32 managerStatus, Vector *managerVector)

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 managerHostType(IN).
4. Table column managerHost (IN).
5. Table column managerPort (IN).
6. Table column managerVersion (IN).
7. Table column community (IN).
8. Table column userName (IN).
9. Table column secModel (IN).
10. Table column secLevel (IN).
11. Table column contextName (IN).
12. Length of the contextName (IN).
13. Table column timeOut (IN).
14. Table column retries (IN).
15. Table column managerStatus (IN).
16. Reference to the manager vector (IN/OUT).
Return type:
SUCCESS or FAILURE.
Bugs:
null

CreateManagerEntry()

CHAR CreateManagerEntry(INT32 managerHostType,CHAR *managerHost, U_INT32 managerPort, INT32 managerVersion, CHAR *community, CHAR *userName,INT32 secModel, INT32 secLevel, U_CHAR *contextName, INT32 contextNameLen, U_INT32 timeOut, U_INT32 retries, INT32 managerStatus) or CHAR CreateManagerEntry(INT32 managerHostType,CHAR *managerHost, U_INT32 managerPort, INT32 managerVersion, CHAR *community, U_INT32 timeOut, U_INT32 retries, INT32 managerStatus)

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

Arguments:
1. Table column managerHostType(IN).
2. Table column managerHost (IN).
3. Table column managerPort (IN).
4. Table column managerVersion (IN).
5. Table column community (IN).
6. Table column userName (IN).
7. Table column secModel (IN).
8. Table column secLevel (IN).
9. Table column contextName (IN).
10. Length of the contextName (IN).
11. Table column timeOut (IN).
12. Table column retries (IN).
13. Table column managerStatus (IN).
Return type:
SUCCESS or FAILURE.
Bugs:
null

CreateManagerEntryForManagerVector()

CHAR CreateManagerEntryForManagerVector(INT32 managerHostType,CHAR *managerHost, U_INT32 managerPort, INT32 managerVersion, CHAR *community, CHAR *userName,INT32 secModel, INT32 secLevel, U_CHAR *contextName, INT32 contextNameLen, U_INT32 timeOut, U_INT32 retries, INT32 managerStatus, Vector *managerVector) or CHAR CreateManagerEntryForManagerVector(INT32 managerHostType,CHAR *managerHost, U_INT32 managerPort, INT32 managerVersion, CHAR *community, U_INT32 timeOut, U_INT32 retries, INT32 managerStatus, Vector *managerVector)

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

Arguments:
1. Table column managerHostType(IN).
2. Table column managerHost (IN).
3. Table column managerPort (IN).
4. Table column managerVersion (IN).
5. Table column community (IN).
6. Table column userName (IN).
7. Table column secModel (IN).
8. Table column secLevel (IN).
9. Table column contextName (IN).
10. Length of the contextName (IN).
11. Table column timeOut (IN).
12. Table column retries (IN).
13. Table column managerStatus (IN).
14. Refernce to the manager vector (IN/OUT).
Return type:
SUCCESS or FAILURE.
Bugs:
null

CreateManagerTableRowWithDefaultValues()

void* CreateManagerTableRowWithDefaultValues(U_CHAR **indexList, INT32 *indexListLen, INT32 len)

It will create a new row and assign default value for each table column. For index column it will assign the value from input argument (index).

Arguments:
1. List of index values (IN).
2. Length of each index value (IN).
3. Length of the index list (IN).
Return type:
Created aaplicationTable row pointer.
Bugs:
null

DeleteManagerEntry()

CHAR DeleteManagerEntry(CHAR *userName,INT32 managerHostType, CHAR *managerHost, U_INT32 portNum) or CHAR DeleteManagerEntry(INT32 managerHostType,CHAR * managerHost, U_INT32 portNum)

Deletes an object from the manger list.

Arguments:
1. User Name (IN).
2. Manager host name (IN).
3. Manager port number (IN).
Return type:
SUCCESS on successful deletion otherwise FALSE.
Bugs:
null

FreeManagerTableEntryMemory()

void FreeManagerTableEntryMemory(Entry *entryPtr)

It will free the reserved memeory for an Entry.

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

InitManagerTable()

void InitManagerTable()

It will register the manager treeCell with tree of agent and initialize all data structures related to the module managerTable.

Arguments:
Nothing.
Return type:
Nothing.
Bugs:
null

ManagerTableProcessReadReq()

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

It will process the GET & GET-NEXT requests and send back the appropriate result.

Arguments:
1. PduType (GET/GET-NEXT) (IN).
2. Requested Oid (IN).
3. Requested Oid Length (IN).
4. Variable value length (IN).
5. Status of the operation (IN/OUT).
Return type:
Pointer to the return variable value.
Bugs:
null
See Also:
ManagerTableProcessWriteReq()

ManagerTableProcessWriteReq()

U_CHAR* ManagerTableProcessWriteReq(INT32 pduVersion, OID *reqOid, INT32 reqOidLen, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)

It will process the SET requests and send back the modified result.

Arguments:
1. pduVersion (IN).
2. Requested Oid(IN).
3. Requested Oid Length (IN).
4. Variable value (IN).
5. Variable value length (IN).
6. Status of the operation (IN/OUT).
Return type:
Pointer to the return variable value.
Bugs:
null
See Also:
ManagerTableProcessReadReq()

ReadCommunity()

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

Read method for (table) column community.

Arguments:
1. Pointer of the Entry (IN).
2. Pointer of the variable value length (IN/OUT).
3. status (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
WriteCommunity()

ReadContextName()

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

Read method for (table) column contextName.

Arguments:
1. Pointer of the Entry (IN).
2. Pointer of the variable value length (IN/OUT).
3. status (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
WriteContextName()

ReadFromManagerTableFile()

CHAR ReadFromManagerTableFile()

It will read the table enteries from the file and add it to the Vector.

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

ReadManagerHost()

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

Read method for (table) column managerHost.

Arguments:
1. Pointer of the Entry (IN).
2. Pointer of the variable value length (IN/OUT).
3. status (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null

ReadManagerHostType()

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

Read method for (table) column managerHostType.

Arguments:
1. Pointer of the Entry (IN).
2. Pointer of the variable value length (IN/OUT).
3. status (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null

ReadManagerPort()

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

Read method for (table) column managerPort.

Arguments:
1. Pointer of the Entry (IN).
2. Pointer of the variable value length (IN/OUT).
3. status (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null

ReadManagerStatus()

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

Read method for (table) column managerStatus.

Arguments:
1. Pointer of the Entry (IN).
: 2. Pointer of the variable value length (IN/OUT).
3. status (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
WriteManagerStatus()

ReadManagerTableEntry()

U_CHAR ReadManagerTableEntry(U_CHAR ***cols,INT32**colsLen,INT32 index)

It will get an entry from table

Arguments:
1.Table columns (IN).
2. Columns length (IN).
3. Index of the vector (IN).
Return type:
SUCCESS/FAILURE.
Bugs:
null

ReadManagerTableInfo()

Vector* ReadManagerTableInfo(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:
Reference to the Manager vector.
Bugs:
null

ReadManagerVersion()

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

Read method for (table) column managerVersion.

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 "managerVersion".
Bugs:
null
See Also:
WriteManagerVersion()

ReadRetries()

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

Read method for (table) column retries.

Arguments:
1. Pointer of the Entry (IN).
2. Pointer of the variable value length (IN/OUT).
3. status (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
WriteRetries()

ReadSecLevel()

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

Read method for (table) column secLevel.

Arguments:
1. Pointer of the Entry (IN).
2. Pointer of the variable value length (IN/OUT).
3. status (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
WriteSecLevel()

ReadSecModel()

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

Read method for (table) column secModel.

Arguments:
1. Pointer of the Entry (IN).
2. Pointer of the variable value length (IN/OUT).
3. status (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
WriteSecModel()

ReadTimeOut()

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

Read method for (table) column timeOut.

Arguments:
1. Pointer of the Entry (IN).
2. Pointer of the variable value length (IN/OUT).
3. status (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
WriteTimeOut()

ReaduserName()

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

Read method for (table) column userName.

Arguments:
1. Pointer of the Entry (IN).
2. Pointer of the variable value length (IN/OUT).
3. status (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
WriteUserName()

UpdateManagerTableFile()

CHAR UpdateManagerTableFile(U_CHAR command)

It will update the changes of ManagerTableFile.

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

WriteCommunity()

U_CHAR* WriteCommunity(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)

Write method for (table) column community.

Arguments:
1. Pointer of the Entry (IN/OUT).
2. Pointer of the variable to set (IN).
3. Pointer of the variable value length (IN/OUT).
4. Status which is used to return SNMP Error (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
ReadCommunity()

WriteContextName()

U_CHAR* WriteContextName(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)

Write method for (table) column contextName.

Arguments:
1. Pointer of the Entry (IN/OUT).
2. Pointer of the variable to set (IN).
3. Pointer of the variable value length (IN/OUT).
4. Status which is used to return SNMP Error (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
ReadContextName()

WriteManagerStatus()

U_CHAR* WriteManagerStatus(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)

Write method for (table) column managerStatus.

Arguments:
1. Pointer of the Entry (IN/OUT).
2. Pointer of the variable to set (IN).
3. Pointer of the variable value length (IN/OUT).
4. Status which is used to return SNMP Error (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
ReadManagerStatus()

WriteManagerVersion()

U_CHAR* WriteManagerVersion(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)

Write method for (table) column ManagerVersion.

Arguments:
1. Pointer of the Entry (IN/OUT).
2. Pointer of the variable to set (IN).
3. Pointer of the variable value length (IN/OUT).
4. Status which is used to return SNMP Error (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
ReadManagerVersion()

WriteRetries()

U_CHAR* WriteRetries(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)

Write method for (table) column retries.

Arguments:
1. Pointer of the Entry (IN/OUT).
2. Pointer of the variable to set (IN).
3. Pointer of the variable value length (IN/OUT).
4. Status which is used to return SNMP Error (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
ReadRetries()

WriteSecLevel()

U_CHAR* WriteSecLevel(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)

Write method for (table) column secLevel.

Arguments:
1. Pointer of the Entry (IN/OUT).
2. Pointer of the variable to set (IN).
3. Pointer of the variable value length (IN/OUT).
4. Status which is used to return SNMP Error (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
ReadSecLevel()

WriteSecModel()

U_CHAR* WriteSecModel(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)

Write method for (table) column secModel.

Arguments:
1. Pointer of the Entry (IN/OUT).
2. Pointer of the variable to set (IN).
3. Pointer of the variable value length (IN/OUT).
4. Status which is used to return SNMP Error (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
ReadSecModel()

WriteTimeOut()

U_CHAR* WriteTimeOut(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)

Write method for (table) column timeOut.

Arguments:
1. Pointer of the Entry (IN/OUT).
2. Pointer of the variable to set (IN).
3. Pointer of the variable value length (IN/OUT).
4. Status which is used to return SNMP Error (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
ReadTimeOut()

WriteToManagerTableFile()

CHAR WriteToManagerTableFile()

It will write the table enteries from the Vector into the file.

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

WriteUserName()

U_CHAR* WriteUserName(void *tableEntryPtr, U_CHAR *varVal, INT32 *varValLen, U_CHAR *status)

Write method for (table) column userName.

Arguments:
1. Pointer of the Entry (IN/OUT).
2. Pointer of the variable to set (IN).
3. Pointer of the variable value length (IN/OUT).
4. Status which is used to return SNMP Error (IN/OUT).
Return type:
Pointer of the return variable value.
Bugs:
null
See Also:
ReaduserName()


OverView Index Help                                                                AdventNet Agent Toolkit C Edition 6 

Copyright (c) 1999-2007 AdventNet, Inc. All Rights Reserved.