HP-UX IPQoS A.01.00 Programmer's Guide (October 2005)

Using the HP-UX IPQoS API
Using Sessions
Chapter 2 23
Configuration sessions (IPQOS_SESSION_CONFIG): Use to traverse and to make changes to
the current HP-UX IPQoS configuration.
Read sessions (IPQOS_SESSION_READ): Use to only traverse the current HP-UX IPQoS
configuration.
Statistics sessions (IPQOS_SESSION_STATS): Use to traverse and obtain statistics
maintained on the current HP-UX IPQoS configuration.
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 HP-UX IPQoS kernel
module and update the HP-UX IPQoS database accordingly. (This function can only be
called from an IPQOS_SESSION_CONFIG type session.)
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 re-try the IpqosCommitSession(), but rather to
use IpqosAbortSession() to close the session.
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 HP-UX IPQoS kernel module and database unchanged.
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 HP-UX IPQoS kernel module.