123 lines
8.6 KiB
HTML
123 lines
8.6 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="concept" />
|
|
<meta name="DC.Title" content="QoS sendmsg() API extensions" />
|
|
<meta name="abstract" content="The sendmsg() function is used to send data, ancillary data, or a combination of these through a connected or unconnected socket." />
|
|
<meta name="description" content="The sendmsg() function is used to send data, ancillary data, or a combination of these through a connected or unconnected socket." />
|
|
<meta name="DC.Relation" scheme="URI" content="rzak8rsvp.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzak8diffserv.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzak8classes.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../apis/sendms.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rzak8apis" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>QoS sendmsg() API extensions</title>
|
|
</head>
|
|
<body id="rzak8apis"><a name="rzak8apis"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">QoS sendmsg() API extensions</h1>
|
|
<div><p>The sendmsg() function is used to send data, ancillary data, or
|
|
a combination of these through a connected or unconnected socket.</p>
|
|
<p>The sendmsg() API allows for quality of service (QoS) classification
|
|
data. QoS policies use this function to define a more granular classification
|
|
level for outgoing or incoming TCP/IP traffic. They specifically use ancillary
|
|
data types that apply to the IP layer. The message type used is <samp class="codeph">IP_QOS_CLASSIFICATION_DATA</samp>.
|
|
This ancillary data can be used by the application to define attributes for
|
|
traffic in a particular TCP connection. If the attributes passed by the application
|
|
match the attributes defined in the QoS policy, then the TCP traffic is restricted
|
|
by the policy. </p>
|
|
<p>Use the following information to initialize the <samp class="codeph">IP_QOS_CLASSIFICATION_DATA</samp> structure:</p>
|
|
<ul><li><samp class="codeph">ip_qos_version</samp>: Indicates version of the structure. This
|
|
must be filled in using the constant <em>IP_QOS_CURRENT_VERSION</em>.</li>
|
|
</ul>
|
|
<ul><li><samp class="codeph">ip_qos_classification_scope</samp>: Specify a connection level
|
|
scope (use constant <em>IP_QOS_CONNECTION_LEVEL</em>) or a message level scope
|
|
(constant <em>IP_QOS_MESSAGE_LEVEL</em>). <p>Connection level scope indicates
|
|
that the QoS service-level obtained through classification of this message
|
|
will remain in effect for all subsequent messages sent until the next sendmsg()
|
|
with QoS classification data. Message level scope indicates that the QoS service
|
|
level assigned will only be used for the message data included in this sendmsg()
|
|
call. Future data sent without QoS classification data will inherit the previous
|
|
connection level QoS assignment (from last Connection Level classification
|
|
through sendmsg() or from the original TCP connection classification during
|
|
connection establishment).</p>
|
|
</li>
|
|
<li><samp class="codeph">ip_qos_classification_type</samp>: This specification indicates
|
|
the type of classification data being passed. An application can chose to
|
|
pass an application defined token, an application specified priority, or both
|
|
a token and a priority. If the latter option is selected the two selected,
|
|
classification types must be logically 'OR'ed. The following types can be
|
|
specified: <ul><li>Application defined token classification. A single type must be specified;
|
|
if more than one is specified, the results are unpredictable.<ul><li><samp class="codeph">IP_SET_QOSLEVEL_W_APPL_TOKEN_ASCII</samp>: This indicates that
|
|
the classification data is a character string in ASCII format. When this option
|
|
is specified, the application token needs to be passed in the ip_qos_appl_token
|
|
field. <div class="note"><span class="notetitle">Note:</span> If the application needs to pass numeric values for the classification
|
|
data it must first convert them to printable ASCII format. Also note that
|
|
the string specified can be in mixed case and will be used in the exact format
|
|
specified for comparison purposes.</div>
|
|
</li>
|
|
<li><samp class="codeph">IP_SET_QOSLEVEL_W_APPL_TOKEN_EBCDIC</samp>: Same as above except
|
|
that the string is in EBCDIC format. <div class="note"><span class="notetitle">Note:</span> The <samp class="codeph">IP_SET_QOSLEVEL_W_APPL_TOKEN_ASCII</samp> does
|
|
perform slightly better than this option as the application data specified
|
|
in the policy is saved in ASCII format inside of the TCP/IP stack, thereby
|
|
eliminating the need to translate the application defined token on every sendmsg()
|
|
request.</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li>Application defined priority classification. A single type must be specified;
|
|
if multiple priority types are specified, the results are unpredictable.<ul><li><samp class="codeph">IP_SET_QOSLEVEL_EXPIDITED</samp>: Indicates that Expedited priority
|
|
is requested</li>
|
|
<li><samp class="codeph">IP_SET_QOSLEVEL_HIGH</samp>: Indicates that High priority is
|
|
requested</li>
|
|
<li><samp class="codeph">IP_SET_QOSLEVEL_MEDIUM</samp>: Indicates that Medium priority
|
|
is requested</li>
|
|
<li><samp class="codeph">IP_SET_QOSLEVEL_LOW</samp>: Indicates that Low priority is requested</li>
|
|
<li><samp class="codeph">IP_SET_QOSLEVEL_BEST_EFFORT</samp>: Indicates that Best Effort
|
|
priority is requested</li>
|
|
</ul>
|
|
</li>
|
|
<li><samp class="codeph">ip_qos_appl_token_len</samp>: length of the ip_qos_appl_token
|
|
specified.</li>
|
|
<li><samp class="codeph">ip_qos_appl_token</samp>: This "virtual field" immediately follows
|
|
the ip_qos_classification_type field. The application classification token
|
|
string in either ASCII or EBCDIC format depending on which flavor of IP_SET_QOSLEVEL_W_APPL_TOKEN_xxxx
|
|
was specified for the classification type. This field is only referenced when
|
|
an application defined token type is specified. Note that this string must
|
|
not exceed 128 bytes. If a larger size is specified, only the first 128 bytes
|
|
will be used. Also note that the length of the string is determined based
|
|
on the value specified for cmsg_len (cmsg_len - sizeof(cmsghdr) - sizeof(ip_qos_classification_data)).
|
|
This calculated length must not include any null terminating characters.</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzak8rsvp.htm" title="You can read this topic to learn about protocols, APIs, and requirements for a router that is enabled for the ReSerVation Protocol (RSVP). The current quality of service (QoS) APIs include the RAPI API, the qtoq socket API, the sendmsg() API, and the monitor APIs.">QoS APIs</a></div>
|
|
</div>
|
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
|
<div><a href="rzak8diffserv.htm" title="This is the first type of outbound bandwidth policy you can create on your server. Differentiated service divides your traffic into classes. To carry out a differentiated service policy, you need to determine how you want to classify your network traffic and how to handle the different classes.">Differentiated service</a></div>
|
|
<div><a href="rzak8classes.htm" title="Differentiated service identifies traffic as classes. The most common classes are defined using client IP addresses, application ports, server types, protocols, local IP addresses, and schedules. All traffic that conforms to the same class is treated equally.">Prioritized classes: How to classify network traffic</a></div>
|
|
</div>
|
|
<div class="relref"><strong>Related reference</strong><br />
|
|
<div><a href="../apis/sendms.htm">Sendmsg() API- Send a message over a socket</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |