Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 8457c46910352e73f0e46d6907b72318 > files > 122

python-pyrad-2.0-3.fc18.noarch.rpm



<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>pyrad.client – basic client &mdash; pyrad 1.2 documentation</title>
    
    <link rel="stylesheet" href="../_static/repoze.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="pyrad 1.2 documentation" href="../index.html" />
    <link rel="next" title="pyrad.dictionary – RADIUS dictionary" href="dictionary.html" />
    <link rel="prev" title="pyrad – RADIUS for Python" href="../index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="dictionary.html" title="pyrad.dictionary – RADIUS dictionary"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="../index.html" title="pyrad – RADIUS for Python"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">pyrad 1.2 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-pyrad.client">
<span id="pyrad-client-basic-client"></span><h1><a class="reference internal" href="#module-pyrad.client" title="pyrad.client"><tt class="xref py py-mod docutils literal"><span class="pre">pyrad.client</span></tt></a> &#8211; basic client<a class="headerlink" href="#module-pyrad.client" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="pyrad.client.Timeout">
<em class="property">class </em><tt class="descclassname">pyrad.client.</tt><tt class="descname">Timeout</tt><a class="headerlink" href="#pyrad.client.Timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Simple exception class which is raised when a timeout occurs
while waiting for a RADIUS server to respond.</p>
</dd></dl>

<dl class="class">
<dt id="pyrad.client.Client">
<em class="property">class </em><tt class="descclassname">pyrad.client.</tt><tt class="descname">Client</tt><big>(</big><em>server</em>, <em>authport=1812</em>, <em>acctport=1813</em>, <em>secret=''</em>, <em>dict=None</em><big>)</big><a class="headerlink" href="#pyrad.client.Client" title="Permalink to this definition">¶</a></dt>
<dd><p>Basic RADIUS client.
This class implements a basic RADIUS client. It can send requests
to a RADIUS server, taking care of timeouts and retries, and
validate its replies.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Variables:</th><td class="field-body"><ul class="first last simple">
<li><strong>retries</strong> &#8211; number of times to retry sending a RADIUS request</li>
<li><strong>timeout</strong> &#8211; number of seconds to wait for an answer</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="pyrad.client.Client.CreateAcctPacket">
<tt class="descname">CreateAcctPacket</tt><big>(</big><em>**args</em><big>)</big><a class="headerlink" href="#pyrad.client.Client.CreateAcctPacket" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new RADIUS packet.
This utility function creates a new RADIUS packet which can
be used to communicate with the RADIUS server this client
talks to. This is initializing the new packet with the
dictionary and secret used for the client.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a new empty packet instance</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">pyrad.packet.Packet</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="pyrad.client.Client.CreateAuthPacket">
<tt class="descname">CreateAuthPacket</tt><big>(</big><em>**args</em><big>)</big><a class="headerlink" href="#pyrad.client.Client.CreateAuthPacket" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new RADIUS packet.
This utility function creates a new RADIUS packet which can
be used to communicate with the RADIUS server this client
talks to. This is initializing the new packet with the
dictionary and secret used for the client.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a new empty packet instance</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">pyrad.packet.Packet</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="pyrad.client.Client.SendPacket">
<tt class="descname">SendPacket</tt><big>(</big><em>pkt</em><big>)</big><a class="headerlink" href="#pyrad.client.Client.SendPacket" title="Permalink to this definition">¶</a></dt>
<dd><p>Send a packet to a RADIUS server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pkt</strong> (<a class="reference internal" href="packet.html#pyrad.packet.Packet" title="pyrad.packet.Packet"><em>pyrad.packet.Packet</em></a>) &#8211; the packet to send</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the reply packet received</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">pyrad.packet.Packet</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises Timeout:</th><td class="field-body">RADIUS server does not reply</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="pyrad.client.Client.bind">
<tt class="descname">bind</tt><big>(</big><em>addr</em><big>)</big><a class="headerlink" href="#pyrad.client.Client.bind" title="Permalink to this definition">¶</a></dt>
<dd><p>Bind socket to an address.
Binding the socket used for communicating to an address can be
usefull when working on a machine with multiple addresses.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>addr</strong> (<em>host,port tuple</em>) &#8211; network address (hostname or IP) and port to bind to</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../index.html">
              <img class="logo" src="../_static/logo.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="../index.html"
                        title="previous chapter"><tt class="docutils literal"><span class="pre">pyrad</span></tt> &#8211; RADIUS for Python</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="dictionary.html"
                        title="next chapter"><tt class="docutils literal"><span class="pre">pyrad.dictionary</span></tt> &#8211; RADIUS dictionary</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/api/client.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="dictionary.html" title="pyrad.dictionary – RADIUS dictionary"
             >next</a> |</li>
        <li class="right" >
          <a href="../index.html" title="pyrad – RADIUS for Python"
             >previous</a> |</li>
        <li><a href="../index.html">pyrad 1.2 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2002-2009 Wichert Akkerman, 2009 Kristoffer Gronlund.
      Last updated on Sep 05, 2013.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>