Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 810b0d4df5d15a7b0a053293854558b7 > files > 78

ne7ssh-doc-1.3.2-15.fc18.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ne7ssh.kdevelop: ne7ssh_transport Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>ne7ssh_transport Class Reference</h1><!-- doxytag: class="ne7ssh_transport" --><code>#include &lt;<a class="el" href="ne7ssh__transport_8h_source.html">ne7ssh_transport.h</a>&gt;</code>
<p>
<div class="dynheader">
Collaboration diagram for ne7ssh_transport:</div>
<div class="dynsection">
<p><center><img src="classne7ssh__transport__coll__graph.png" border="0" usemap="#ne7ssh__transport__coll__map" alt="Collaboration graph"></center>
<map name="ne7ssh__transport__coll__map">
<area shape="rect" href="classne7ssh__session.html" title="ne7ssh_session" alt="" coords="11,103,133,129"><area shape="rect" href="classne7ssh__crypt.html" title="ne7ssh_crypt" alt="" coords="19,199,125,225"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classne7ssh__transport-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classne7ssh__transport.html#bc335c4d181ee23ef6f6c819d41a9533">ne7ssh_transport</a> (<a class="el" href="classne7ssh__session.html">ne7ssh_session</a> *_session)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classne7ssh__transport.html#c9b896ad9d855fc818b0b5350f47ccf7">~ne7ssh_transport</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">SOCKET&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classne7ssh__transport.html#122602c51b558d07920bbf3f19c53e83">establish</a> (const char *host, uint32 port, int timeout=0)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classne7ssh__transport.html#e68ee5d295430f648424b5ba359d9503">receive</a> (Botan::SecureVector&lt; Botan::byte &gt; &amp;buffer, bool append=false)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classne7ssh__transport.html#e88fef35a5b4b0960ccee3142e486eb6">send</a> (Botan::SecureVector&lt; Botan::byte &gt; &amp;buffer)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classne7ssh__transport.html#c62051d1b6aeeb65867ffd1c1578938f">sendPacket</a> (Botan::SecureVector&lt; Botan::byte &gt; &amp;buffer)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">short&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classne7ssh__transport.html#8d502d0e554e92d9536f8be2f9e07fd0">waitForPacket</a> (Botan::byte cmd, bool bufferOnly=false)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classne7ssh__transport.html#a602061a2091786b16527534aa8bb99a">getPacket</a> (Botan::SecureVector&lt; Botan::byte &gt; &amp;result)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classne7ssh__transport.html#c5e49ab89bc98e9da758a194b7870d57">haveData</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classne7ssh__transport.html#750400736781c5d40a68a47f95f3af00">NoBlock</a> (SOCKET socket, bool on)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classne7ssh__transport.html#e61c53b2f743afecec25cfe7fffc3799">wait</a> (SOCKET socket, int rw, int timeout=-1)</td></tr>

<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3568450ab744f0e80e3cca6166d63c01"></a><!-- doxytag: member="ne7ssh_transport::seq" ref="3568450ab744f0e80e3cca6166d63c01" args="" -->
uint32&nbsp;</td><td class="memItemRight" valign="bottom"><b>seq</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="162af1d78195986b8709a0e3064c8cb7"></a><!-- doxytag: member="ne7ssh_transport::rSeq" ref="162af1d78195986b8709a0e3064c8cb7" args="" -->
uint32&nbsp;</td><td class="memItemRight" valign="bottom"><b>rSeq</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="45a0187a431567218ac9dd757dad06d0"></a><!-- doxytag: member="ne7ssh_transport::session" ref="45a0187a431567218ac9dd757dad06d0" args="" -->
const <a class="el" href="classne7ssh__session.html">ne7ssh_session</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>session</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d2185ce2e848d95dd17f2ddd84497367"></a><!-- doxytag: member="ne7ssh_transport::sock" ref="d2185ce2e848d95dd17f2ddd84497367" args="" -->
SOCKET&nbsp;</td><td class="memItemRight" valign="bottom"><b>sock</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec3da945e8c056468188330f5e3a741d"></a><!-- doxytag: member="ne7ssh_transport::in" ref="ec3da945e8c056468188330f5e3a741d" args="" -->
Botan::SecureVector&lt; Botan::byte &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>in</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4e74acceb79e5e36eed36580eeab21d4"></a><!-- doxytag: member="ne7ssh_transport::inBuffer" ref="4e74acceb79e5e36eed36580eeab21d4" args="" -->
Botan::SecureVector&lt; Botan::byte &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>inBuffer</b></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Andrew Useckas </dd></dl>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="bc335c4d181ee23ef6f6c819d41a9533"></a><!-- doxytag: member="ne7ssh_transport::ne7ssh_transport" ref="bc335c4d181ee23ef6f6c819d41a9533" args="(ne7ssh_session *_session)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ne7ssh_transport::ne7ssh_transport           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classne7ssh__session.html">ne7ssh_session</a> *&nbsp;</td>
          <td class="paramname"> <em>_session</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<a class="el" href="classne7ssh__transport.html">ne7ssh_transport</a> class constructor. <p>
Transport class handles all socket communications for the <a class="el" href="classne7ssh.html">ne7ssh</a> library. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>_session</em>&nbsp;</td><td>Pointer to <a class="el" href="classne7ssh__session.html">ne7ssh_session</a> instance. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="c9b896ad9d855fc818b0b5350f47ccf7"></a><!-- doxytag: member="ne7ssh_transport::~ne7ssh_transport" ref="c9b896ad9d855fc818b0b5350f47ccf7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ne7ssh_transport::~ne7ssh_transport           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<a class="el" href="classne7ssh__transport.html">ne7ssh_transport</a> class destructor. 
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="122602c51b558d07920bbf3f19c53e83"></a><!-- doxytag: member="ne7ssh_transport::establish" ref="122602c51b558d07920bbf3f19c53e83" args="(const char *host, uint32 port, int timeout=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SOCKET ne7ssh_transport::establish           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32&nbsp;</td>
          <td class="paramname"> <em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Establishes connection to a remote host. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>host</em>&nbsp;</td><td>Host name or IP. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>port</em>&nbsp;</td><td>Port. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>Timeout for the establish procedure, in seconds. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Socket number or -1 on failure. </dd></dl>

<p>References <a class="el" href="ne7ssh_8cpp_source.html#l00721">ne7ssh::errors()</a>, <a class="el" href="ne7ssh__transport_8cpp_source.html#l00129">NoBlock()</a>, and <a class="el" href="ne7ssh__error_8cpp_source.html#l00042">Ne7sshError::push()</a>.</p>

<p>Referenced by <a class="el" href="ne7ssh__connection_8cpp_source.html#l00075">ne7ssh_connection::connectWithKey()</a>, and <a class="el" href="ne7ssh__connection_8cpp_source.html#l00044">ne7ssh_connection::connectWithPassword()</a>.</p>

</div>
</div><p>
<a class="anchor" name="a602061a2091786b16527534aa8bb99a"></a><!-- doxytag: member="ne7ssh_transport::getPacket" ref="a602061a2091786b16527534aa8bb99a" args="(Botan::SecureVector&lt; Botan::byte &gt; &amp;result)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32 ne7ssh_transport::getPacket           </td>
          <td>(</td>
          <td class="paramtype">Botan::SecureVector&lt; Botan::byte &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>result</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets the payload section from an SSH packet received by <a class="el" href="classne7ssh__transport.html#8d502d0e554e92d9536f8be2f9e07fd0">waitForPacket()</a> function. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>The payload will be stored here. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The SSH packet passing length. </dd></dl>

<p>References <a class="el" href="crypt_8cpp_source.html#l00762">ne7ssh_crypt::decompressData()</a>, <a class="el" href="crypt_8h_source.html#l00201">ne7ssh_crypt::getMacInLen()</a>, and <a class="el" href="crypt_8h_source.html#l00177">ne7ssh_crypt::isInited()</a>.</p>

<p>Referenced by <a class="el" href="ne7ssh__connection_8cpp_source.html#l00167">ne7ssh_connection::authWithKey()</a>, <a class="el" href="ne7ssh__connection_8cpp_source.html#l00124">ne7ssh_connection::authWithPassword()</a>, <a class="el" href="ne7ssh__channel_8cpp_source.html#l00063">ne7ssh_channel::handleChannelConfirm()</a>, <a class="el" href="ne7ssh__kex_8cpp_source.html#l00130">ne7ssh_kex::handleInit()</a>, <a class="el" href="ne7ssh__kex_8cpp_source.html#l00242">ne7ssh_kex::handleKexDHReply()</a>, <a class="el" href="ne7ssh__channel_8cpp_source.html#l00301">ne7ssh_channel::receive()</a>, <a class="el" href="ne7ssh__sftp_8cpp_source.html#l00162">Ne7sshSftp::receiveUntil()</a>, <a class="el" href="ne7ssh__sftp_8cpp_source.html#l00196">Ne7sshSftp::receiveWhile()</a>, and <a class="el" href="ne7ssh__sftp_8cpp_source.html#l00147">Ne7sshSftp::receiveWindowAdjust()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c5e49ab89bc98e9da758a194b7870d57"></a><!-- doxytag: member="ne7ssh_transport::haveData" ref="c5e49ab89bc98e9da758a194b7870d57" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ne7ssh_transport::haveData           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Checks to see if there is more data to be read from the socket. <dl class="return" compact><dt><b>Returns:</b></dt><dd>True if there is data to be read, otherwise false is returned. </dd></dl>

<p>References <a class="el" href="ne7ssh__transport_8cpp_source.html#l00158">wait()</a>.</p>

</div>
</div><p>
<a class="anchor" name="750400736781c5d40a68a47f95f3af00"></a><!-- doxytag: member="ne7ssh_transport::NoBlock" ref="750400736781c5d40a68a47f95f3af00" args="(SOCKET socket, bool on)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ne7ssh_transport::NoBlock           </td>
          <td>(</td>
          <td class="paramtype">SOCKET&nbsp;</td>
          <td class="paramname"> <em>socket</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>on</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Switches socket's NonBlocking option on or off. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>socket</em>&nbsp;</td><td>Socket number. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>on</em>&nbsp;</td><td>If set to true, NonBlocking option will be turned on, and vice versa. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if options have been successfuly set, otherwise false is returned. </dd></dl>

<p>References <a class="el" href="ne7ssh_8cpp_source.html#l00721">ne7ssh::errors()</a>, and <a class="el" href="ne7ssh__error_8cpp_source.html#l00042">Ne7sshError::push()</a>.</p>

<p>Referenced by <a class="el" href="ne7ssh__transport_8cpp_source.html#l00059">establish()</a>.</p>

</div>
</div><p>
<a class="anchor" name="e68ee5d295430f648424b5ba359d9503"></a><!-- doxytag: member="ne7ssh_transport::receive" ref="e68ee5d295430f648424b5ba359d9503" args="(Botan::SecureVector&lt; Botan::byte &gt; &amp;buffer, bool append=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ne7ssh_transport::receive           </td>
          <td>(</td>
          <td class="paramtype">Botan::SecureVector&lt; Botan::byte &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>append</em> = <code>false</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Reads data from the socket. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buffer</em>&nbsp;</td><td>The data will be placed here. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>append</em>&nbsp;</td><td>If set to true, received data will be appended to the buffer, instead of overwriting it. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if data successfuly read, otherwise false is returned. </dd></dl>

<p>References <a class="el" href="ne7ssh_8cpp_source.html#l00721">ne7ssh::errors()</a>, <a class="el" href="ne7ssh__error_8cpp_source.html#l00042">Ne7sshError::push()</a>, and <a class="el" href="ne7ssh__transport_8cpp_source.html#l00158">wait()</a>.</p>

<p>Referenced by <a class="el" href="ne7ssh__connection_8cpp_source.html#l00253">ne7ssh_connection::checkRemoteVersion()</a>, and <a class="el" href="ne7ssh__transport_8cpp_source.html#l00301">waitForPacket()</a>.</p>

</div>
</div><p>
<a class="anchor" name="e88fef35a5b4b0960ccee3142e486eb6"></a><!-- doxytag: member="ne7ssh_transport::send" ref="e88fef35a5b4b0960ccee3142e486eb6" args="(Botan::SecureVector&lt; Botan::byte &gt; &amp;buffer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ne7ssh_transport::send           </td>
          <td>(</td>
          <td class="paramtype">Botan::SecureVector&lt; Botan::byte &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>buffer</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Writes a buffer to the socket. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buffer</em>&nbsp;</td><td>Data to be written to the socket. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if data successful sent, otherwise false is returned. </dd></dl>

<p>References <a class="el" href="ne7ssh_8cpp_source.html#l00721">ne7ssh::errors()</a>, <a class="el" href="ne7ssh__error_8cpp_source.html#l00042">Ne7sshError::push()</a>, and <a class="el" href="ne7ssh__transport_8cpp_source.html#l00158">wait()</a>.</p>

<p>Referenced by <a class="el" href="ne7ssh__connection_8cpp_source.html#l00275">ne7ssh_connection::sendLocalVersion()</a>, and <a class="el" href="ne7ssh__transport_8cpp_source.html#l00255">sendPacket()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c62051d1b6aeeb65867ffd1c1578938f"></a><!-- doxytag: member="ne7ssh_transport::sendPacket" ref="c62051d1b6aeeb65867ffd1c1578938f" args="(Botan::SecureVector&lt; Botan::byte &gt; &amp;buffer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ne7ssh_transport::sendPacket           </td>
          <td>(</td>
          <td class="paramtype">Botan::SecureVector&lt; Botan::byte &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>buffer</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Assembles an SSH packet, as specified in SSH standards and passes the buffer to <a class="el" href="classne7ssh__transport.html#e88fef35a5b4b0960ccee3142e486eb6">send()</a> function. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buffer</em>&nbsp;</td><td>Payload to be sent. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if send successful, otherwise false is returned. </dd></dl>

<p>References <a class="el" href="ne7ssh__string_8cpp_source.html#l00100">ne7ssh_string::addBytes()</a>, <a class="el" href="ne7ssh__string_8cpp_source.html#l00110">ne7ssh_string::addChar()</a>, <a class="el" href="ne7ssh__string_8cpp_source.html#l00115">ne7ssh_string::addInt()</a>, <a class="el" href="ne7ssh__string_8cpp_source.html#l00105">ne7ssh_string::addVector()</a>, <a class="el" href="crypt_8cpp_source.html#l00716">ne7ssh_crypt::encryptPacket()</a>, <a class="el" href="ne7ssh_8cpp_source.html#l00721">ne7ssh::errors()</a>, <a class="el" href="crypt_8h_source.html#l00183">ne7ssh_crypt::getEncryptBlock()</a>, <a class="el" href="crypt_8h_source.html#l00177">ne7ssh_crypt::isInited()</a>, <a class="el" href="ne7ssh__error_8cpp_source.html#l00042">Ne7sshError::push()</a>, <a class="el" href="ne7ssh__transport_8cpp_source.html#l00195">send()</a>, and <a class="el" href="ne7ssh__string_8h_source.html#l00129">ne7ssh_string::value()</a>.</p>

<p>Referenced by <a class="el" href="ne7ssh__connection_8cpp_source.html#l00167">ne7ssh_connection::authWithKey()</a>, <a class="el" href="ne7ssh__connection_8cpp_source.html#l00124">ne7ssh_connection::authWithPassword()</a>, <a class="el" href="ne7ssh__channel_8cpp_source.html#l00249">ne7ssh_channel::execCmd()</a>, <a class="el" href="ne7ssh__channel_8cpp_source.html#l00274">ne7ssh_channel::getShell()</a>, <a class="el" href="ne7ssh__sftp_8cpp_source.html#l00045">Ne7sshSftp::init()</a>, <a class="el" href="ne7ssh__channel_8cpp_source.html#l00034">ne7ssh_channel::open()</a>, <a class="el" href="ne7ssh__connection_8cpp_source.html#l00108">ne7ssh_connection::requestService()</a>, <a class="el" href="ne7ssh__channel_8cpp_source.html#l00171">ne7ssh_channel::sendAdjustWindow()</a>, <a class="el" href="ne7ssh__channel_8cpp_source.html#l00421">ne7ssh_channel::sendAll()</a>, <a class="el" href="ne7ssh__channel_8cpp_source.html#l00139">ne7ssh_channel::sendClose()</a>, <a class="el" href="ne7ssh__channel_8cpp_source.html#l00155">ne7ssh_channel::sendEof()</a>, <a class="el" href="ne7ssh__kex_8cpp_source.html#l00107">ne7ssh_kex::sendInit()</a>, <a class="el" href="ne7ssh__kex_8cpp_source.html#l00217">ne7ssh_kex::sendKexDHInit()</a>, and <a class="el" href="ne7ssh__kex_8cpp_source.html#l00276">ne7ssh_kex::sendKexNewKeys()</a>.</p>

</div>
</div><p>
<a class="anchor" name="e61c53b2f743afecec25cfe7fffc3799"></a><!-- doxytag: member="ne7ssh_transport::wait" ref="e61c53b2f743afecec25cfe7fffc3799" args="(SOCKET socket, int rw, int timeout=&#45;1)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ne7ssh_transport::wait           </td>
          <td>(</td>
          <td class="paramtype">SOCKET&nbsp;</td>
          <td class="paramname"> <em>socket</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>rw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code>-1</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Waits for activity on a socket. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>socket</em>&nbsp;</td><td>Socket number. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>rw</em>&nbsp;</td><td>If set to true, checks if process can write to the socket, otherwise checks if there is data to be read from the socket. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>Desired timeout. By default the function will block until socket is ready for reading/writting. If set to '0', the function will return right away. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if socket is ready for reading/writting, otherwise false is returned. </dd></dl>

<p>Referenced by <a class="el" href="ne7ssh__transport_8cpp_source.html#l00153">haveData()</a>, <a class="el" href="ne7ssh__transport_8cpp_source.html#l00219">receive()</a>, and <a class="el" href="ne7ssh__transport_8cpp_source.html#l00195">send()</a>.</p>

</div>
</div><p>
<a class="anchor" name="8d502d0e554e92d9536f8be2f9e07fd0"></a><!-- doxytag: member="ne7ssh_transport::waitForPacket" ref="8d502d0e554e92d9536f8be2f9e07fd0" args="(Botan::byte cmd, bool bufferOnly=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">short ne7ssh_transport::waitForPacket           </td>
          <td>(</td>
          <td class="paramtype">Botan::byte&nbsp;</td>
          <td class="paramname"> <em>cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>bufferOnly</em> = <code>false</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Waits until specified type of packet is received. <p>
If cmd is 0, waits for the first available packet of any kind. <p>
Once the desired packet is received, it is decrypted / decommpressed, the hMac is checked, and dropped into inBuffer class variable. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cmd</em>&nbsp;</td><td>SSH2 packet to wait for. If 0, first available packet will be read into inBuffer class variable. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bufferOnly</em>&nbsp;</td><td>Does not wait to receive a new packet, only checks existing receive buffer for unprocessed packets. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>1 if desired packet is received, 0 if there another packet is received, or -1 if HMAC checking is enabled, and remote and local HMACs do not match. </dd></dl>

<p>References <a class="el" href="crypt_8cpp_source.html#l00773">ne7ssh_crypt::computeMac()</a>, <a class="el" href="crypt_8cpp_source.html#l00737">ne7ssh_crypt::decryptPacket()</a>, <a class="el" href="ne7ssh_8cpp_source.html#l00721">ne7ssh::errors()</a>, <a class="el" href="crypt_8h_source.html#l00189">ne7ssh_crypt::getDecryptBlock()</a>, <a class="el" href="crypt_8h_source.html#l00201">ne7ssh_crypt::getMacInLen()</a>, <a class="el" href="crypt_8h_source.html#l00177">ne7ssh_crypt::isInited()</a>, <a class="el" href="ne7ssh__error_8cpp_source.html#l00042">Ne7sshError::push()</a>, and <a class="el" href="ne7ssh__transport_8cpp_source.html#l00219">receive()</a>.</p>

<p>Referenced by <a class="el" href="ne7ssh__connection_8cpp_source.html#l00167">ne7ssh_connection::authWithKey()</a>, <a class="el" href="ne7ssh__connection_8cpp_source.html#l00124">ne7ssh_connection::authWithPassword()</a>, <a class="el" href="ne7ssh__channel_8cpp_source.html#l00034">ne7ssh_channel::open()</a>, <a class="el" href="ne7ssh__channel_8cpp_source.html#l00301">ne7ssh_channel::receive()</a>, <a class="el" href="ne7ssh__sftp_8cpp_source.html#l00162">Ne7sshSftp::receiveUntil()</a>, <a class="el" href="ne7ssh__sftp_8cpp_source.html#l00196">Ne7sshSftp::receiveWhile()</a>, <a class="el" href="ne7ssh__sftp_8cpp_source.html#l00147">Ne7sshSftp::receiveWindowAdjust()</a>, <a class="el" href="ne7ssh__connection_8cpp_source.html#l00108">ne7ssh_connection::requestService()</a>, <a class="el" href="ne7ssh__kex_8cpp_source.html#l00107">ne7ssh_kex::sendInit()</a>, <a class="el" href="ne7ssh__kex_8cpp_source.html#l00217">ne7ssh_kex::sendKexDHInit()</a>, and <a class="el" href="ne7ssh__kex_8cpp_source.html#l00276">ne7ssh_kex::sendKexNewKeys()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="ne7ssh__transport_8h_source.html">ne7ssh_transport.h</a><li>ne7ssh_transport.cpp</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 5 14:10:43 2009 for ne7ssh.kdevelop by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>