Using the
Using Sessions
•Configuration sessions (IPQOS_SESSION_CONFIG): Use to traverse and to make changes to the current
•Read sessions (IPQOS_SESSION_READ): Use to only traverse the current
•Statistics sessions (IPQOS_SESSION_STATS): Use to traverse and obtain statistics maintained on the current
At any point in time there can only be one IPQOS_SESSION_CONFIG or IPQOS_SESSION_STATS type session running on the system. There can be simultaneous IPQOS_SESSION_READ type sessions, even when an IPQOS_SESSION_CONFIG or IPQOS_SESSION_STATS is open.
Terminating a Session
There are two ways (functions available) to terminate a session:
•Committing (saving) the session (IpqosCommitSession): Use this function to commit (save) all the configuration actions performed in the session to the
If there are no errors, it also closes the session. However, if the function does not return IPQOS_S_SUCCESS, then none of the configuration actions performed in the session are applied (saved) to the configuration in the kernel module or to the database. In this case, programmers are recommended to not
•Aborting the session (IpqosAbortSession): Use this function to abort (quit without saving) a session and close it. If the session is of type IPQOS_SESSION_CONFIG this function will effectively ignore all the configuration actions and leave the configuration in the
NOTE | Exiting an application without explicitly calling IpqosCommitSession() or |
| IpqosAbortSession() is equivalent to having called IpqosAbortSession(). |
|
|
Object Status
To determine if a policy or filter object is currently configured, use the following functions: IpqosGetFilterStatus(), IpqosGetPolicyStatus(). The possible status conditions, and their implications, are:
•IPQOS_STATUS_ACTIVE: The filter (or policy) object is attached to a policy (or adapter) object, and is currently active in the
Chapter 2 | 23 |