<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Parrot - sockaddr_in/sockaddr_in6 holder</title> <link rel="stylesheet" type="text/css" href="../../../resources/parrot.css" media="all"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div id="wrapper"> <div id="header"> <a href="http://www.parrot.org"> <img border=0 src="../../../resources/parrot_logo.png" id="logo" alt="parrot"> </a> </div> <!-- "header" --> <div id="divider"></div> <div id="mainbody"> <div id="breadcrumb"> <a href="../../../html/index.html">Home</a> » <a href="../../../html/pmc.html">PMCs</a> » sockaddr_in/sockaddr_in6 holder </div> <h1><a name="NAME" >NAME</a></h1> <p>src/pmc/sockaddr.pmc - sockaddr_in/sockaddr_in6 holder</p> <h1><a name="DESCRIPTION" >DESCRIPTION</a></h1> <p>The Sockaddr PMC holds a <code>sockaddr</code> struct and saves its length (to distinguish <code>sockaddr_in</code> and <code>sockaddr_in6</code>).</p> <h2><a name="Vtable_Functions" >Vtable Functions</a></h2> <p>These are the vtable functions for the Sockaddr class.</p> <dl> <dt><a name="void_init()" ><b><code>void init()</b></code></a></dt> Initializes the PMC. <dt><a name="void_destroy()" ><b><code>void destroy()</b></code></a></dt> Destroys the PMC and frees all allocated memory. <dt><a name="PMC_*clone()" ><b><code>PMC *clone()</b></code></a></dt> Creates a new Sockaddr PMC with the same contents and length as the current one. <dt><a name="INTVAL_get_bool()" ><b><code>INTVAL get_bool()</b></code></a></dt> Returns true if the Sockaddr is defined. <dt><a name="INTVAL_get_integer()" ><b><code>INTVAL get_integer()</b></code></a></dt> Returns the length of the sockaddr struct. <dt><a name="void_*get_pointer()" ><b><code>void *get_pointer()</b></code></a></dt> Returns a pointer to the <code>sockaddr_in</code> or <code>sockaddr_in6</code>. <dt><a name="STRING_*get_string()" ><b><code>STRING *get_string()</b></code></a></dt> Returns the string representation of this sockaddr by calling <code>getnameinfo(3)</code>. <dt><a name="INTVAL_get_integer_keyed_int(INTVAL_what)" ><b><code>INTVAL get_integer_keyed_int(INTVAL what)</b></code></a></dt> Returns family, type or protocol. Used for debugging.</dl> </div> <!-- "mainbody" --> <div id="divider"></div> <div id="footer"> Copyright © 2002-2011, Parrot Foundation. </div> </div> <!-- "wrapper" --> </body> </html>