HP-UX IPQoS A.01.00 Programmer's Guide (October 2005)
Using the HP-UX IPQoS API
Using Objects
Chapter 2 25
Using Objects
HP-UX IPQoS API “objects” are pointers to opaque structures. There are three types of
objects: filters, policies, and adapters. The following sections briefly describe some key
considerations about working with objects when using the HP-UX IPQoS API.
Creating, Copying and Destroying Objects
HP-UX IPQoS API resource management functions exist that create, copy and destroy filters
and policies. These functions are: IpqosCreateFilter(), IpqosCopyFilter(),
IpqosDestroyFilter(), IpqosCreatePolicy(), IpqosCopyPolicy() and
IpqosDestroyPolicy() respectively.
Both the IpqosDestroyFilter() and IpqosDestroyPolicy() functions take an argument
that is a pointer to the object. When an object is destroyed, the resources are freed up and its
pointer is set to NULL to prevent further use of that pointer.
Adapter objects cannot be created, copied or destroyed. They are managed by the HP-UX
IPQoS API based on the list of network adapters that have been configured on the system.
Object Attributes
HP-UX IPQoS API objects have attributes that can be read or modified.
All objects, (filter, policy and adapter) have a (required) name attribute that must be unique.
Filter and policy objects have a status attribute, which can be one of the following:
IPQOS_STATUS_ACTIVE, IPQOS_STATUS_INACTIVE, IPQOS_STATUS_ACTIVE_UPON_COMMIT,
IPQOS_STATUS_INACTIVE_UPON_COMMIT. These indicate the status, taking into account
whether or not the session has been or will be committed, after an action function has been
performed.
Filter and policy objects also have attributes that can be read (using “get” functions) or
modified (“set” functions). Adapter objects also have attributes, but these can only be read
(using “get” functions).
See following sections of this chapter for a complete listing of the attributes associated with
filter, policy, and adapter objects.