The information in this document is subject to change without notice.
Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but
not limited to, the implied warranties of merchantability and fitness for a particular purpose.
Hewlett-Packard shall not be held liable for errors contained herein or direct, indirect,
special, incidental or consequential damages in connection with the furnishing, performance,
or use of this material.
Warranty
A copy of the specific warranty terms applicable to your Hewlett- Packard product and
replacement parts can be obtained from your local Sales and Service Office.
U.S. Government License
Proprietary computer software. Valid license from HP required for possession, use or copying.
Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software
Documentation, and Technical Data for Commercial Items are licensed to the U.S.
Government under vendor's standard commercial license.
This document describes how to use the HP-UX IPQoS API that is included with the HP-UX
IPQoS software.
The document printing date and part number indicate the document’s current edition. The
printing date will change when a new edition is printed. Minor changes may be made at
reprint without changing the printing date. The document part number will change when
extensive changes are made.
Document updates may be issued between editions to correct errors or document product
changes. To ensure that you receive the updated or new editions, subscribe to the appropriate
product support service. See your HP sales representative for details.
The latest version of this document can be found on line at:
http://www.docs.hp.com/en/netcom.html#IPQoS.
Intended Audience
This document is intended for system and network administrators and programmers
responsible for configuring, and managing HP-UX IPQoS using the HP-UX IPQoS API.
Administrators and programmers are expected to have knowledge of HP-UX and networking
concepts, commands and configuration, including knowledge of Transmission Control
Protocol/Internet Protocol (TCP/IP).
This document is not a tutorial.
New and Changed Documentation in This Edition
This is the first edition of this document.
5
Publishing History
Table 1Publishing History Details
Document
Manufacturing
Part Number
5991-0737HP-UX IPQoS A.01.00
Programmer’s Guide
Title
Operating Systems
Supported
HP-UX 11i v1
HP-UX 11i v2 (September
2004 or later)
Publication
Date
October 2005
What Is in This Document
HP-UX IPQoS A.01.00 Programmer’s Guide is divided into several chapters, and each
contains information about the HP-UX IPQoS API.
Chapter 1 Overview Use this chapter to obtain a summary and overview of HP-UX
IPQoS and the HP-UX IPQoS API.
Chapter 2 Using the HP-UX IPQoS API Use this chapter to learn about the
components involved in using the HP-UX IPQoS API.
Chapter 3 Troubleshooting Use this chapter to find some general tips for
troubleshooting the HP-UX IPQoS API.
Appendix A Functions Calls Use this appendix to find a summary reference list of all
functions included with the HP-UX IPQoS API.
Appendix B Return Codes Use this appendix to find a summary reference list of
HP-UX IPQoS API return codes.
Appendix C Code Example Use this appendix to find a code example that illustrates
how to create a simple configuration.
Typographic Conventions
This document uses the following conventions.
audit (5) An HP-UX manpage. In this example, audit is the name and 5 is the section
in the HP-UX Reference. On the web and on the Instant Information CD, it
may be a hot link to the manpage itself. From the HP-UX command line, you
can enter “man audit” or “man 5 audit” to view the manpage.
Book TitleThe title of a book. On the web and on the Instant Information CD, it may be
a hot link to the book itself.
6
KeyCap The name of a keyboard key. Note that Return and Enter both refer to the
same key.
EmphasisText that is emphasized.
Bold Text that is strongly emphasized.
Bold The defined use of an important word or phrase.
ComputerOut Text displayed by the computer.
UserInput Commands and other text that you type.
Command A command name or qualified command phrase.
VariableThe name of a variable that you may replace in a command or function or
information in a display that represents several possible values.
[] The contents are optional in formats and command descriptions. If the
contents are a list separated by |, you must choose one of the items.
{} The contents are required in formats and command descriptions. If the
contents are a list separated by |, you must choose one of the items.
... The preceding element may be repeated an arbitrary number of times.
| Separates items in a list of choices.
HP-UX Release Name and Release Identifier
Each HP-UX 11i release has an associated release name and release identifier. The uname (1)
command with the -r option returns the release identifier. This table shows the releases
available for HP-UX 11i.
Table 2HP-UX 11i Releases
Release
Identifier
B.11.23HP-UX 11i v2 (September 2004 or later)Intel Itanium and PA RISC
B.11.22HP-UX 11i v1.6Intel Itanium
B.11.11HP-UX 11i v1PA-RISC
Release Name
Supported Processor
Architecture
Related Documents
The following sections list references to related HP-UX IPQoS information.
7
HP Product Documentation
Information about HP-UX IPQoS can be found on docs.hp.com at:
http://www.docs.hp.com/en/netcom.html#IPQoS
Other relevant documents in this collection include:
HP-UX IPQoS A.01.00 Release Notes
HP-UX IPQoS A.01.00 Administrator’s Guide
HP-UX IPQoS White Paper
Manpages
The following is a list of manpages you can access by using the man manpage-name command
after installation:
•General Use:
ipqosadmin (1M): Information about ipqosadmin, the HP-UX IPQoS command-line
administration utility.
•Programmer’s Use (API):
— IpqosAPI (3c): General information about the HP-UX IPQoS API.
— IpqosSession (3c): Information about HP-UX IPQoS API sessions.
— IpqosAdapter (3c): Information about HP-UX IPQoS API adapters.
— IpqosPolicy (3c): Information about HP-UX IPQoS API policies.
— IpqosFilter (3c): Information about HP-UX IPQoS API filters.
— IpqosOverlapFilter (3c): Information about HP-UX IPQoS filter overlap conditions.
— IpqosStats (3c): Information about HP-UX IPQoS API statistics.
Related RFCs
The following table lists RFCs associated with HP-UX IPQoS. The Internet Engineering Task
Force (IETF) RFCs listed below can be located at: http://www.ietf.org/rfc.html
8
Table 3Relevant RFCs
RFCs Description
RFC 2474Definition of the Differentiated Services Field (DS Field) in
the IPv4 and IPv6 headers
RFC 2475An Architecture for Differentiated Services
RFC 2597Assured Forwarding PHB Group
RFC 2598An Expedited Forwarding PHB
9
HP Welcomes Your Comments
HP encourages your feedback about this document and is committed to providing
documentation that meets your needs.
Send comments to: netinfo_feedback@cup.hp.com
Include the document title, manufacturing part number, and any comment, error found, or
suggestion for improvement you have concerning this document. Also, please include what we
did right so we can incorporate it into other documents.
10
1Overview
This chapter provides an overview of the HP-UX IPQoS API. It provides an introduction to the
HP-UX IPQoS product, architecture and API. It also provides a usage overview which
includes programmatic requirements, a brief structural overview and functional overview of
the API, and also general information on man pages and return codes.
Chapter 111
Overview
Introduction
Introduction
This section briefly describes HP-UX IPQoS and its architecture. It also provides an
introduction to the HP-UX IPQoS API, including a structural and functional overview.
Introduction to HP-UX IPQoS (Background Information)
HP-UX IPQoS provides, for outgoing traffic on HP-UX hosts, traffic conditioning
(transmission prioritization for specified traffic classes) as well as DSCP (Differentiated
Services Code Point) marking and VLAN-priority marking. An HP-UX IPQoS configuration
can be loaded into the kernel either by using ipqosadmin to load a valid configuration file, or
through user-applications that utilize the HP-UX IPQoS API included with the product.
An HP-UX IPQoS configuration contains user-supplied definitions of traffic classes (filters)
and traffic-handling instructions (policies) that are assigned to configured adapters.
Note the following general properties about filters, policies and adapters:
•The purpose of a filter is to identify a certain class of traffic (based on characteristics such
as transport port number, destination IP address, etc.) on a network interface.
•The purpose of a policy is to define what action to perform on a class of traffic (such as
•Adapters represent LAN devices on the system on which HP-UX IPQoS policies can be
enforced.
•A filter can be attached to multiple policies, but can only be attached to one policy per
adapter.
•A filter is meaningful only when it is associated with a policy. Likewise, a policy is only
meaningful when it is associated with an adapter and has one or more filters associated
with it.
•An adapter may or may not have policies attached to it. For adapters that do not have any
associated policies, no HP-UX IPQoS controls are performed on their traffic.
For general (non-API specific) information on HP-UX IPQoS refer to the HP-UX IPQoS A.01.00 Administrator’s Guide, which can be found online at:
http://www.docs.hp.com/en/netcom.html#IPQoS
Chapter 112
HP-UX IPQoS Architecture
Figure 1-1, illustrates a high-level overview of the HP-UX IPQoS architecture.
Figure 1-1Architectural Overview
Overview
Introduction
As shown in Figure 1-1, HP-UX IPQoS operates in both user space and kernel space.
Also shown in Figure 1-1, HP-UX IPQoS inserts a module between the IP and the DLPI
layers, into the STREAMS plumbed by ifconfig.
HP-UX IPQoS supports as many network adapters (up to 128) as are configured on the
system.
Chapter 113
Overview
Introduction
Introducing the HP-UX IPQoS API
The HP-UX IPQoS API allows programmers to write applications that can perform the
following tasks:
•manipulate the HP-UX IPQoS configuration
•traverse the HP-UX IPQoS configuration
•obtain HP-UX IPQoS statistics
The benefits that the HP-UX IPQoS API offers include the following:
— Allows applications to be written that dynamically modify the current configuration. For
example, you can write applications to add to existing configurations. (The HP-UX IPQoS
command-line administration utility, ipqosadmin, does not offer additive loads. Using
ipqosadmin, the only way to change a configuration is to perform a -load operation,
which replaces the configuration.)
— Allows applications to be written that provide alternative output formats than to what the
command-line administration utility, ipqosadmin, provides. For example. you can write
an application that produces configuration information in html output format. Refer to
/opt/ipqos/examples/htmldump for a programmatic example.
— If you already have existing IPQoS applications, you can leverage them by modifying
them to work with the HP-UX IPQoS API.
As will be discussed in more detail in subsequent sections of this guide, note that:
— The tasks accomplished by HP-UX IPQoS API operations are performed in sessions.
Every HP-UX IPQoS API session begins with the API collecting information about the
current configuration since this is required for all three types of tasks the HP-UX IPQoS
API performs. Sessions are initiated and include session types that determine what
operations are permitted. Sessions are completed either by committing (saving) or by
aborting (not saving) the changes made during the session.
— HP-UX IPQoS configurations consist of objects made up of three classes: filter, policy and
adapter. The objects exist in a list structure. Objects are attached to lists, and then the
lists can be traversed to read and modify the objects in a configuration.
— HP-UX IPQoS also maintains statistics, in the HP-UX IPQoS kernel module, that are
available to programmers. Statistics are maintained on both filters and policies.
IMPORTANT The manpages associated with the HP-UX IPQoS API complement this guide
and are necessary references to successfully use the HP-UX IPQoS API.
Chapter 114
Overview
Introduction
These manpages are: IpqosAPI (3c), IpqosSession (3c), IpqosAdapter (3c),
IpqosPolicy (3c), IpqosFilter (3c), IpqosOverlapFilter (3c) and IpqosStats (3c).
See “Manpages” on page 18, for more information on these man pages.
Chapter 115
Overview
HP-UX IPQoS API Overview
HP-UX IPQoS API Overview
This section describes general overview information for using the HP-UX IPQoS API.
Subsequent chapters in this guide provide more detailed usage information.
Programmatic Requirements
To use the HP-UX IPQoS API, the application needs to:
•have super-user (root) privileges
•include the header file: #include <netinet/ipqos.h>
•link to the shared library libipqos.sl
IMPORTANT HP-UX IPQoS supplies only the 32-bit version of the shared library. Thus,
applications must be 32-bit.
IMPORTANT To use the HP-UX IPQoS API, HP-UX IPQoS must be in one of the ENABLED
states (refer to the HP-UX IPQoS A.01.00 Administrator’s Guide for more
information on HP-UX IPQoS states of operation).
Structural Overview (How to Use the HP-UX IPQoS API)
The HP-UX IPQoS API is based on the usage of objects, lists and sessions.
Objects: Objects are pointers to opaque structures. There are three object types: filters,
policies and adapters (IpqosFilter, IpqosPolicy, IpqosAdapter respectively). Filter objects
and policy objects can be constructed (created, destroyed, attached, deleted and copied) by the
programmer. The list of adapter objects is a fixed list that is built by the HP-UX IPQoS API
during session initialization. Thus, adapter objects cannot be constructed by the programmer.
All three types of objects have attributes that can be accessed (by using “get” type functions).
Filter objects and policy objects can also be modified (using “set” type functions).
Lists: When policy or filter objects are part of an active configuration, they exist in a list. Each
adapter object has an attached policy list and each policy object has an attached filter list.
Adapter, policy and filter lists can be traversed by the programmer.
Chapter 116
Overview
HP-UX IPQoS API Overview
Sessions: Every application that uses the HP-UX IPQoS API must start a session. The
function used to start a session is IpqosInitSession(). One of the arguments of this
function specifies a session type. There are three types of sessions: IPQOS_SESSION_CONFIG
(used for active “set” functions), IPQOS_SESSION_READ (used for passive ”get” functions) and
IPQOS_SESSION_STATS (used for functions related to obtaining and resetting statistics).
Sessions must be terminated. There are two ways of terminating a session: committing
(saving) or aborting (quitting without saving), using IpqosCommitSession() and
IpqosAbortSession(), respectively.
See the relevant sections of Chapter 2, “Using the HP-UX IPQoS API,” on page 21, for more
information on how the HP-UX IPQoS API uses objects, lists and sessions.
NOTEThe data structures used in HP-UX IPQoS are opaque and need not be an
explicit concern of programmers using the API.
Functional Overview (What You Can Do Using the HP-UX IPQoS API)
There are several types of tasks you can accomplish using the HP-UX IPQoS API functions.
There are also several possible ways to group these tasks. The list below groups the tasks in a
way that serves the purpose of describing the tasks from a high-level perspective. For
example, some common tasks that can be performed on filter and policy objects are discussed
together in this guide, to minimize redundancy.
NOTEThe HP-UX IPQoS API manpages group the functions slightly differently,
which is appropriate since the purpose of the manpages is to provide detailed
reference information. The groupings used in the manpages work best for
detailed syntactical descriptions where redundancy is not a concern.
The following list provides broad groups of functional tasks that can be accomplished using
the HP-UX IPQoS API. For each grouping, the text indicates where more information can be
found in this guide, as well as the relevant manpages to refer to for more information.
•Session Management: Initiating and Terminating Sessions.
- In this guide: See “Using Sessions” on page 22, for more information.
- Relevant manpage: IpqosSession (3c)
•Resource Management: Creating/Destroying/Copying (Filter and Policy) Objects
- In this guide: See “Using Objects” on page 25, for more information.
Attributes are: name, speed, link type, physical address.
- In this guide: See “Adapter Objects” on page 33, for more information.
- Relevant manpage: IpqosAdapter (3c)
•Obtaining/Resetting Policy and Filter Statistics
- In this guide: See “Statistics” on page 34, for more information.
- Relevant manpage: IpqosStats (3c)
•Checking for Overlapping Filters
- In this guide: See “Filter Objects” on page 30, for more information.
- Relevant manpage:IpqosOverlapFilter (3c)
Manpages
This guide only serves as an overview to the HP-UX IPQoS API. To write applications, you
will need to reference each of the following manpages, as needed, for detailed descriptions and
syntactical information. The manpages associated with the HP-UX IPQoS API are as follows:
Chapter 118
Loading...
+ 41 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.