Sophie

Sophie

distrib > Fedora > 17 > i386 > by-pkgid > a5792cbc6dcdf6bdde626c0724c2c85a > files > 36

globus-ftp-client-doc-7.4-1.fc17.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<!-- THIS FILE IS AUTOMATICALLY GENERATED FROM THE GLOBUS SOURCE CODE
     DO NOT MODIFY.
-->
<title>Globus Reference Manual</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- Generated by Doxygen 1.8.1.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__globus__ftp__client__debug__plugin.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Debugging Plugin</div>  </div>
<div class="ingroups"><a class="el" href="group__globus__ftp__client__plugins.html">Plugins</a></div></div><!--header-->
<div class="contents">
<div class="dynheader">
Collaboration diagram for Debugging Plugin:</div>
<div class="dyncontent">
<center><table><tr><td><img src="group__globus__ftp__client__debug__plugin.png" border="0" alt="" usemap="#group____globus____ftp____client____debug____plugin"/>
<map name="group____globus____ftp____client____debug____plugin" id="group____globus____ftp____client____debug____plugin">
<area shape="rect" id="node1" href="group__globus__ftp__client__plugins.html" title="Plugin API." alt="" coords="6,5,71,32"/></map>
</td></tr></table></center>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gac08270f82c3709f701f7772b9ab16c33"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__globus__ftp__client__debug__plugin.html#gac08270f82c3709f701f7772b9ab16c33">GLOBUS_FTP_CLIENT_DEBUG_PLUGIN_MODULE</a>&#160;&#160;&#160;(&amp;globus_i_ftp_client_debug_plugin_module)</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga0e9a937acc1cf4b22a67206722e287da"><td class="memItemLeft" align="right" valign="top">globus_result_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__globus__ftp__client__debug__plugin.html#ga0e9a937acc1cf4b22a67206722e287da">globus_ftp_client_debug_plugin_init</a> (<a class="el" href="group__globus__ftp__client__plugins.html#gafd650bbeee4bf50b94275d89352697dc">globus_ftp_client_plugin_t</a> *plugin, FILE *stream, const char *text)</td></tr>
<tr class="memitem:ga1e4b52a42862184289a1f12a8104732d"><td class="memItemLeft" align="right" valign="top">globus_result_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__globus__ftp__client__debug__plugin.html#ga1e4b52a42862184289a1f12a8104732d">globus_ftp_client_debug_plugin_destroy</a> (<a class="el" href="group__globus__ftp__client__plugins.html#gafd650bbeee4bf50b94275d89352697dc">globus_ftp_client_plugin_t</a> *plugin)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>The FTP Debugging plugin provides a way for the user to trace FTP protocol messages which occur while the GridFTP client library processes an FTP operation. </p>
<p>This may be useful for debugging FTP configuration problems.</p>
<p>When this plugin is used for a GridFTP Client operation, information will be printed to the file stream associated with the plugin when a user begins an operation, for all data buffers which pass through while handling a data transfer, and for all protocol messages which are sent and received.</p>
<p><b>Example Usage:</b></p>
<p>The following example illustrates a typical use of the debug plugin. In this case, we configure a plugin instance to output log messages preceded by the process name and pid to a file named gridftp.log.</p>
<div class="fragment"><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[])</div>
<div class="line">{</div>
<div class="line">    <a class="code" href="group__globus__ftp__client__plugins.html#gafd650bbeee4bf50b94275d89352697dc" title="FTP Client pluginAn FTP Client plugin is used to add restart, monitoring, and performance tuning oper...">globus_ftp_client_plugin_t</a> restart_plugin;</div>
<div class="line">    <a class="code" href="group__globus__ftp__client__handleattr.html#gab4a1b9fd7b91ba74a5beb576ac3e307d" title="Handle Attributes.">globus_ftp_client_handleattr_t</a> handleattr;</div>
<div class="line">    <a class="code" href="group__globus__ftp__client__handle.html#ga9d8a98c88d529ab539c2fedee545f172" title="FTP Client Handle.">globus_ftp_client_handle_t</a> handle;</div>
<div class="line">    FILE * log;</div>
<div class="line">    <span class="keywordtype">char</span> text[256];</div>
<div class="line"></div>
<div class="line">    <span class="comment">/* Activate the necessary modules */</span></div>
<div class="line">    globus_module_activate(<a class="code" href="group__globus__ftp__client__activation.html#gafad292f70aeba0451e27a6c1cdf5a831" title="Module descriptor.">GLOBUS_FTP_CLIENT_MODULE</a>);</div>
<div class="line">    globus_module_activate(<a class="code" href="group__globus__ftp__client__debug__plugin.html#gac08270f82c3709f701f7772b9ab16c33" title="Module descriptor.">GLOBUS_FTP_CLIENT_DEBUG_PLUGIN_MODULE</a>);</div>
<div class="line"></div>
<div class="line">    <span class="comment">/* Configure plugin to show custom text, and send plugin data to</span></div>
<div class="line"><span class="comment">     * a custom log file</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    log = fopen(<span class="stringliteral">&quot;gridftp.log&quot;</span>, <span class="stringliteral">&quot;a&quot;</span>);</div>
<div class="line">    sprintf(text, <span class="stringliteral">&quot;%s:%ld&quot;</span>, argv[0], (<span class="keywordtype">long</span>) getpid());</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group__globus__ftp__client__debug__plugin.html#ga0e9a937acc1cf4b22a67206722e287da" title="Initialize an instance of the GridFTP debugging pluginThis function will initialize the debugging plu...">globus_ftp_client_debug_plugin_init</a>(&amp;debug_plugin, log, text);</div>
<div class="line"></div>
<div class="line">    <span class="comment">/* Set up our client handle to use the new plugin */</span></div>
<div class="line">    <a class="code" href="group__globus__ftp__client__handleattr.html#ga55df5cb63ad06755dc9c707fb3b3197e" title="Initialize an FTP client handle attribute set.">globus_ftp_client_handleattr_init</a>(&amp;handleattr);</div>
<div class="line">    <a class="code" href="group__globus__ftp__client__handleattr.html#ga77e24c2d75f9c847167179958fa28998" title="Add/Remove a plugin to a handle attribute set.">globus_ftp_client_handleattr_add_plugin</a>(&amp;handleattr, &amp;debug_plugin);</div>
<div class="line">    <a class="code" href="group__globus__ftp__client__handle.html#ga571af4a23e8985f9b36e2df3320fdd1d" title="Initialize a client FTP handle.">globus_ftp_client_handle_init</a>(&amp;handle, &amp;handleattr);</div>
<div class="line"></div>
<div class="line">    <span class="comment">/* As this get is processed, data will be appended to our gridftp.log</span></div>
<div class="line"><span class="comment">     * file</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="group__globus__ftp__client__operations.html#ga6fe365dd2dfac6da159ff389e1f76a9b" title="Get a file from an FTP server.">globus_ftp_client_get</a>(&amp;handle,</div>
<div class="line">                          <span class="stringliteral">&quot;ftp://ftp.globus.org/pub/globus/README&quot;</span>,</div>
<div class="line">                          GLOBUS_NULL,</div>
<div class="line">                          GLOBUS_NULL,</div>
<div class="line">                          callback_fn,</div>
<div class="line">                          GLOBUS_NULL);</div>
<div class="line">}</div>
</div><!-- fragment --> <hr/><h2>Macro Definition Documentation</h2>
<a class="anchor" id="gac08270f82c3709f701f7772b9ab16c33"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GLOBUS_FTP_CLIENT_DEBUG_PLUGIN_MODULE&#160;&#160;&#160;(&amp;globus_i_ftp_client_debug_plugin_module)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Module descriptor. </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga0e9a937acc1cf4b22a67206722e287da"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">globus_result_t globus_ftp_client_debug_plugin_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__globus__ftp__client__plugins.html#gafd650bbeee4bf50b94275d89352697dc">globus_ftp_client_plugin_t</a> *&#160;</td>
          <td class="paramname"><em>plugin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize an instance of the GridFTP debugging pluginThis function will initialize the debugging plugin-specific instance data for this plugin, and will make the plugin usable for ftp client handle attribute and handle creation. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">plugin</td><td>A pointer to an uninitialized plugin. The plugin will be configured as a debugging plugin, with the default of sending debugging messages to stderr. </td></tr>
    <tr><td class="paramname">stream</td><td></td></tr>
    <tr><td class="paramname">text</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>This function returns an error if<ul>
<li>plugin is null</li>
</ul>
</dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__globus__ftp__client__debug__plugin.html#ga1e4b52a42862184289a1f12a8104732d" title="Destroy an instance of the GridFTP debugging pluginThis function will free all debugging plugin-speci...">globus_ftp_client_debug_plugin_destroy()</a>, <a class="el" href="group__globus__ftp__client__handleattr.html#ga77e24c2d75f9c847167179958fa28998" title="Add/Remove a plugin to a handle attribute set.">globus_ftp_client_handleattr_add_plugin()</a>, <a class="el" href="group__globus__ftp__client__handleattr.html#ga4ecb53ff8b985af31ad384f9ea5f31db" title="Add/Remove a plugin to a handle attribute set.">globus_ftp_client_handleattr_remove_plugin()</a>, <a class="el" href="group__globus__ftp__client__handle.html#ga571af4a23e8985f9b36e2df3320fdd1d" title="Initialize a client FTP handle.">globus_ftp_client_handle_init()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga1e4b52a42862184289a1f12a8104732d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">globus_result_t globus_ftp_client_debug_plugin_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__globus__ftp__client__plugins.html#gafd650bbeee4bf50b94275d89352697dc">globus_ftp_client_plugin_t</a> *&#160;</td>
          <td class="paramname"><em>plugin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroy an instance of the GridFTP debugging pluginThis function will free all debugging plugin-specific instance data from this plugin, and will make the plugin unusable for further ftp handle creation. </p>
<p>Existing FTP client handles and handle attributes will not be affected by destroying a plugin associated with them, as a local copy of the plugin is made upon handle initialization.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">plugin</td><td>A pointer to a GridFTP debugging plugin, previously initialized by calling <a class="el" href="group__globus__ftp__client__debug__plugin.html#ga0e9a937acc1cf4b22a67206722e287da" title="Initialize an instance of the GridFTP debugging pluginThis function will initialize the debugging plu...">globus_ftp_client_debug_plugin_init()</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>This function returns an error if<ul>
<li>plugin is null</li>
<li>plugin is not a debugging plugin</li>
</ul>
</dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__globus__ftp__client__debug__plugin.html#ga0e9a937acc1cf4b22a67206722e287da" title="Initialize an instance of the GridFTP debugging pluginThis function will initialize the debugging plu...">globus_ftp_client_debug_plugin_init()</a>, <a class="el" href="group__globus__ftp__client__handleattr.html#ga77e24c2d75f9c847167179958fa28998" title="Add/Remove a plugin to a handle attribute set.">globus_ftp_client_handleattr_add_plugin()</a>, <a class="el" href="group__globus__ftp__client__handleattr.html#ga4ecb53ff8b985af31ad384f9ea5f31db" title="Add/Remove a plugin to a handle attribute set.">globus_ftp_client_handleattr_remove_plugin()</a>, <a class="el" href="group__globus__ftp__client__handle.html#ga571af4a23e8985f9b36e2df3320fdd1d" title="Initialize a client FTP handle.">globus_ftp_client_handle_init()</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<hr>
<p align="center">
<a href="http://www.globus.org/toolkit/about.html" target="_top">about globus</a> |
<a href="http://www.globus.org/toolkit/" target="_top">globus toolkit</a> |
<a href="https://dev.globus.org/wiki/Welcome/" target="_top">dev.globus</a>
<br>
<br>
Comments? <a href="mailto:webmaster@globus.org">webmaster@globus.org</a>
</body>
</html>