<!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>Router Status Entries — Stem 1.1.0 documentation</title> <link rel="stylesheet" href="../../_static/haiku.css" type="text/css" /> <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="../../_static/print.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../../', VERSION: '1.1.0', 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> <script type="text/javascript" src="../../_static/theme_extras.js"></script> <link rel="shortcut icon" href="../../_static/favicon.png"/> <link rel="top" title="Stem 1.1.0 documentation" href="../../index.html" /> <link rel="up" title="Contents" href="../../contents.html" /> <link rel="next" title="TorDNSEL Exit Lists" href="tordnsel.html" /> <link rel="prev" title="Network Status Documents" href="networkstatus.html" /> </head> <body> <div class="header"><img class="rightlogo" src="../../_static/logo.png" alt="Logo"/><h1 class="heading"><a href="../../index.html"> <span>Stem Docs</span></a></h1> <h2 class="heading"><span>Router Status Entries</span></h2> </div> <div class="topnav"> <p> <ul id="navbar"> <li><a href="../../index.html">Home</a></li> <li><a href="../../tutorials.html">Tutorials</a> <ul> <li><a href="../../tutorials/the_little_relay_that_could.html">Hello World</a></li> <li><a href="../../tutorials/to_russia_with_love.html">Client Usage</a></li> <li><a href="../../tutorials/tortoise_and_the_hare.html">Event Listening</a></li> <li><a href="../../tutorials/mirror_mirror_on_the_wall.html">Tor Descriptors</a></li> <li><a href="../../tutorials/east_of_the_sun.html">Utilities</a></li> <li><a href="../../tutorials/double_double_toil_and_trouble.html">Examples</a></li> </ul> </li> <li><a href="../../api.html">API</a> <ul> <li><a href="../control.html">stem.control</a></li> <li><a href="../connection.html">stem.connection</a></li> <li><a href="../socket.html">stem.socket</a></li> <li><a href="../process.html">stem.process</a></li> <li><a href="../response.html">stem.response</a></li> <li><a href="../exit_policy.html">stem.exit_policy</a></li> <li><a href="../version.html">stem.version</a></li> <li><a href="../../api.html#descriptors">Descriptors</a></li> <li><a href="../../api.html#utilities">Utilities</a></li> </ul> </li> <li><a href="https://trac.torproject.org/projects/tor/wiki/doc/stem">Development</a> <ul> <li><a href="../../faq.html">FAQ</a></li> <li><a href="../../change_log.html">Change Log</a></li> <li><a href="https://trac.torproject.org/projects/tor/wiki/doc/stem/bugs">Bug Tracker</a></li> <li><a href="../../download.html">Download</a></li> </ul> </li> </ul> </p> </div> <div class="content"> <div class="section" id="module-stem.descriptor.router_status_entry"> <span id="router-status-entries"></span><h1>Router Status Entries<a class="headerlink" href="#module-stem.descriptor.router_status_entry" title="Permalink to this headline">¶</a></h1> <p>Parsing for router status entries, the information for individual routers within a network status document. This information is provided from a few sources...</p> <ul class="simple"> <li>control port via ‘GETINFO ns/*’ and ‘GETINFO md/*’ queries</li> <li>router entries in a network status document, like the cached-consensus</li> </ul> <p><strong>Module Overview:</strong></p> <div class="highlight-python"><pre>RouterStatusEntry - Common parent for router status entries |- RouterStatusEntryV2 - Entry for a network status v2 document |- RouterStatusEntryV3 - Entry for a network status v3 document +- RouterStatusEntryMicroV3 - Entry for a microdescriptor flavored v3 document</pre> </div> <dl class="class"> <dt id="stem.descriptor.router_status_entry.RouterStatusEntry"> <em class="property">class </em><tt class="descclassname">stem.descriptor.router_status_entry.</tt><tt class="descname">RouterStatusEntry</tt><big>(</big><em>content</em>, <em>validate</em>, <em>document</em><big>)</big><a class="reference internal" href="../../_modules/stem/descriptor/router_status_entry.html#RouterStatusEntry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#stem.descriptor.router_status_entry.RouterStatusEntry" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">stem.descriptor.Descriptor</span></tt></p> <p>Information about an individual router stored within a network status document. This is the common parent for concrete status entry types.</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>document</strong> (<a class="reference internal" href="networkstatus.html#stem.descriptor.networkstatus.NetworkStatusDocument" title="stem.descriptor.networkstatus.NetworkStatusDocument"><em>stem.descriptor.networkstatus.NetworkStatusDocument</em></a>) – <strong>*</strong> document that this descriptor came from</li> <li><strong>nickname</strong> (<em>str</em>) – <strong>*</strong> router’s nickname</li> <li><strong>fingerprint</strong> (<em>str</em>) – <strong>*</strong> router’s fingerprint</li> <li><strong>published</strong> (<em>datetime</em>) – <strong>*</strong> router’s publication</li> <li><strong>address</strong> (<em>str</em>) – <strong>*</strong> router’s IP address</li> <li><strong>or_port</strong> (<em>int</em>) – <strong>*</strong> router’s ORPort</li> <li><strong>dir_port</strong> (<em>int</em>) – <strong>*</strong> router’s DirPort</li> <li><strong>flags</strong> (<em>list</em>) – <strong>*</strong> list of <a class="reference internal" href="../control.html#stem.Flag" title="stem.Flag"><tt class="xref py py-data docutils literal"><span class="pre">Flag</span></tt></a> associated with the relay</li> <li><strong>version</strong> (<a class="reference internal" href="../version.html#stem.version.Version" title="stem.version.Version"><em>stem.version.Version</em></a>) – parsed version of tor, this is <strong>None</strong> if the relay’s using a new versioning scheme</li> <li><strong>version_line</strong> (<em>str</em>) – versioning information reported by the relay</li> </ul> </td> </tr> </tbody> </table> <dl class="method"> <dt id="stem.descriptor.router_status_entry.RouterStatusEntry.get_unrecognized_lines"> <tt class="descname">get_unrecognized_lines</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/stem/descriptor/router_status_entry.html#RouterStatusEntry.get_unrecognized_lines"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#stem.descriptor.router_status_entry.RouterStatusEntry.get_unrecognized_lines" title="Permalink to this definition">¶</a></dt> <dd><p>Provides any unrecognized lines.</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">list of unrecognized lines</td> </tr> </tbody> </table> </dd></dl> </dd></dl> <dl class="class"> <dt id="stem.descriptor.router_status_entry.RouterStatusEntryV2"> <em class="property">class </em><tt class="descclassname">stem.descriptor.router_status_entry.</tt><tt class="descname">RouterStatusEntryV2</tt><big>(</big><em>content</em>, <em>validate=True</em>, <em>document=None</em><big>)</big><a class="reference internal" href="../../_modules/stem/descriptor/router_status_entry.html#RouterStatusEntryV2"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#stem.descriptor.router_status_entry.RouterStatusEntryV2" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="#stem.descriptor.router_status_entry.RouterStatusEntry" title="stem.descriptor.router_status_entry.RouterStatusEntry"><tt class="xref py py-class docutils literal"><span class="pre">stem.descriptor.router_status_entry.RouterStatusEntry</span></tt></a></p> <p>Information about an individual router stored within a version 2 network status document.</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"><strong>digest</strong> (<em>str</em>) – <strong>*</strong> router’s upper-case hex digest</td> </tr> </tbody> </table> <p><strong>*</strong> attribute is either required when we’re parsed with validation or has a default value, others are left as <strong>None</strong> if undefined</p> </dd></dl> <dl class="class"> <dt id="stem.descriptor.router_status_entry.RouterStatusEntryV3"> <em class="property">class </em><tt class="descclassname">stem.descriptor.router_status_entry.</tt><tt class="descname">RouterStatusEntryV3</tt><big>(</big><em>content</em>, <em>validate=True</em>, <em>document=None</em><big>)</big><a class="reference internal" href="../../_modules/stem/descriptor/router_status_entry.html#RouterStatusEntryV3"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#stem.descriptor.router_status_entry.RouterStatusEntryV3" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="#stem.descriptor.router_status_entry.RouterStatusEntry" title="stem.descriptor.router_status_entry.RouterStatusEntry"><tt class="xref py py-class docutils literal"><span class="pre">stem.descriptor.router_status_entry.RouterStatusEntry</span></tt></a></p> <p>Information about an individual router stored within a version 3 network status document.</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>or_addresses</strong> (<em>list</em>) – <strong>*</strong> relay’s OR addresses, this is a tuple listing of the form (address (<strong>str</strong>), port (<strong>int</strong>), is_ipv6 (<strong>bool</strong>))</li> <li><strong>digest</strong> (<em>str</em>) – <strong>*</strong> router’s upper-case hex digest</li> <li><strong>bandwidth</strong> (<em>int</em>) – bandwidth claimed by the relay (in kb/s)</li> <li><strong>measured</strong> (<em>int</em>) – bandwidth measured to be available by the relay</li> <li><strong>is_unmeasured</strong> (<em>bool</em>) – bandwidth measurement isn’t based on three or more measurements</li> <li><strong>unrecognized_bandwidth_entries</strong> (<em>list</em>) – <strong>*</strong> bandwidth weighting information that isn’t yet recognized</li> <li><strong>exit_policy</strong> (<a class="reference internal" href="../exit_policy.html#stem.exit_policy.MicroExitPolicy" title="stem.exit_policy.MicroExitPolicy"><em>stem.exit_policy.MicroExitPolicy</em></a>) – router’s exit policy</li> <li><strong>microdescriptor_hashes</strong> (<em>list</em>) – <strong>*</strong> tuples of two values, the list of consensus methods for generating a set of digests and the ‘algorithm => digest’ mappings</li> </ul> </td> </tr> </tbody> </table> <p><strong>*</strong> attribute is either required when we’re parsed with validation or has a default value, others are left as <strong>None</strong> if undefined</p> </dd></dl> <dl class="class"> <dt id="stem.descriptor.router_status_entry.RouterStatusEntryMicroV3"> <em class="property">class </em><tt class="descclassname">stem.descriptor.router_status_entry.</tt><tt class="descname">RouterStatusEntryMicroV3</tt><big>(</big><em>content</em>, <em>validate=True</em>, <em>document=None</em><big>)</big><a class="reference internal" href="../../_modules/stem/descriptor/router_status_entry.html#RouterStatusEntryMicroV3"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#stem.descriptor.router_status_entry.RouterStatusEntryMicroV3" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="#stem.descriptor.router_status_entry.RouterStatusEntry" title="stem.descriptor.router_status_entry.RouterStatusEntry"><tt class="xref py py-class docutils literal"><span class="pre">stem.descriptor.router_status_entry.RouterStatusEntry</span></tt></a></p> <p>Information about an individual router stored within a microdescriptor flavored network status document.</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>bandwidth</strong> (<em>int</em>) – bandwidth claimed by the relay (in kb/s)</li> <li><strong>measured</strong> (<em>int</em>) – bandwidth measured to be available by the relay</li> <li><strong>is_unmeasured</strong> (<em>bool</em>) – bandwidth measurement isn’t based on three or more measurements</li> <li><strong>unrecognized_bandwidth_entries</strong> (<em>list</em>) – <strong>*</strong> bandwidth weighting information that isn’t yet recognized</li> <li><strong>digest</strong> (<em>str</em>) – <strong>*</strong> router’s hex encoded digest of our corresponding microdescriptor</li> </ul> </td> </tr> </tbody> </table> <p><strong>*</strong> attribute is either required when we’re parsed with validation or has a default value, others are left as <strong>None</strong> if undefined</p> </dd></dl> </div> </div> <div class="bottomnav"> </div> <div class="footer"> </div> </body> </html>