slpfindsrvtypes.html
来自「SLP协议在linux下的实现。此版本为1.2.1版。官方网站为www.open」· HTML 代码 · 共 193 行
HTML
193 行
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"><html><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD Caldera Systems OpenLinux [en] (X11; U; Linux 2.4.2 i686) [Netscape]"> <title>OpenSLP Programmers Guide - SLPFindSrvTypes()</title></head><body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000"><h2>SLPFindSrvTypes</h2><hr WIDTH="100%"><h3>Declaration</h3><tt>#include <slp.h></tt><p><tt><a href="SLPError.html">SLPError</a> SLPFindSrvTypes( <a href="SLPTypes.html#SLPHandle">SLPHandle</a><a href="#hslp">hslp</a>,</tt><br><tt> const char* <a href="#namingauthority">namingauthority</a>,</tt><br><tt> const char* <a href="#scopelist">scopelist</a>,</tt><br><tt> <a href="SLPSrvTypeCallback.html">SLPSrvTypeCallback</a> <a href="#callback">callback</a>,</tt><br><tt> void* <a href="#cookie">cookie</a>)</tt><h3>Description</h3>The <tt>SLPFindSrvType()</tt> function issues an SLP service type requestfor service types in the scopes indicated by the <tt>scopelist</tt>. Theresults are returned through the <tt>callback</tt> parameter. The servicetypes are independent of language locale, but only for services registeredin one of scopes and for the indicated naming authority.<p>If the <tt>namingauthority</tt> is "*", then results are returned forall naming authorities. If the naming authority is the empty string, i.e."", then the default naming authority, "IANA", is used. "IANA" is not avalid naming authority name, and it is a <tt><a href="SLPError.html#SLP_PARAMETER_BAD">SLP_PARAMETER_BAD</a></tt>error to include it explicitly.<p>The service type names are returned with the naming authority intact.If the naming authority is the default (i.e. empty string) then it is omitted,as is the separating ".". Service type names from URLs of the service:scheme are returned with the "service:" prefix intact.<h3>Parameters</h3><table BORDER CELLPADDING=5 NOSAVE ><tr VALIGN=TOP NOSAVE><td NOSAVE><a NAME="hslp"></a><tt>hslp</tt></td><td NOSAVE>The language specific <tt>SLPHandle</tt> on which to registerthe service.</td></tr><tr VALIGN=TOP NOSAVE><td NOSAVE><a NAME="namingauthority"></a><tt>namingauthority</tt></td><td NOSAVE>The naming authorities to search. Use "*" for all namingauthorities and the empty string, "", for the default naming authority(IANA). See <a href="Syntax.html#Service Type">Syntax</a> for moreinformation on naming authorities.</td></tr><tr VALIGN=TOP NOSAVE><td><a NAME="scopelist"></a><tt>scopelist</tt></td><td NOSAVE>A pointer to a comma separated list of scope names. <i>Maybe the empty string</i> if you wish to use scopes this machine is configuredfor. May not be NULL.</td></tr><tr VALIGN=TOP NOSAVE><td><a NAME="callback"></a><tt>callback</tt></td><td NOSAVE>The address of an <tt><a href="SLPSrvTypeCallback.html">SLPSrvTypeCallback</a></tt>function that will be called to report the operation completion status. May not be NULL. See <a href="Callbacks.html">Callbacks</a> for more informationon how callbacks are used by the SLPAPI.</td></tr><tr VALIGN=TOP NOSAVE><td NOSAVE><a NAME="cookie"></a><tt>cookie</tt></td><td NOSAVE>Pointer to memory that gets passed to the callback code. May be NULL.</td></tr></table><h3>Returns</h3><table BORDER NOSAVE ><tr NOSAVE><td NOSAVE>SLP_OK</td><td>Indicates that the no error occurred during the operation.</td></tr><tr><td>SLP_PARSE_ERROR</td><td>The SLP message was rejected by a remote SLP agent. The API returnsthis error only when no information was retrieved, and at least one SAor DA indicated a protocol error. The data supplied through the API maybe malformed or a may have been damaged in transit.</td></tr><tr><td>SLP_AUTHENTICATION_ABSENT</td><td>If the SLP framework supports authentication, this error arises whenthe UA or SA failed to send an authenticator for requests or registrations.</td></tr><tr><td>SLP_AUTHENTICATION_FAILED</td><td>If the SLP framework supports authentication, this error arises whena authentication on an SLP message failed.</td></tr><tr><td>SLP_NETWORK_TIMED_OUT</td><td>When no reply can be obtained in the time specified by the configuredtimeout interval for a unicast request, this error is returned. Inother words, slpd is running, but something is wrong with it</td></tr><tr><td>SLP_NETWORK_INIT_FAILED</td><td>If the network cannot initialize properly, this error is returned. </td></tr><tr><td>SLP_MEMORY_ALLOC_FAILED </td><td>Out of memory error</td></tr><tr><td>SLP_PARAMETER_BAD</td><td>If a parameter passed into a function is bad, this error is returned.</td></tr><tr><td>SLP_NETWORK_ERROR</td><td>The failure of networking during normal operations causes this errorto be returned. In OpenSLP, this is the error you'll get if an underlyingsocket() call failed.</td></tr><tr><td>SLP_INTERNAL_SYSTEM_ERROR</td><td>A basic failure of the API causes this error to be returned. This occurswhen a system call or library fails. The operation could not recover.</td></tr><tr><td>SLP_HANDLE_IN_USE</td><td>Callback functions are not permitted to recursively call into the APIon the same SLPHandle, either directly or indirectly. If an attempt ismade to do so, this error is returned from the called API function.</td></tr></table><p>If no service types can be found, no error is returned. However,no calls (other than the SLP_LAST_CALL) will be made to the SLPSrvTypesCallback. Be aware, especially if the call is async, of error codes that may be passedto the <tt>SLPSrvTypeCallback</tt> callback function.<br> <h3>Status</h3><table CELLPADDING=5 NOSAVE ><tr VALIGN=TOP NOSAVE><td NOSAVE>OpenSLP 0.7.4</td><td NOSAVE>Fully implemented as specified by RFC 2614</td></tr></table><h3>See Also</h3><a href="SLPSrvTypeCallback.html">SLPSrvTypeCallback</a>, <a href="Syntax.html">Syntax</a>,<a href="Callbacks.html">Callbacks</a></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?