Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 8e412c6ae4e9dc4ce4e111b93c4a8d4a > files > 232

libupnp-devel-1.6.6-2mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>
   <TITLE>EXPORT_SPEC int UpnpInit</TITLE>
   <META NAME="GENERATOR" CONTENT="DOC++ 3.4.10">
</HEAD>
<BODY BGCOLOR="#ffffff">

<H2>EXPORT_SPEC int <A HREF="#DOC.DOCU">UpnpInit</A></H2><H2>( IN const char* HostIP,<BR>&nbsp;  IN unsigned short DestPort )</H2><BLOCKQUOTE>Initializes the Linux SDK for UPnP Devices.</BLOCKQUOTE>

<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>Initializes the Linux SDK for UPnP Devices. This function must be called
before any other API function can be called.  It should be called
only once.  Subsequent calls to this API return a <TT>UPNP_E_INIT</TT>
error code.

<P>Optionally, the application can specify a host IP address (in the
case of a multi-homed configuration) and a port number to use for
all UPnP operations.  Since a port number can be used only by one
process, multiple processes using the SDK must specify
different port numbers.

<P>If unspecified, the SDK will use the first adapter's IP address 
and an arbitrary port.

<P>This call is synchronous.

<P></BLOCKQUOTE>
<DL><DT><DT><B>Parameters:</B><DD><B>HostIP</B> -   The host IP address to use, in 
string format, for example "192.168.0.1", 
or <TT>NULL</TT> to use the first adapter's 
IP address. 
<BR><B>DestPort</B> -   The destination port number to use.  0 
will pick an arbitrary free port. <BR><DT><B>Returns:</B><DD>  [int] An integer representing one of the following:
<UL>
<LI> <TT>UPNP_E_SUCCESS</TT>: The operation completed successfully.
<LI> <TT>UPNP_E_OUTOF_MEMORY</TT>: Insufficient resources exist 
to initialize the SDK.
<LI> <TT>UPNP_E_INIT</TT>: The SDK is already initialized. 
<LI> <TT>UPNP_E_INIT_FAILED</TT>: The SDK initialization 
failed for an unknown reason.
<LI> <TT>UPNP_E_SOCKET_BIND</TT>: An error occurred binding a socket.
<LI> <TT>UPNP_E_LISTEN</TT>: An error occurred listening to a socket.
<LI> <TT>UPNP_E_OUTOF_SOCKET</TT>: An error ocurred creating a socket.
<LI> <TT>UPNP_E_INTERNAL_ERROR</TT>: An internal error ocurred.
</UL> 
<BR><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I></P><HR>
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>