OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

sessiontablehdlr.c.
To handle the requests from the manager for the module sessiontable. Description Row Description

See Also :sessiontableinstru.csessiontable.h.
Return Type Method Summary
CHAR CreateAndAddNewSessionTableEntry(INT32 sessionid, U_CHAR *ipaddress, INT32 portno, INT32 sessionstate, INT32 numrequests, INT32 numresponses, CHAR *lastDatetime)
             It will take all columns value as input and create an instance then add it to the vector.
CHAR CreateAndAddSessionTableEntry(OID *instance, INT32 instanceLen, INT32 sessionid, U_CHAR *ipaddress, INT32 portno, INT32 sessionstate, INT32 numrequests, INT32 numresponses, CHAR *lastDatetime)
             It will take all columns value and its instance value as input and add create an entry then add it to the vector.
OID* CreateSessionTableInstance(INT32 *instanceLen, INT32 sessionid)
             This method is called from the method CreateAndAddNewSessionTableTableEntry().
void FreeSessionTableEntryMemory(Entry *entryPtr)
             This method is called from FreeSessionTableVector().
void FreeSessionTableVector()
             Free the gv_sessionTableVector.
Vector* GetSessionTableInfo(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 InitSessionTable()
             It will register the treeCell with agent and initialize all data structures related to the module "sessionTable".
CHAR SessionTableProcessRequests(U_CHAR protoType, U_CHAR cmdType, Vector *attrbsVect, INT32 numOfRows)
             This method will be called from the agent api for all the requests (GET/GET-NEXT/SET) with received pduType and varBind vector before processing the received varbinds.
CHAR UpdateSessionTable(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 SessionTable.
   
Method Details

CreateAndAddNewSessionTableEntry()

CHAR CreateAndAddNewSessionTableEntry(INT32 sessionid, U_CHAR *ipaddress, INT32 portno, INT32 sessionstate, INT32 numrequests, INT32 numresponses, CHAR *lastDatetime)

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

Arguments:
1. Table column sessionid (IN).
2. Table column ipaddress (IN).
3. Table column portno (IN).
4. Table column sessionstate (IN).
5. Table column numrequests (IN).
6. Table column numresponses (IN).
7. Table column lastreqtime (IN).
Return type:
SUCCESS or FAILURE.
Bugs:
null

CreateAndAddSessionTableEntry()

CHAR CreateAndAddSessionTableEntry(OID *instance, INT32 instanceLen, INT32 sessionid, U_CHAR *ipaddress, INT32 portno, INT32 sessionstate, INT32 numrequests, INT32 numresponses, CHAR *lastDatetime)

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 sessionid (IN).
4. Table column ipaddress (IN).
5. Table column portno (IN).
6. Table column sessionstate (IN).
7. Table column numrequests (IN).
8. Table column numresponses (IN).
9. Table column lastreqtime (IN).
Return type:
SUCCESS or FAILURE.
Bugs:
null

CreateSessionTableInstance()

OID* CreateSessionTableInstance(INT32 *instanceLen, INT32 sessionid)

This method is called from the method CreateAndAddNewSessionTableTableEntry(). 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 sessionid (IN).
Return type:
Nothing.
Bugs:
null

FreeSessionTableEntryMemory()

void FreeSessionTableEntryMemory(Entry *entryPtr)

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

FreeSessionTableVector()

void FreeSessionTableVector()

Free the gv_sessionTableVector.

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

GetSessionTableInfo()

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

InitSessionTable()

void InitSessionTable(void)

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

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

SessionTableProcessReqeusts()

CHAR SessionTableProcessRequests(U_CHAR protoType,U_CHAR cmdType, Vector *attrbsVect, INT32 numOfRows)

This method will be called from the agent api for all the requests (GET/GET-NEXT/SET) with received pduType and varBind vector before processing the received varbinds. The purpose of this method call is, the user can know the set of varBinds (OIDs') received for a listener. Using these inputs user may do some validation or call his application method and update the local data structure. User has to specify the error status and error index.

Arguments:
1. PduType (GET/GET-NEXT) (IN/OUT).
2. attrbsVect vector (IN/OUT).
3. Future Use.
4. Future Use.
Return type:
SUCCESS or FAILURE.
Bugs:
Return value of method is not handled in AgentAPI.

UpdateSessionTable()

CHAR UpdateSessionTable(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 SessionTable. 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


OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

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