Replacing epydoc output on website.

master
Michael P. Soulier 2010-07-11 19:34:39 -04:00
parent 402b2ae4c4
commit ad94976895
80 changed files with 2704 additions and 16310 deletions

View File

@ -35,6 +35,11 @@ html:
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
install-html: html
rm -rf ../html/sphinx
mkdir -p ../html/sphinx
cp -R _build/html/* ../html/sphinx
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo

View File

@ -137,9 +137,9 @@
<a name="doc" />
<h2>Documentation</h2>
<p>
For now, all I have is the
<a href="tftpy-doc/index.html">API docs</a>. I'll have to work up
a tutorial and a manual at some point.
I am working on some documentation via the
<a href="http://sphinx.pocoo.org/">Sphinx project</a>. The current
ones are <a href="sphinx/index.html">here</a>.
</p>
<hr />

View File

@ -0,0 +1,57 @@
.. TFTPy documentation master file, created by
sphinx-quickstart on Sun Jul 11 18:48:32 2010.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to TFTPy's documentation!
=================================
Contents:
.. toctree::
:maxdepth: 2
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
API Documentation
=================
TFTPy Module
------------
.. automodule:: tftpy
:members:
tftpy.TftpClient
----------------
.. automodule:: tftpy.TftpClient
:members:
tftpy.TftpPacketFactory
-----------------------
.. automodule:: tftpy.TftpPacketFactory
:members:
tftpy.TftpPacketTypes
---------------------
.. automodule:: tftpy.TftpPacketTypes
:members:
tftpy.TftpServer
----------------
.. automodule:: tftpy.TftpServer
:members:
tftpy.TftpShared
----------------
.. automodule:: tftpy.TftpShared
:members:
tftpy.TftpStates
----------------
.. automodule:: tftpy.TftpStates
:members:

View File

@ -0,0 +1,417 @@
/**
* Sphinx stylesheet -- basic theme
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* -- main layout ----------------------------------------------------------- */
div.clearer {
clear: both;
}
/* -- relbar ---------------------------------------------------------------- */
div.related {
width: 100%;
font-size: 90%;
}
div.related h3 {
display: none;
}
div.related ul {
margin: 0;
padding: 0 0 0 10px;
list-style: none;
}
div.related li {
display: inline;
}
div.related li.right {
float: right;
margin-right: 5px;
}
/* -- sidebar --------------------------------------------------------------- */
div.sphinxsidebarwrapper {
padding: 10px 5px 0 10px;
}
div.sphinxsidebar {
float: left;
width: 230px;
margin-left: -100%;
font-size: 90%;
}
div.sphinxsidebar ul {
list-style: none;
}
div.sphinxsidebar ul ul,
div.sphinxsidebar ul.want-points {
margin-left: 20px;
list-style: square;
}
div.sphinxsidebar ul ul {
margin-top: 0;
margin-bottom: 0;
}
div.sphinxsidebar form {
margin-top: 10px;
}
div.sphinxsidebar input {
border: 1px solid #98dbcc;
font-family: sans-serif;
font-size: 1em;
}
img {
border: 0;
}
/* -- search page ----------------------------------------------------------- */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* -- index page ------------------------------------------------------------ */
table.contentstable {
width: 90%;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
/* -- general index --------------------------------------------------------- */
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable dl, table.indextable dd {
margin-top: 0;
margin-bottom: 0;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
/* -- general body styles --------------------------------------------------- */
a.headerlink {
visibility: hidden;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
visibility: visible;
}
div.body p.caption {
text-align: inherit;
}
div.body td {
text-align: left;
}
.field-list ul {
padding-left: 1em;
}
.first {
margin-top: 0 !important;
}
p.rubric {
margin-top: 30px;
font-weight: bold;
}
/* -- sidebars -------------------------------------------------------------- */
div.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px 7px 0 7px;
background-color: #ffe;
width: 40%;
float: right;
}
p.sidebar-title {
font-weight: bold;
}
/* -- topics ---------------------------------------------------------------- */
div.topic {
border: 1px solid #ccc;
padding: 7px 7px 0 7px;
margin: 10px 0 10px 0;
}
p.topic-title {
font-size: 1.1em;
font-weight: bold;
margin-top: 10px;
}
/* -- admonitions ----------------------------------------------------------- */
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
}
div.admonition dt {
font-weight: bold;
}
div.admonition dl {
margin-bottom: 0;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
}
div.body p.centered {
text-align: center;
margin-top: 25px;
}
/* -- tables ---------------------------------------------------------------- */
table.docutils {
border: 0;
border-collapse: collapse;
}
table.docutils td, table.docutils th {
padding: 1px 8px 1px 0;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #aaa;
}
table.field-list td, table.field-list th {
border: 0 !important;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
th {
text-align: left;
padding-right: 5px;
}
/* -- other body styles ----------------------------------------------------- */
dl {
margin-bottom: 15px;
}
dd p {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
dt:target, .highlight {
background-color: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
.refcount {
color: #060;
}
.optional {
font-size: 1.3em;
}
.versionmodified {
font-style: italic;
}
.system-message {
background-color: #fda;
padding: 5px;
border: 3px solid red;
}
.footnote:target {
background-color: #ffa
}
.line-block {
display: block;
margin-top: 1em;
margin-bottom: 1em;
}
.line-block .line-block {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em;
}
/* -- code displays --------------------------------------------------------- */
pre {
overflow: auto;
}
td.linenos pre {
padding: 5px 0px;
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
margin-left: 0.5em;
}
table.highlighttable td {
padding: 0 0.5em 0 0.5em;
}
tt.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
tt.descclassname {
background-color: transparent;
}
tt.xref, a tt {
background-color: transparent;
font-weight: bold;
}
h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
background-color: transparent;
}
/* -- math display ---------------------------------------------------------- */
img.math {
vertical-align: middle;
}
div.body div.math p {
text-align: center;
}
span.eqno {
float: right;
}
/* -- printout stylesheet --------------------------------------------------- */
@media print {
div.document,
div.documentwrapper,
div.bodywrapper {
margin: 0 !important;
width: 100%;
}
div.sphinxsidebar,
div.related,
div.footer,
#top-link {
display: none;
}
}

View File

@ -0,0 +1,218 @@
/**
* Sphinx stylesheet -- default theme
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
body {
font-family: sans-serif;
font-size: 100%;
background-color: #11303d;
color: #000;
margin: 0;
padding: 0;
}
div.document {
background-color: #1c4e63;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 230px;
}
div.body {
background-color: #ffffff;
color: #000000;
padding: 0 20px 30px 20px;
}
div.footer {
color: #ffffff;
width: 100%;
padding: 9px 0 9px 0;
text-align: center;
font-size: 75%;
}
div.footer a {
color: #ffffff;
text-decoration: underline;
}
div.related {
background-color: #133f52;
line-height: 30px;
color: #ffffff;
}
div.related a {
color: #ffffff;
}
div.sphinxsidebar {
}
div.sphinxsidebar h3 {
font-family: 'Trebuchet MS', sans-serif;
color: #ffffff;
font-size: 1.4em;
font-weight: normal;
margin: 0;
padding: 0;
}
div.sphinxsidebar h3 a {
color: #ffffff;
}
div.sphinxsidebar h4 {
font-family: 'Trebuchet MS', sans-serif;
color: #ffffff;
font-size: 1.3em;
font-weight: normal;
margin: 5px 0 0 0;
padding: 0;
}
div.sphinxsidebar p {
color: #ffffff;
}
div.sphinxsidebar p.topless {
margin: 5px 10px 10px 10px;
}
div.sphinxsidebar ul {
margin: 10px;
padding: 0;
color: #ffffff;
}
div.sphinxsidebar a {
color: #98dbcc;
}
div.sphinxsidebar input {
border: 1px solid #98dbcc;
font-family: sans-serif;
font-size: 1em;
}
/* -- body styles ----------------------------------------------------------- */
a {
color: #355f7c;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
div.body p, div.body dd, div.body li {
text-align: justify;
line-height: 130%;
}
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: 'Trebuchet MS', sans-serif;
background-color: #f2f2f2;
font-weight: normal;
color: #20435c;
border-bottom: 1px solid #ccc;
margin: 20px -20px 10px -20px;
padding: 3px 0 3px 10px;
}
div.body h1 { margin-top: 0; font-size: 200%; }
div.body h2 { font-size: 160%; }
div.body h3 { font-size: 140%; }
div.body h4 { font-size: 120%; }
div.body h5 { font-size: 110%; }
div.body h6 { font-size: 100%; }
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
div.body p, div.body dd, div.body li {
text-align: justify;
line-height: 130%;
}
div.admonition p.admonition-title + p {
display: inline;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.topic {
background-color: #eee;
}
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}
p.admonition-title {
display: inline;
}
p.admonition-title:after {
content: ":";
}
pre {
padding: 5px;
background-color: #eeffcc;
color: #333333;
line-height: 120%;
border: 1px solid #ac9;
border-left: none;
border-right: none;
}
tt {
background-color: #ecf0f3;
padding: 0 1px 0 1px;
font-size: 0.95em;
}
.warning tt {
background: #efc2c2;
}
.note tt {
background: #d6d6d6;
}

View File

@ -0,0 +1,232 @@
/// XXX: make it cross browser
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
*/
if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function() {}
}
/**
* small helper function to urldecode strings
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
}
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s == 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
}
/**
* small function to check if an array contains
* a given item.
*/
jQuery.contains = function(arr, item) {
for (var i = 0; i < arr.length; i++) {
if (arr[i] == item)
return true;
}
return false;
}
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node) {
if (node.nodeType == 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 && !jQuery.className.has(node.parentNode, className)) {
var span = document.createElement("span");
span.className = className;
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this)
});
}
}
return this.each(function() {
highlight(this);
});
}
/**
* Small JavaScript module for the documentation.
*/
var Documentation = {
init : function() {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initModIndex();
},
/**
* i18n support
*/
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
LOCALE : 'unknown',
// gettext and ngettext don't access this so that the functions
// can savely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated == 'undefined')
return string;
return (typeof translated == 'string') ? translated : translated[0];
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated == 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
},
addTranslations : function(catalog) {
for (var key in catalog.messages)
this.TRANSLATIONS[key] = catalog.messages[key];
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
this.LOCALE = catalog.locale;
},
/**
* add context elements like header anchor links
*/
addContextElements : function() {
$('div[id] > :header:first').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this headline')).
appendTo(this);
});
$('dt[id]').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this definition')).
appendTo(this);
});
},
/**
* workaround a firefox stupidity
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash && $.browser.mozilla)
window.setTimeout(function() {
document.location.href += '';
}, 10);
},
/**
* highlight the search words provided in the url in the text
*/
highlightSearchWords : function() {
var params = $.getQueryParameters();
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
if (terms.length) {
var body = $('div.body');
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlight');
});
}, 10);
$('<li class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>')
.appendTo($('.sidebar .this-page-menu'));
}
},
/**
* init the modindex toggle buttons
*/
initModIndex : function() {
var togglers = $('img.toggler').click(function() {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
console.log($('tr.cg-' + idnum).toggle());
if (src.substr(-9) == 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
}).css('display', '');
if (DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX) {
togglers.click();
}
},
/**
* helper function to hide the search marks again
*/
hideSearchWords : function() {
$('.sidebar .this-page-menu li.highlight-link').fadeOut(300);
$('span.highlight').removeClass('highlight');
},
/**
* make the url absolute
*/
makeURL : function(relativeURL) {
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
},
/**
* get the current relative url
*/
getCurrentURL : function() {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this == '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
}
};
// quick alias for translations
_ = Documentation.gettext;
$(document).ready(function() {
Documentation.init();
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

32
html/sphinx/_static/jquery.js vendored Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

View File

@ -0,0 +1,61 @@
.hll { background-color: #ffffcc }
.c { color: #408090; font-style: italic } /* Comment */
.err { border: 1px solid #FF0000 } /* Error */
.k { color: #007020; font-weight: bold } /* Keyword */
.o { color: #666666 } /* Operator */
.cm { color: #408090; font-style: italic } /* Comment.Multiline */
.cp { color: #007020 } /* Comment.Preproc */
.c1 { color: #408090; font-style: italic } /* Comment.Single */
.cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
.gd { color: #A00000 } /* Generic.Deleted */
.ge { font-style: italic } /* Generic.Emph */
.gr { color: #FF0000 } /* Generic.Error */
.gh { color: #000080; font-weight: bold } /* Generic.Heading */
.gi { color: #00A000 } /* Generic.Inserted */
.go { color: #303030 } /* Generic.Output */
.gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.gt { color: #0040D0 } /* Generic.Traceback */
.kc { color: #007020; font-weight: bold } /* Keyword.Constant */
.kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
.kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
.kp { color: #007020 } /* Keyword.Pseudo */
.kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
.kt { color: #902000 } /* Keyword.Type */
.m { color: #208050 } /* Literal.Number */
.s { color: #4070a0 } /* Literal.String */
.na { color: #4070a0 } /* Name.Attribute */
.nb { color: #007020 } /* Name.Builtin */
.nc { color: #0e84b5; font-weight: bold } /* Name.Class */
.no { color: #60add5 } /* Name.Constant */
.nd { color: #555555; font-weight: bold } /* Name.Decorator */
.ni { color: #d55537; font-weight: bold } /* Name.Entity */
.ne { color: #007020 } /* Name.Exception */
.nf { color: #06287e } /* Name.Function */
.nl { color: #002070; font-weight: bold } /* Name.Label */
.nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
.nt { color: #062873; font-weight: bold } /* Name.Tag */
.nv { color: #bb60d5 } /* Name.Variable */
.ow { color: #007020; font-weight: bold } /* Operator.Word */
.w { color: #bbbbbb } /* Text.Whitespace */
.mf { color: #208050 } /* Literal.Number.Float */
.mh { color: #208050 } /* Literal.Number.Hex */
.mi { color: #208050 } /* Literal.Number.Integer */
.mo { color: #208050 } /* Literal.Number.Oct */
.sb { color: #4070a0 } /* Literal.String.Backtick */
.sc { color: #4070a0 } /* Literal.String.Char */
.sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
.s2 { color: #4070a0 } /* Literal.String.Double */
.se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
.sh { color: #4070a0 } /* Literal.String.Heredoc */
.si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
.sx { color: #c65d09 } /* Literal.String.Other */
.sr { color: #235388 } /* Literal.String.Regex */
.s1 { color: #4070a0 } /* Literal.String.Single */
.ss { color: #517918 } /* Literal.String.Symbol */
.bp { color: #007020 } /* Name.Builtin.Pseudo */
.vc { color: #bb60d5 } /* Name.Variable.Class */
.vg { color: #bb60d5 } /* Name.Variable.Global */
.vi { color: #bb60d5 } /* Name.Variable.Instance */
.il { color: #208050 } /* Literal.Number.Integer.Long */

View File

@ -0,0 +1,467 @@
/**
* helper function to return a node containing the
* search summary for a given text. keywords is a list
* of stemmed words, hlwords is the list of normal, unstemmed
* words. the first one is used to find the occurance, the
* latter for highlighting it.
*/
jQuery.makeSearchSummary = function(text, keywords, hlwords) {
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
var i = textLower.indexOf(this.toLowerCase());
if (i > -1)
start = i;
});
start = Math.max(start - 120, 0);
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlight');
});
return rv;
}
/**
* Porter Stemmer
*/
var PorterStemmer = function() {
var step2list = {
ational: 'ate',
tional: 'tion',
enci: 'ence',
anci: 'ance',
izer: 'ize',
bli: 'ble',
alli: 'al',
entli: 'ent',
eli: 'e',
ousli: 'ous',
ization: 'ize',
ation: 'ate',
ator: 'ate',
alism: 'al',
iveness: 'ive',
fulness: 'ful',
ousness: 'ous',
aliti: 'al',
iviti: 'ive',
biliti: 'ble',
logi: 'log'
};
var step3list = {
icate: 'ic',
ative: '',
alize: 'al',
iciti: 'ic',
ical: 'ic',
ful: '',
ness: ''
};
var c = "[^aeiou]"; // consonant
var v = "[aeiouy]"; // vowel
var C = c + "[^aeiouy]*"; // consonant sequence
var V = v + "[aeiou]*"; // vowel sequence
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
var s_v = "^(" + C + ")?" + v; // vowel in stem
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
if (w.length < 3)
return w;
var re;
var re2;
var re3;
var re4;
firstch = w.substr(0,1);
if (firstch == "y")
w = firstch.toUpperCase() + w.substr(1);
// Step 1a
re = /^(.+?)(ss|i)es$/;
re2 = /^(.+?)([^s])s$/;
if (re.test(w))
w = w.replace(re,"$1$2");
else if (re2.test(w))
w = w.replace(re2,"$1$2");
// Step 1b
re = /^(.+?)eed$/;
re2 = /^(.+?)(ed|ing)$/;
if (re.test(w)) {
var fp = re.exec(w);
re = new RegExp(mgr0);
if (re.test(fp[1])) {
re = /.$/;
w = w.replace(re,"");
}
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1];
re2 = new RegExp(s_v);
if (re2.test(stem)) {
w = stem;
re2 = /(at|bl|iz)$/;
re3 = new RegExp("([^aeiouylsz])\\1$");
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re2.test(w))
w = w + "e";
else if (re3.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
else if (re4.test(w))
w = w + "e";
}
}
// Step 1c
re = /^(.+?)y$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(s_v);
if (re.test(stem))
w = stem + "i";
}
// Step 2
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step2list[suffix];
}
// Step 3
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step3list[suffix];
}
// Step 4
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
re2 = /^(.+?)(s|t)(ion)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
if (re.test(stem))
w = stem;
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1] + fp[2];
re2 = new RegExp(mgr1);
if (re2.test(stem))
w = stem;
}
// Step 5
re = /^(.+?)e$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
re2 = new RegExp(meq1);
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
w = stem;
}
re = /ll$/;
re2 = new RegExp(mgr1);
if (re.test(w) && re2.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
// and turn initial Y back to y
if (firstch == "y")
w = firstch.toLowerCase() + w.substr(1);
return w;
}
}
/**
* Search Module
*/
var Search = {
_index : null,
_queued_query : null,
_pulse_status : -1,
init : function() {
var params = $.getQueryParameters();
if (params.q) {
var query = params.q[0];
$('input[name="q"]')[0].value = query;
this.performSearch(query);
}
},
/**
* Sets the index
*/
setIndex : function(index) {
var q;
this._index = index;
if ((q = this._queued_query) !== null) {
this._queued_query = null;
Search.query(q);
}
},
hasIndex : function() {
return this._index !== null;
},
deferQuery : function(query) {
this._queued_query = query;
},
stopPulse : function() {
this._pulse_status = 0;
},
startPulse : function() {
if (this._pulse_status >= 0)
return;
function pulse() {
Search._pulse_status = (Search._pulse_status + 1) % 4;
var dotString = '';
for (var i = 0; i < Search._pulse_status; i++)
dotString += '.';
Search.dots.text(dotString);
if (Search._pulse_status > -1)
window.setTimeout(pulse, 500);
};
pulse();
},
/**
* perform a search for something
*/
performSearch : function(query) {
// create the required interface elements
this.out = $('#search-results');
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
this.dots = $('<span></span>').appendTo(this.title);
this.status = $('<p style="display: none"></p>').appendTo(this.out);
this.output = $('<ul class="search"/>').appendTo(this.out);
$('#search-progress').text(_('Preparing search...'));
this.startPulse();
// index already loaded, the browser was quick!
if (this.hasIndex())
this.query(query);
else
this.deferQuery(query);
},
query : function(query) {
// stem the searchterms and add them to the
// correct list
var stemmer = new PorterStemmer();
var searchterms = [];
var excluded = [];
var hlterms = [];
var tmp = query.split(/\s+/);
var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;
for (var i = 0; i < tmp.length; i++) {
// stem the word
var word = stemmer.stemWord(tmp[i]).toLowerCase();
// select the correct list
if (word[0] == '-') {
var toAppend = excluded;
word = word.substr(1);
}
else {
var toAppend = searchterms;
hlterms.push(tmp[i].toLowerCase());
}
// only add if not already in the list
if (!$.contains(toAppend, word))
toAppend.push(word);
};
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
console.debug('SEARCH: searching for:');
console.info('required: ', searchterms);
console.info('excluded: ', excluded);
// prepare search
var filenames = this._index.filenames;
var titles = this._index.titles;
var terms = this._index.terms;
var descrefs = this._index.descrefs;
var modules = this._index.modules;
var desctypes = this._index.desctypes;
var fileMap = {};
var files = null;
var objectResults = [];
var regularResults = [];
$('#search-progress').empty();
// lookup as object
if (object != null) {
for (var module in modules) {
if (module.indexOf(object) > -1) {
fn = modules[module];
descr = _('module, in ') + titles[fn];
objectResults.push([filenames[fn], module, '#module-'+module, descr]);
}
}
for (var prefix in descrefs) {
for (var name in descrefs[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) {
match = descrefs[prefix][name];
descr = desctypes[match[1]] + _(', in ') + titles[match[0]];
objectResults.push([filenames[match[0]], fullname, '#'+fullname, descr]);
}
}
}
}
// sort results descending
objectResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
// perform the search on the required terms
for (var i = 0; i < searchterms.length; i++) {
var word = searchterms[i];
// no match but word was a required one
if ((files = terms[word]) == null)
break;
if (files.length == undefined) {
files = [files];
}
// create the mapping
for (var j = 0; j < files.length; j++) {
var file = files[j];
if (file in fileMap)
fileMap[file].push(word);
else
fileMap[file] = [word];
}
}
// now check if the files don't contain excluded terms
for (var file in fileMap) {
var valid = true;
// check if all requirements are matched
if (fileMap[file].length != searchterms.length)
continue;
// ensure that none of the excluded terms is in the
// search result.
for (var i = 0; i < excluded.length; i++) {
if (terms[excluded[i]] == file ||
$.contains(terms[excluded[i]] || [], file)) {
valid = false;
break;
}
}
// if we have still a valid result we can add it
// to the result list
if (valid)
regularResults.push([filenames[file], titles[file], '', null]);
}
// delete unused variables in order to not waste
// memory until list is retrieved completely
delete filenames, titles, terms;
// now sort the regular results descending by title
regularResults.sort(function(a, b) {
var left = a[1].toLowerCase();
var right = b[1].toLowerCase();
return (left > right) ? -1 : ((left < right) ? 1 : 0);
});
// combine both
var results = regularResults.concat(objectResults);
// print the results
var resultCount = results.length;
function displayNextItem() {
// results left, load the summary and display it
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
listItem.append($('<a/>').attr(
'href',
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
highlightstring + item[2]).html(item[1]));
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.get('_sources/' + item[0] + '.txt', function(data) {
listItem.append($.makeSearchSummary(data, searchterms, hlterms));
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
});
} else {
// no source available, just display title
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
}
}
// search finished, update title and status message
else {
Search.stopPulse();
Search.title.text(_('Search Results'));
if (!resultCount)
Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
else
Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
Search.status.fadeIn(500);
}
}
displayNextItem();
}
}
$(document).ready(function() {
Search.init();
});

261
html/sphinx/genindex.html Normal file
View File

@ -0,0 +1,261 @@
<!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>Index &mdash; TFTPy v0.5.1 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '#',
VERSION: '0.5.1',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="TFTPy v0.5.1 documentation" href="index.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="#" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li><a href="index.html">TFTPy v0.5.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<h1 id="index">Index</h1>
<a href="#A"><strong>A</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#E"><strong>E</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#H"><strong>H</strong></a> | <a href="#L"><strong>L</strong></a> | <a href="#M"><strong>M</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#T"><strong>T</strong></a> | <a href="#U"><strong>U</strong></a>
<hr />
<h2 id="A">A</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpStates.TftpMetrics.add_dup">add_dup() (tftpy.TftpStates.TftpMetrics method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="C">C</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpStates.TftpContext.checkTimeout">checkTimeout() (tftpy.TftpStates.TftpContext method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpContext.cycle">cycle() (tftpy.TftpStates.TftpContext method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="D">D</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacket.decode">decode() (tftpy.TftpPacketTypes.TftpPacket method)</a></dt>
<dd><dl>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketDAT.decode">(tftpy.TftpPacketTypes.TftpPacketDAT method)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketERR.decode">(tftpy.TftpPacketTypes.TftpPacketERR method)</a></dt>
</dl></dd></dl></td><td width="33%" valign="top"><dl>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketWithOptions.decode_options">decode_options() (tftpy.TftpPacketTypes.TftpPacketWithOptions method)</a></dt>
<dt><a href="index.html#tftpy.TftpClient.TftpClient.download">download() (tftpy.TftpClient.TftpClient method)</a></dt>
</dl></td></tr></table>
<h2 id="E">E</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacket.encode">encode() (tftpy.TftpPacketTypes.TftpPacket method)</a></dt>
<dd><dl>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketDAT.encode">(tftpy.TftpPacketTypes.TftpPacketDAT method)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketERR.encode">(tftpy.TftpPacketTypes.TftpPacketERR method)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketInitial.encode">(tftpy.TftpPacketTypes.TftpPacketInitial method)</a></dt>
</dl></dd>
<dt><a href="index.html#tftpy.TftpStates.TftpContext.end">end() (tftpy.TftpStates.TftpContext method)</a></dt>
<dd><dl>
<dt><a href="index.html#tftpy.TftpStates.TftpContextClientDownload.end">(tftpy.TftpStates.TftpContextClientDownload method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpContextClientUpload.end">(tftpy.TftpStates.TftpContextClientUpload method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpContextServer.end">(tftpy.TftpStates.TftpContextServer method)</a></dt>
</dl></dd></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="G">G</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpStates.TftpContext.gethost">gethost() (tftpy.TftpStates.TftpContext method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="H">H</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpStates.TftpState.handle">handle() (tftpy.TftpStates.TftpState method)</a></dt>
<dd><dl>
<dt><a href="index.html#tftpy.TftpStates.TftpStateExpectACK.handle">(tftpy.TftpStates.TftpStateExpectACK method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateExpectDAT.handle">(tftpy.TftpStates.TftpStateExpectDAT method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateSentRRQ.handle">(tftpy.TftpStates.TftpStateSentRRQ method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateSentWRQ.handle">(tftpy.TftpStates.TftpStateSentWRQ method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateServerRecvRRQ.handle">(tftpy.TftpStates.TftpStateServerRecvRRQ method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateServerRecvWRQ.handle">(tftpy.TftpStates.TftpStateServerRecvWRQ method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateServerStart.handle">(tftpy.TftpStates.TftpStateServerStart method)</a></dt>
</dl></dd></dl></td><td width="33%" valign="top"><dl>
<dt><a href="index.html#tftpy.TftpStates.TftpState.handleDat">handleDat() (tftpy.TftpStates.TftpState method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpState.handleOACK">handleOACK() (tftpy.TftpStates.TftpState method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpContext.host">host (tftpy.TftpStates.TftpContext attribute)</a></dt>
</dl></td></tr></table>
<h2 id="L">L</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpServer.TftpServer.listen">listen() (tftpy.TftpServer.TftpServer method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="M">M</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketOACK.match_options">match_options() (tftpy.TftpPacketTypes.TftpPacketOACK method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="P">P</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpPacketFactory.TftpPacketFactory.parse">parse() (tftpy.TftpPacketFactory.TftpPacketFactory method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="R">R</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpStates.TftpState.returnSupportedOptions">returnSupportedOptions() (tftpy.TftpStates.TftpState method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
<h2 id="S">S</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpStates.TftpState.sendACK">sendACK() (tftpy.TftpStates.TftpState method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpState.sendDAT">sendDAT() (tftpy.TftpStates.TftpState method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpState.sendError">sendError() (tftpy.TftpStates.TftpState method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpState.sendOACK">sendOACK() (tftpy.TftpStates.TftpState method)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpState.serverInitial">serverInitial() (tftpy.TftpStates.TftpState method)</a></dt></dl></td><td width="33%" valign="top"><dl>
<dt><a href="index.html#tftpy.TftpStates.TftpContext.sethost">sethost() (tftpy.TftpStates.TftpContext method)</a></dt>
<dt><a href="index.html#tftpy.TftpShared.setLogLevel">setLogLevel() (in module tftpy.TftpShared)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpContextClientDownload.start">start() (tftpy.TftpStates.TftpContextClientDownload method)</a></dt>
<dd><dl>
<dt><a href="index.html#tftpy.TftpStates.TftpContextServer.start">(tftpy.TftpStates.TftpContextServer method)</a></dt>
</dl></dd>
</dl></td></tr></table>
<h2 id="T">T</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpShared.tftpassert">tftpassert() (in module tftpy.TftpShared)</a></dt>
<dt><a href="index.html#tftpy.TftpClient.TftpClient">TftpClient (class in tftpy.TftpClient)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpContext">TftpContext (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpContextClientDownload">TftpContextClientDownload (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpContextClientUpload">TftpContextClientUpload (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpContextServer">TftpContextServer (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#tftpy.TftpShared.TftpErrors">TftpErrors (class in tftpy.TftpShared)</a></dt>
<dt><a href="index.html#tftpy.TftpShared.TftpException">TftpException</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpMetrics">TftpMetrics (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacket">TftpPacket (class in tftpy.TftpPacketTypes)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketACK">TftpPacketACK (class in tftpy.TftpPacketTypes)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketDAT">TftpPacketDAT (class in tftpy.TftpPacketTypes)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketERR">TftpPacketERR (class in tftpy.TftpPacketTypes)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketFactory.TftpPacketFactory">TftpPacketFactory (class in tftpy.TftpPacketFactory)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketInitial">TftpPacketInitial (class in tftpy.TftpPacketTypes)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketOACK">TftpPacketOACK (class in tftpy.TftpPacketTypes)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketRRQ">TftpPacketRRQ (class in tftpy.TftpPacketTypes)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketWithOptions">TftpPacketWithOptions (class in tftpy.TftpPacketTypes)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpPacketWRQ">TftpPacketWRQ (class in tftpy.TftpPacketTypes)</a></dt></dl></td><td width="33%" valign="top"><dl>
<dt><a href="index.html#tftpy.TftpServer.TftpServer">TftpServer (class in tftpy.TftpServer)</a></dt>
<dt><a href="index.html#tftpy.TftpPacketTypes.TftpSession">TftpSession (class in tftpy.TftpPacketTypes)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpState">TftpState (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateExpectACK">TftpStateExpectACK (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateExpectDAT">TftpStateExpectDAT (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateSentRRQ">TftpStateSentRRQ (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateSentWRQ">TftpStateSentWRQ (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateServerRecvRRQ">TftpStateServerRecvRRQ (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateServerRecvWRQ">TftpStateServerRecvWRQ (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#tftpy.TftpStates.TftpStateServerStart">TftpStateServerStart (class in tftpy.TftpStates)</a></dt>
<dt><a href="index.html#module-tftpy">tftpy (module)</a></dt>
<dt><a href="index.html#module-tftpy.TftpClient">tftpy.TftpClient (module)</a></dt>
<dt><a href="index.html#module-tftpy.TftpPacketFactory">tftpy.TftpPacketFactory (module)</a></dt>
<dt><a href="index.html#module-tftpy.TftpPacketTypes">tftpy.TftpPacketTypes (module)</a></dt>
<dt><a href="index.html#module-tftpy.TftpServer">tftpy.TftpServer (module)</a></dt>
<dt><a href="index.html#module-tftpy.TftpShared">tftpy.TftpShared (module)</a></dt>
<dt><a href="index.html#module-tftpy.TftpStates">tftpy.TftpStates (module)</a></dt>
</dl></td></tr></table>
<h2 id="U">U</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
<dt><a href="index.html#tftpy.TftpClient.TftpClient.upload">upload() (tftpy.TftpClient.TftpClient method)</a></dt></dl></td><td width="33%" valign="top"><dl>
</dl></td></tr></table>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<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="#" title="General Index"
>index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
>modules</a> |</li>
<li><a href="index.html">TFTPy v0.5.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2010, Michael P. Soulier.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

648
html/sphinx/index.html Normal file
View File

@ -0,0 +1,648 @@
<!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>Welcome to TFTPys documentation! &mdash; TFTPy v0.5.1 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '#',
VERSION: '0.5.1',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="TFTPy v0.5.1 documentation" href="#" />
</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="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li><a href="#">TFTPy v0.5.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="welcome-to-tftpy-s-documentation">
<h1>Welcome to TFTPy&#8217;s documentation!<a class="headerlink" href="#welcome-to-tftpy-s-documentation" title="Permalink to this headline"></a></h1>
<p>Contents:</p>
<ul class="simple">
</ul>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><a class="reference external" href="genindex.html"><em>Index</em></a></li>
<li><a class="reference external" href="modindex.html"><em>Module Index</em></a></li>
<li><a class="reference external" href="search.html"><em>Search Page</em></a></li>
</ul>
</div>
<div class="section" id="api-documentation">
<h1>API Documentation<a class="headerlink" href="#api-documentation" title="Permalink to this headline"></a></h1>
<div class="section" id="module-tftpy">
<h2>TFTPy Module<a class="headerlink" href="#module-tftpy" title="Permalink to this headline"></a></h2>
<p>This library implements the tftp protocol, based on rfc 1350.
<a class="reference external" href="http://www.faqs.org/rfcs/rfc1350.html">http://www.faqs.org/rfcs/rfc1350.html</a>
At the moment it implements only a client class, but will include a server,
with support for variable block sizes.</p>
</div>
<div class="section" id="module-tftpy.TftpClient">
<h2>tftpy.TftpClient<a class="headerlink" href="#module-tftpy.TftpClient" title="Permalink to this headline"></a></h2>
<p>This module implements the TFTP Client functionality.</p>
<dl class="class">
<dt id="tftpy.TftpClient.TftpClient">
<em class="property">class </em><tt class="descclassname">tftpy.TftpClient.</tt><tt class="descname">TftpClient</tt><big>(</big><em>host</em>, <em>port</em>, <em>options={}</em><big>)</big><a class="headerlink" href="#tftpy.TftpClient.TftpClient" title="Permalink to this definition"></a></dt>
<dd><p>This class is an implementation of a tftp client. Once instantiated, a
download can be initiated via the download() method.</p>
<dl class="method">
<dt id="tftpy.TftpClient.TftpClient.download">
<tt class="descname">download</tt><big>(</big><em>filename</em>, <em>output</em>, <em>packethook=None</em>, <em>timeout=5</em><big>)</big><a class="headerlink" href="#tftpy.TftpClient.TftpClient.download" title="Permalink to this definition"></a></dt>
<dd><p>This method initiates a tftp download from the configured remote
host, requesting the filename passed. It saves the file to a local
file specified in the output parameter. If a packethook is provided,
it must be a function that takes a single parameter, which will be a
copy of each DAT packet received in the form of a TftpPacketDAT
object. The timeout parameter may be used to override the default
SOCK_TIMEOUT setting, which is the amount of time that the client will
wait for a receive packet to arrive.</p>
<p>Note: If output is a hyphen then stdout is used.</p>
</dd></dl>
<dl class="method">
<dt id="tftpy.TftpClient.TftpClient.upload">
<tt class="descname">upload</tt><big>(</big><em>filename</em>, <em>input</em>, <em>packethook=None</em>, <em>timeout=5</em><big>)</big><a class="headerlink" href="#tftpy.TftpClient.TftpClient.upload" title="Permalink to this definition"></a></dt>
<dd>Note: If input is a hyphen then stdin is used.</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-tftpy.TftpPacketFactory">
<h2>tftpy.TftpPacketFactory<a class="headerlink" href="#module-tftpy.TftpPacketFactory" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="tftpy.TftpPacketFactory.TftpPacketFactory">
<em class="property">class </em><tt class="descclassname">tftpy.TftpPacketFactory.</tt><tt class="descname">TftpPacketFactory</tt><a class="headerlink" href="#tftpy.TftpPacketFactory.TftpPacketFactory" title="Permalink to this definition"></a></dt>
<dd><p>This class generates TftpPacket objects. It is responsible for parsing
raw buffers off of the wire and returning objects representing them, via
the parse() method.</p>
<dl class="method">
<dt id="tftpy.TftpPacketFactory.TftpPacketFactory.parse">
<tt class="descname">parse</tt><big>(</big><em>buffer</em><big>)</big><a class="headerlink" href="#tftpy.TftpPacketFactory.TftpPacketFactory.parse" title="Permalink to this definition"></a></dt>
<dd>This method is used to parse an existing datagram into its
corresponding TftpPacket object. The buffer is the raw bytes off of
the network.</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-tftpy.TftpPacketTypes">
<h2>tftpy.TftpPacketTypes<a class="headerlink" href="#module-tftpy.TftpPacketTypes" title="Permalink to this headline"></a></h2>
<p>This module implements the packet types of TFTP itself, and the
corresponding encode and decode methods for them.</p>
<dl class="class">
<dt id="tftpy.TftpPacketTypes.TftpPacket">
<em class="property">class </em><tt class="descclassname">tftpy.TftpPacketTypes.</tt><tt class="descname">TftpPacket</tt><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacket" title="Permalink to this definition"></a></dt>
<dd><p>This class is the parent class of all tftp packet classes. It is an
abstract class, providing an interface, and should not be instantiated
directly.</p>
<dl class="method">
<dt id="tftpy.TftpPacketTypes.TftpPacket.decode">
<tt class="descname">decode</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacket.decode" title="Permalink to this definition"></a></dt>
<dd><p>The decode method of a TftpPacket takes a buffer off of the wire in
network-byte order, and decodes it, populating internal properties as
appropriate. This can only be done once the first 2-byte opcode has
already been decoded, but the data section does include the entire
datagram.</p>
<p>This is an abstract method.</p>
</dd></dl>
<dl class="method">
<dt id="tftpy.TftpPacketTypes.TftpPacket.encode">
<tt class="descname">encode</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacket.encode" title="Permalink to this definition"></a></dt>
<dd><p>The encode method of a TftpPacket takes keyword arguments specific
to the type of packet, and packs an appropriate buffer in network-byte
order suitable for sending over the wire.</p>
<p>This is an abstract method.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpPacketTypes.TftpPacketACK">
<em class="property">class </em><tt class="descclassname">tftpy.TftpPacketTypes.</tt><tt class="descname">TftpPacketACK</tt><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketACK" title="Permalink to this definition"></a></dt>
<dd><div class="highlight-python"><pre> 2 bytes 2 bytes
-------------------
ACK | 04 | Block # |
--------------------</pre>
</div>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpPacketTypes.TftpPacketDAT">
<em class="property">class </em><tt class="descclassname">tftpy.TftpPacketTypes.</tt><tt class="descname">TftpPacketDAT</tt><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketDAT" title="Permalink to this definition"></a></dt>
<dd><div class="highlight-python"><pre> 2 bytes 2 bytes n bytes
---------------------------------
DATA | 03 | Block # | Data |
---------------------------------</pre>
</div>
<dl class="method">
<dt id="tftpy.TftpPacketTypes.TftpPacketDAT.decode">
<tt class="descname">decode</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketDAT.decode" title="Permalink to this definition"></a></dt>
<dd>Decode self.buffer into instance variables. It returns self for
easy method chaining.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpPacketTypes.TftpPacketDAT.encode">
<tt class="descname">encode</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketDAT.encode" title="Permalink to this definition"></a></dt>
<dd>Encode the DAT packet. This method populates self.buffer, and
returns self for easy method chaining.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpPacketTypes.TftpPacketERR">
<em class="property">class </em><tt class="descclassname">tftpy.TftpPacketTypes.</tt><tt class="descname">TftpPacketERR</tt><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketERR" title="Permalink to this definition"></a></dt>
<dd><div class="highlight-python"><pre> 2 bytes 2 bytes string 1 byte
----------------------------------------
ERROR | 05 | ErrorCode | ErrMsg | 0 |
----------------------------------------
Error Codes
Value Meaning
0 Not defined, see error message (if any).
1 File not found.
2 Access violation.
3 Disk full or allocation exceeded.
4 Illegal TFTP operation.
5 Unknown transfer ID.
6 File already exists.
7 No such user.
8 Failed to negotiate options</pre>
</div>
<dl class="method">
<dt id="tftpy.TftpPacketTypes.TftpPacketERR.decode">
<tt class="descname">decode</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketERR.decode" title="Permalink to this definition"></a></dt>
<dd>Decode self.buffer, populating instance variables and return self.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpPacketTypes.TftpPacketERR.encode">
<tt class="descname">encode</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketERR.encode" title="Permalink to this definition"></a></dt>
<dd>Encode the DAT packet based on instance variables, populating
self.buffer, returning self.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpPacketTypes.TftpPacketInitial">
<em class="property">class </em><tt class="descclassname">tftpy.TftpPacketTypes.</tt><tt class="descname">TftpPacketInitial</tt><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketInitial" title="Permalink to this definition"></a></dt>
<dd><p>This class is a common parent class for the RRQ and WRQ packets, as
they share quite a bit of code.</p>
<dl class="method">
<dt id="tftpy.TftpPacketTypes.TftpPacketInitial.encode">
<tt class="descname">encode</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketInitial.encode" title="Permalink to this definition"></a></dt>
<dd>Encode the packet&#8217;s buffer from the instance variables.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpPacketTypes.TftpPacketOACK">
<em class="property">class </em><tt class="descclassname">tftpy.TftpPacketTypes.</tt><tt class="descname">TftpPacketOACK</tt><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketOACK" title="Permalink to this definition"></a></dt>
<dd><div class="highlight-python"><pre>+-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
| opc | opt1 | 0 | value1 | 0 | optN | 0 | valueN | 0 |
+-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+</pre>
</div>
<dl class="method">
<dt id="tftpy.TftpPacketTypes.TftpPacketOACK.match_options">
<tt class="descname">match_options</tt><big>(</big><em>options</em><big>)</big><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketOACK.match_options" title="Permalink to this definition"></a></dt>
<dd>This method takes a set of options, and tries to match them with
its own. It can accept some changes in those options from the server as
part of a negotiation. Changed or unchanged, it will return a dict of
the options so that the session can update itself to the negotiated
options.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpPacketTypes.TftpPacketRRQ">
<em class="property">class </em><tt class="descclassname">tftpy.TftpPacketTypes.</tt><tt class="descname">TftpPacketRRQ</tt><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketRRQ" title="Permalink to this definition"></a></dt>
<dd><div class="highlight-python"><pre> 2 bytes string 1 byte string 1 byte
-----------------------------------------------
RRQ/ | 01/02 | Filename | 0 | Mode | 0 |
WRQ -----------------------------------------------</pre>
</div>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpPacketTypes.TftpPacketWRQ">
<em class="property">class </em><tt class="descclassname">tftpy.TftpPacketTypes.</tt><tt class="descname">TftpPacketWRQ</tt><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketWRQ" title="Permalink to this definition"></a></dt>
<dd><div class="highlight-python"><pre> 2 bytes string 1 byte string 1 byte
-----------------------------------------------
RRQ/ | 01/02 | Filename | 0 | Mode | 0 |
WRQ -----------------------------------------------</pre>
</div>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpPacketTypes.TftpPacketWithOptions">
<em class="property">class </em><tt class="descclassname">tftpy.TftpPacketTypes.</tt><tt class="descname">TftpPacketWithOptions</tt><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketWithOptions" title="Permalink to this definition"></a></dt>
<dd><p>This class exists to permit some TftpPacket subclasses to share code
regarding options handling. It does not inherit from TftpPacket, as the
goal is just to share code here, and not cause diamond inheritance.</p>
<dl class="method">
<dt id="tftpy.TftpPacketTypes.TftpPacketWithOptions.decode_options">
<tt class="descname">decode_options</tt><big>(</big><em>buffer</em><big>)</big><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpPacketWithOptions.decode_options" title="Permalink to this definition"></a></dt>
<dd>This method decodes the section of the buffer that contains an
unknown number of options. It returns a dictionary of option names and
values.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpPacketTypes.TftpSession">
<em class="property">class </em><tt class="descclassname">tftpy.TftpPacketTypes.</tt><tt class="descname">TftpSession</tt><a class="headerlink" href="#tftpy.TftpPacketTypes.TftpSession" title="Permalink to this definition"></a></dt>
<dd>This class is the base class for the tftp client and server. Any shared
code should be in this class.</dd></dl>
</div>
<div class="section" id="module-tftpy.TftpServer">
<h2>tftpy.TftpServer<a class="headerlink" href="#module-tftpy.TftpServer" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="tftpy.TftpServer.TftpServer">
<em class="property">class </em><tt class="descclassname">tftpy.TftpServer.</tt><tt class="descname">TftpServer</tt><big>(</big><em>tftproot='/tftpboot'</em>, <em>dyn_file_func=None</em><big>)</big><a class="headerlink" href="#tftpy.TftpServer.TftpServer" title="Permalink to this definition"></a></dt>
<dd><p>This class implements a tftp server object.</p>
<dl class="method">
<dt id="tftpy.TftpServer.TftpServer.listen">
<tt class="descname">listen</tt><big>(</big><em>listenip=''</em>, <em>listenport=69</em>, <em>timeout=5</em><big>)</big><a class="headerlink" href="#tftpy.TftpServer.TftpServer.listen" title="Permalink to this definition"></a></dt>
<dd>Start a server listening on the supplied interface and port. This
defaults to INADDR_ANY (all interfaces) and UDP port 69. You can also
supply a different socket timeout value, if desired.</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-tftpy.TftpShared">
<h2>tftpy.TftpShared<a class="headerlink" href="#module-tftpy.TftpShared" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="tftpy.TftpShared.TftpErrors">
<em class="property">class </em><tt class="descclassname">tftpy.TftpShared.</tt><tt class="descname">TftpErrors</tt><a class="headerlink" href="#tftpy.TftpShared.TftpErrors" title="Permalink to this definition"></a></dt>
<dd>This class is a convenience for defining the common tftp error codes,
and making them more readable in the code.</dd></dl>
<dl class="exception">
<dt id="tftpy.TftpShared.TftpException">
<em class="property">exception </em><tt class="descclassname">tftpy.TftpShared.</tt><tt class="descname">TftpException</tt><a class="headerlink" href="#tftpy.TftpShared.TftpException" title="Permalink to this definition"></a></dt>
<dd>This class is the parent class of all exceptions regarding the handling
of the TFTP protocol.</dd></dl>
<dl class="function">
<dt id="tftpy.TftpShared.setLogLevel">
<tt class="descclassname">tftpy.TftpShared.</tt><tt class="descname">setLogLevel</tt><big>(</big><em>level</em><big>)</big><a class="headerlink" href="#tftpy.TftpShared.setLogLevel" title="Permalink to this definition"></a></dt>
<dd>This function is a utility function for setting the internal log level.
The log level defaults to logging.NOTSET, so unwanted output to stdout is
not created.</dd></dl>
<dl class="function">
<dt id="tftpy.TftpShared.tftpassert">
<tt class="descclassname">tftpy.TftpShared.</tt><tt class="descname">tftpassert</tt><big>(</big><em>condition</em>, <em>msg</em><big>)</big><a class="headerlink" href="#tftpy.TftpShared.tftpassert" title="Permalink to this definition"></a></dt>
<dd>This function is a simple utility that will check the condition
passed for a false state. If it finds one, it throws a TftpException
with the message passed. This just makes the code throughout cleaner
by refactoring.</dd></dl>
</div>
<div class="section" id="module-tftpy.TftpStates">
<h2>tftpy.TftpStates<a class="headerlink" href="#module-tftpy.TftpStates" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="tftpy.TftpStates.TftpContext">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpContext</tt><big>(</big><em>host</em>, <em>port</em>, <em>timeout</em>, <em>dyn_file_func=None</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContext" title="Permalink to this definition"></a></dt>
<dd><p>The base class of the contexts.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpContext.checkTimeout">
<tt class="descname">checkTimeout</tt><big>(</big><em>now</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContext.checkTimeout" title="Permalink to this definition"></a></dt>
<dd>Compare current time with last_update time, and raise an exception
if we&#8217;re over SOCK_TIMEOUT time.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpContext.cycle">
<tt class="descname">cycle</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContext.cycle" title="Permalink to this definition"></a></dt>
<dd>Here we wait for a response from the server after sending it
something, and dispatch appropriate action to that response.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpContext.end">
<tt class="descname">end</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContext.end" title="Permalink to this definition"></a></dt>
<dd>Perform session cleanup, since the end method should always be
called explicitely by the calling code, this works better than the
destructor.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpContext.gethost">
<tt class="descname">gethost</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContext.gethost" title="Permalink to this definition"></a></dt>
<dd>Simple getter method for use in a property.</dd></dl>
<dl class="attribute">
<dt id="tftpy.TftpStates.TftpContext.host">
<tt class="descname">host</tt><a class="headerlink" href="#tftpy.TftpStates.TftpContext.host" title="Permalink to this definition"></a></dt>
<dd>Simple getter method for use in a property.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpContext.sethost">
<tt class="descname">sethost</tt><big>(</big><em>host</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContext.sethost" title="Permalink to this definition"></a></dt>
<dd>Setter method that also sets the address property as a result
of the host that is set.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpStates.TftpContextClientDownload">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpContextClientDownload</tt><big>(</big><em>host</em>, <em>port</em>, <em>filename</em>, <em>output</em>, <em>options</em>, <em>packethook</em>, <em>timeout</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContextClientDownload" title="Permalink to this definition"></a></dt>
<dd><p>The download context for the client during a download.
Note: If output is a hyphen, then the output will be sent to stdout.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpContextClientDownload.end">
<tt class="descname">end</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContextClientDownload.end" title="Permalink to this definition"></a></dt>
<dd>Finish up the context.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpContextClientDownload.start">
<tt class="descname">start</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContextClientDownload.start" title="Permalink to this definition"></a></dt>
<dd>Initiate the download.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpStates.TftpContextClientUpload">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpContextClientUpload</tt><big>(</big><em>host</em>, <em>port</em>, <em>filename</em>, <em>input</em>, <em>options</em>, <em>packethook</em>, <em>timeout</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContextClientUpload" title="Permalink to this definition"></a></dt>
<dd><p>The upload context for the client during an upload.
Note: If input is a hyphen, then we will use stdin.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpContextClientUpload.end">
<tt class="descname">end</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContextClientUpload.end" title="Permalink to this definition"></a></dt>
<dd>Finish up the context.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpStates.TftpContextServer">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpContextServer</tt><big>(</big><em>host</em>, <em>port</em>, <em>timeout</em>, <em>root</em>, <em>dyn_file_func=None</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContextServer" title="Permalink to this definition"></a></dt>
<dd><p>The context for the server.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpContextServer.end">
<tt class="descname">end</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContextServer.end" title="Permalink to this definition"></a></dt>
<dd>Finish up the context.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpContextServer.start">
<tt class="descname">start</tt><big>(</big><em>buffer</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpContextServer.start" title="Permalink to this definition"></a></dt>
<dd>Start the state cycle. Note that the server context receives an
initial packet in its start method. Also note that the server does not
loop on cycle(), as it expects the TftpServer object to manage
that.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpStates.TftpMetrics">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpMetrics</tt><a class="headerlink" href="#tftpy.TftpStates.TftpMetrics" title="Permalink to this definition"></a></dt>
<dd><p>A class representing metrics of the transfer.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpMetrics.add_dup">
<tt class="descname">add_dup</tt><big>(</big><em>blocknumber</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpMetrics.add_dup" title="Permalink to this definition"></a></dt>
<dd>This method adds a dup for a block number to the metrics.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpStates.TftpState">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpState</tt><big>(</big><em>context</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpState" title="Permalink to this definition"></a></dt>
<dd><p>The base class for the states.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpState.handle">
<tt class="descname">handle</tt><big>(</big><em>pkt</em>, <em>raddress</em>, <em>rport</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpState.handle" title="Permalink to this definition"></a></dt>
<dd>An abstract method for handling a packet. It is expected to return
a TftpState object, either itself or a new state.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpState.handleDat">
<tt class="descname">handleDat</tt><big>(</big><em>pkt</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpState.handleDat" title="Permalink to this definition"></a></dt>
<dd>This method handles a DAT packet during a client download, or a
server upload.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpState.handleOACK">
<tt class="descname">handleOACK</tt><big>(</big><em>pkt</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpState.handleOACK" title="Permalink to this definition"></a></dt>
<dd>This method handles an OACK from the server, syncing any accepted
options.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpState.returnSupportedOptions">
<tt class="descname">returnSupportedOptions</tt><big>(</big><em>options</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpState.returnSupportedOptions" title="Permalink to this definition"></a></dt>
<dd>This method takes a requested options list from a client, and
returns the ones that are supported.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpState.sendACK">
<tt class="descname">sendACK</tt><big>(</big><em>blocknumber=None</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpState.sendACK" title="Permalink to this definition"></a></dt>
<dd>This method sends an ack packet to the block number specified. If
none is specified, it defaults to the next_block property in the
parent context.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpState.sendDAT">
<tt class="descname">sendDAT</tt><big>(</big><em>resend=False</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpState.sendDAT" title="Permalink to this definition"></a></dt>
<dd>This method sends the next DAT packet based on the data in the
context. It returns a boolean indicating whether the transfer is
finished.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpState.sendError">
<tt class="descname">sendError</tt><big>(</big><em>errorcode</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpState.sendError" title="Permalink to this definition"></a></dt>
<dd>This method uses the socket passed, and uses the errorcode to
compose and send an error packet.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpState.sendOACK">
<tt class="descname">sendOACK</tt><big>(</big><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpState.sendOACK" title="Permalink to this definition"></a></dt>
<dd>This method sends an OACK packet with the options from the current
context.</dd></dl>
<dl class="method">
<dt id="tftpy.TftpStates.TftpState.serverInitial">
<tt class="descname">serverInitial</tt><big>(</big><em>pkt</em>, <em>raddress</em>, <em>rport</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpState.serverInitial" title="Permalink to this definition"></a></dt>
<dd>This method performs initial setup for a server context transfer,
put here to refactor code out of the TftpStateServerRecvRRQ and
TftpStateServerRecvWRQ classes, since their initial setup is
identical. The method returns a boolean, sendoack, to indicate whether
it is required to send an OACK to the client.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpStates.TftpStateExpectACK">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpStateExpectACK</tt><big>(</big><em>context</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateExpectACK" title="Permalink to this definition"></a></dt>
<dd><p>This class represents the state of the transfer when a DAT was just
sent, and we are waiting for an ACK from the server. This class is the
same one used by the client during the upload, and the server during the
download.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpStateExpectACK.handle">
<tt class="descname">handle</tt><big>(</big><em>pkt</em>, <em>raddress</em>, <em>rport</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateExpectACK.handle" title="Permalink to this definition"></a></dt>
<dd>Handle a packet, hopefully an ACK since we just sent a DAT.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpStates.TftpStateExpectDAT">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpStateExpectDAT</tt><big>(</big><em>context</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateExpectDAT" title="Permalink to this definition"></a></dt>
<dd><p>Just sent an ACK packet. Waiting for DAT.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpStateExpectDAT.handle">
<tt class="descname">handle</tt><big>(</big><em>pkt</em>, <em>raddress</em>, <em>rport</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateExpectDAT.handle" title="Permalink to this definition"></a></dt>
<dd>Handle the packet in response to an ACK, which should be a DAT.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpStates.TftpStateSentRRQ">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpStateSentRRQ</tt><big>(</big><em>context</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateSentRRQ" title="Permalink to this definition"></a></dt>
<dd><p>Just sent an RRQ packet.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpStateSentRRQ.handle">
<tt class="descname">handle</tt><big>(</big><em>pkt</em>, <em>raddress</em>, <em>rport</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateSentRRQ.handle" title="Permalink to this definition"></a></dt>
<dd>Handle the packet in response to an RRQ to the server.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpStates.TftpStateSentWRQ">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpStateSentWRQ</tt><big>(</big><em>context</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateSentWRQ" title="Permalink to this definition"></a></dt>
<dd><p>Just sent an WRQ packet for an upload.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpStateSentWRQ.handle">
<tt class="descname">handle</tt><big>(</big><em>pkt</em>, <em>raddress</em>, <em>rport</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateSentWRQ.handle" title="Permalink to this definition"></a></dt>
<dd>Handle a packet we just received.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpStates.TftpStateServerRecvRRQ">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpStateServerRecvRRQ</tt><big>(</big><em>context</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateServerRecvRRQ" title="Permalink to this definition"></a></dt>
<dd><p>This class represents the state of the TFTP server when it has just
received an RRQ packet.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpStateServerRecvRRQ.handle">
<tt class="descname">handle</tt><big>(</big><em>pkt</em>, <em>raddress</em>, <em>rport</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateServerRecvRRQ.handle" title="Permalink to this definition"></a></dt>
<dd>Handle an initial RRQ packet as a server.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpStates.TftpStateServerRecvWRQ">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpStateServerRecvWRQ</tt><big>(</big><em>context</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateServerRecvWRQ" title="Permalink to this definition"></a></dt>
<dd><p>This class represents the state of the TFTP server when it has just
received a WRQ packet.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpStateServerRecvWRQ.handle">
<tt class="descname">handle</tt><big>(</big><em>pkt</em>, <em>raddress</em>, <em>rport</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateServerRecvWRQ.handle" title="Permalink to this definition"></a></dt>
<dd>Handle an initial WRQ packet as a server.</dd></dl>
</dd></dl>
<dl class="class">
<dt id="tftpy.TftpStates.TftpStateServerStart">
<em class="property">class </em><tt class="descclassname">tftpy.TftpStates.</tt><tt class="descname">TftpStateServerStart</tt><big>(</big><em>context</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateServerStart" title="Permalink to this definition"></a></dt>
<dd><p>The start state for the server. This is a transitory state since at
this point we don&#8217;t know if we&#8217;re handling an upload or a download. We
will commit to one of them once we interpret the initial packet.</p>
<dl class="method">
<dt id="tftpy.TftpStates.TftpStateServerStart.handle">
<tt class="descname">handle</tt><big>(</big><em>pkt</em>, <em>raddress</em>, <em>rport</em><big>)</big><a class="headerlink" href="#tftpy.TftpStates.TftpStateServerStart.handle" title="Permalink to this definition"></a></dt>
<dd>Handle a packet we just received.</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="#">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">Welcome to TFTPy&#8217;s documentation!</a><ul>
</ul>
</li>
<li><a class="reference external" href="#indices-and-tables">Indices and tables</a></li>
<li><a class="reference external" href="#api-documentation">API Documentation</a><ul>
<li><a class="reference external" href="#module-tftpy">TFTPy Module</a></li>
<li><a class="reference external" href="#module-tftpy.TftpClient">tftpy.TftpClient</a></li>
<li><a class="reference external" href="#module-tftpy.TftpPacketFactory">tftpy.TftpPacketFactory</a></li>
<li><a class="reference external" href="#module-tftpy.TftpPacketTypes">tftpy.TftpPacketTypes</a></li>
<li><a class="reference external" href="#module-tftpy.TftpServer">tftpy.TftpServer</a></li>
<li><a class="reference external" href="#module-tftpy.TftpShared">tftpy.TftpShared</a></li>
<li><a class="reference external" href="#module-tftpy.TftpStates">tftpy.TftpStates</a></li>
</ul>
</li>
</ul>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.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" size="18" />
<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="modindex.html" title="Global Module Index"
>modules</a> |</li>
<li><a href="#">TFTPy v0.5.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2010, Michael P. Soulier.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

124
html/sphinx/modindex.html Normal file
View File

@ -0,0 +1,124 @@
<!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>Global Module Index &mdash; TFTPy v0.5.1 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '#',
VERSION: '0.5.1',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="TFTPy v0.5.1 documentation" 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="#" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li><a href="index.html">TFTPy v0.5.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<h1 id="global-module-index">Global Module Index</h1>
<a href="#cap-T"><strong>T</strong></a>
<hr/>
<table width="100%" class="indextable" cellspacing="0" cellpadding="2"><tr class="pcap"><td></td><td>&nbsp;</td><td></td></tr>
<tr class="cap"><td></td><td><a name="cap-T"><strong>T</strong></a></td><td></td></tr><tr>
<td><img src="_static/minus.png" id="toggle-1"
class="toggler" style="display: none" alt="-" /></td>
<td>
<a href="index.html#module-tftpy"><tt class="xref">tftpy</tt></a></td><td>
<em></em></td></tr><tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;
<a href="index.html#module-tftpy.TftpClient"><tt class="xref">tftpy.TftpClient</tt></a></td><td>
<em></em></td></tr><tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;
<a href="index.html#module-tftpy.TftpPacketFactory"><tt class="xref">tftpy.TftpPacketFactory</tt></a></td><td>
<em></em></td></tr><tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;
<a href="index.html#module-tftpy.TftpPacketTypes"><tt class="xref">tftpy.TftpPacketTypes</tt></a></td><td>
<em></em></td></tr><tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;
<a href="index.html#module-tftpy.TftpServer"><tt class="xref">tftpy.TftpServer</tt></a></td><td>
<em></em></td></tr><tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;
<a href="index.html#module-tftpy.TftpShared"><tt class="xref">tftpy.TftpShared</tt></a></td><td>
<em></em></td></tr><tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;
<a href="index.html#module-tftpy.TftpStates"><tt class="xref">tftpy.TftpStates</tt></a></td><td>
<em></em></td></tr>
</table>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<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="#" title="Global Module Index"
>modules</a> |</li>
<li><a href="index.html">TFTPy v0.5.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2010, Michael P. Soulier.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

81
html/sphinx/objects.inv Normal file
View File

@ -0,0 +1,81 @@
# Sphinx inventory version 1
# Project: TFTPy
# Version: 0.5
tftpy.TftpServer mod index.html
tftpy mod index.html
tftpy.TftpShared mod index.html
tftpy.TftpPacketTypes mod index.html
tftpy.TftpStates mod index.html
tftpy.TftpClient mod index.html
tftpy.TftpPacketFactory mod index.html
tftpy.TftpStates.TftpContext.checkTimeout method index.html
tftpy.TftpShared.TftpException exception index.html
tftpy.TftpClient.TftpClient.upload method index.html
tftpy.TftpPacketFactory.TftpPacketFactory class index.html
tftpy.TftpStates.TftpMetrics.add_dup method index.html
tftpy.TftpStates.TftpState.sendACK method index.html
tftpy.TftpStates.TftpState.handleDat method index.html
tftpy.TftpStates.TftpContextClientDownload.start method index.html
tftpy.TftpPacketTypes.TftpPacketOACK.match_options method index.html
tftpy.TftpStates.TftpStateSentWRQ.handle method index.html
tftpy.TftpStates.TftpContextServer class index.html
tftpy.TftpStates.TftpContext.sethost method index.html
tftpy.TftpStates.TftpContext.host attribute index.html
tftpy.TftpStates.TftpContext.cycle method index.html
tftpy.TftpPacketTypes.TftpPacketERR.decode method index.html
tftpy.TftpPacketTypes.TftpPacketDAT.encode method index.html
tftpy.TftpStates.TftpContext.gethost method index.html
tftpy.TftpPacketTypes.TftpPacketWithOptions.decode_options method index.html
tftpy.TftpShared.TftpErrors class index.html
tftpy.TftpPacketTypes.TftpPacket class index.html
tftpy.TftpStates.TftpContext class index.html
tftpy.TftpPacketTypes.TftpPacketInitial class index.html
tftpy.TftpPacketTypes.TftpPacketRRQ class index.html
tftpy.TftpPacketTypes.TftpPacket.encode method index.html
tftpy.TftpStates.TftpContextServer.start method index.html
tftpy.TftpStates.TftpState.sendOACK method index.html
tftpy.TftpStates.TftpStateExpectACK.handle method index.html
tftpy.TftpStates.TftpStateSentRRQ.handle method index.html
tftpy.TftpServer.TftpServer class index.html
tftpy.TftpPacketTypes.TftpPacketDAT.decode method index.html
tftpy.TftpStates.TftpMetrics class index.html
tftpy.TftpStates.TftpState.handle method index.html
tftpy.TftpStates.TftpStateServerRecvRRQ class index.html
tftpy.TftpServer.TftpServer.listen method index.html
tftpy.TftpPacketTypes.TftpPacketWRQ class index.html
tftpy.TftpStates.TftpStateExpectDAT class index.html
tftpy.TftpStates.TftpState.returnSupportedOptions method index.html
tftpy.TftpShared.setLogLevel function index.html
tftpy.TftpStates.TftpStateExpectACK class index.html
tftpy.TftpPacketTypes.TftpPacketACK class index.html
tftpy.TftpStates.TftpState.sendDAT method index.html
tftpy.TftpStates.TftpContextServer.end method index.html
tftpy.TftpStates.TftpStateSentRRQ class index.html
tftpy.TftpPacketFactory.TftpPacketFactory.parse method index.html
tftpy.TftpStates.TftpStateServerRecvWRQ class index.html
tftpy.TftpClient.TftpClient class index.html
tftpy.TftpStates.TftpStateServerRecvWRQ.handle method index.html
tftpy.TftpStates.TftpContextClientUpload.end method index.html
tftpy.TftpStates.TftpState.sendError method index.html
tftpy.TftpShared.tftpassert function index.html
tftpy.TftpStates.TftpState class index.html
tftpy.TftpStates.TftpState.handleOACK method index.html
tftpy.TftpClient.TftpClient.download method index.html
tftpy.TftpStates.TftpStateServerStart class index.html
tftpy.TftpPacketTypes.TftpSession class index.html
tftpy.TftpStates.TftpStateSentWRQ class index.html
tftpy.TftpStates.TftpContextClientUpload class index.html
tftpy.TftpStates.TftpStateServerStart.handle method index.html
tftpy.TftpPacketTypes.TftpPacket.decode method index.html
tftpy.TftpStates.TftpStateServerRecvRRQ.handle method index.html
tftpy.TftpStates.TftpState.serverInitial method index.html
tftpy.TftpPacketTypes.TftpPacketERR class index.html
tftpy.TftpStates.TftpContext.end method index.html
tftpy.TftpStates.TftpStateExpectDAT.handle method index.html
tftpy.TftpPacketTypes.TftpPacketERR.encode method index.html
tftpy.TftpPacketTypes.TftpPacketInitial.encode method index.html
tftpy.TftpStates.TftpContextClientDownload class index.html
tftpy.TftpPacketTypes.TftpPacketWithOptions class index.html
tftpy.TftpStates.TftpContextClientDownload.end method index.html
tftpy.TftpPacketTypes.TftpPacketDAT class index.html
tftpy.TftpPacketTypes.TftpPacketOACK class index.html

97
html/sphinx/search.html Normal file
View File

@ -0,0 +1,97 @@
<!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>Search &mdash; TFTPy v0.5.1 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '#',
VERSION: '0.5.1',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/searchtools.js"></script>
<link rel="top" title="TFTPy v0.5.1 documentation" 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="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li><a href="index.html">TFTPy v0.5.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<h1 id="search-documentation">Search</h1>
<div id="fallback" class="admonition warning">
<script type="text/javascript">$('#fallback').hide();</script>
<p>
Please activate JavaScript to enable the search
functionality.
</p>
</div>
<p>
From here you can search these documents. Enter your search
words into the box below and click "search". Note that the search
function will automatically search for all of the words. Pages
containing fewer words won't appear in the result list.
</p>
<form action="" method="get">
<input type="text" name="q" value="" />
<input type="submit" value="search" />
<span id="search-progress" style="padding-left: 10px"></span>
</form>
<div id="search-results">
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
</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="modindex.html" title="Global Module Index"
>modules</a> |</li>
<li><a href="index.html">TFTPy v0.5.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2010, Michael P. Soulier.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
<script type="text/javascript" src="searchindex.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -1,272 +0,0 @@
tftpy tftpy-module.html
tftpy.verlist tftpy-module.html#verlist
tftpy.TftpClient' tftpy.TftpClient%27-module.html
tftpy.TftpClient'.MAX_BLKSIZE tftpy.TftpClient%27-module.html#MAX_BLKSIZE
tftpy.TftpClient'.TIMEOUT_RETRIES tftpy.TftpClient%27-module.html#TIMEOUT_RETRIES
tftpy.TftpClient'.LOG_LEVEL tftpy.TftpClient%27-module.html#LOG_LEVEL
tftpy.TftpClient'.log tftpy.TftpClient%27-module.html#log
tftpy.TftpClient'.DEF_TFTP_PORT tftpy.TftpClient%27-module.html#DEF_TFTP_PORT
tftpy.TftpClient'.MAX_DUPS tftpy.TftpClient%27-module.html#MAX_DUPS
tftpy.TftpClient'.MIN_BLKSIZE tftpy.TftpClient%27-module.html#MIN_BLKSIZE
tftpy.TftpClient'.SOCK_TIMEOUT tftpy.TftpClient%27-module.html#SOCK_TIMEOUT
tftpy.TftpClient'.DEF_BLKSIZE tftpy.TftpClient%27-module.html#DEF_BLKSIZE
tftpy.TftpPacketFactory' tftpy.TftpPacketFactory%27-module.html
tftpy.TftpPacketFactory'.MAX_BLKSIZE tftpy.TftpPacketFactory%27-module.html#MAX_BLKSIZE
tftpy.TftpPacketFactory'.MAX_DUPS tftpy.TftpPacketFactory%27-module.html#MAX_DUPS
tftpy.TftpPacketFactory'.TIMEOUT_RETRIES tftpy.TftpPacketFactory%27-module.html#TIMEOUT_RETRIES
tftpy.TftpPacketFactory'.LOG_LEVEL tftpy.TftpPacketFactory%27-module.html#LOG_LEVEL
tftpy.TftpPacketFactory'.log tftpy.TftpPacketFactory%27-module.html#log
tftpy.TftpPacketFactory'.DEF_TFTP_PORT tftpy.TftpPacketFactory%27-module.html#DEF_TFTP_PORT
tftpy.TftpPacketFactory'.MIN_BLKSIZE tftpy.TftpPacketFactory%27-module.html#MIN_BLKSIZE
tftpy.TftpPacketFactory'.SOCK_TIMEOUT tftpy.TftpPacketFactory%27-module.html#SOCK_TIMEOUT
tftpy.TftpPacketFactory'.DEF_BLKSIZE tftpy.TftpPacketFactory%27-module.html#DEF_BLKSIZE
tftpy.TftpPacketTypes tftpy.TftpPacketTypes-module.html
tftpy.TftpPacketTypes.tftpassert tftpy.TftpShared-module.html#tftpassert
tftpy.TftpPacketTypes.setLogLevel tftpy.TftpShared-module.html#setLogLevel
tftpy.TftpServer' tftpy.TftpServer%27-module.html
tftpy.TftpServer'.MAX_BLKSIZE tftpy.TftpServer%27-module.html#MAX_BLKSIZE
tftpy.TftpServer'.TIMEOUT_RETRIES tftpy.TftpServer%27-module.html#TIMEOUT_RETRIES
tftpy.TftpServer'.LOG_LEVEL tftpy.TftpServer%27-module.html#LOG_LEVEL
tftpy.TftpServer'.log tftpy.TftpServer%27-module.html#log
tftpy.TftpServer'.DEF_TFTP_PORT tftpy.TftpServer%27-module.html#DEF_TFTP_PORT
tftpy.TftpServer'.MAX_DUPS tftpy.TftpServer%27-module.html#MAX_DUPS
tftpy.TftpServer'.MIN_BLKSIZE tftpy.TftpServer%27-module.html#MIN_BLKSIZE
tftpy.TftpServer'.SOCK_TIMEOUT tftpy.TftpServer%27-module.html#SOCK_TIMEOUT
tftpy.TftpServer'.DEF_BLKSIZE tftpy.TftpServer%27-module.html#DEF_BLKSIZE
tftpy.TftpShared tftpy.TftpShared-module.html
tftpy.TftpShared.DEF_BLKSIZE tftpy.TftpShared-module.html#DEF_BLKSIZE
tftpy.TftpShared.MAX_BLKSIZE tftpy.TftpShared-module.html#MAX_BLKSIZE
tftpy.TftpShared.setLogLevel tftpy.TftpShared-module.html#setLogLevel
tftpy.TftpShared.MIN_BLKSIZE tftpy.TftpShared-module.html#MIN_BLKSIZE
tftpy.TftpShared.log tftpy.TftpShared-module.html#log
tftpy.TftpShared.tftpassert tftpy.TftpShared-module.html#tftpassert
tftpy.TftpShared.MAX_DUPS tftpy.TftpShared-module.html#MAX_DUPS
tftpy.TftpShared.TIMEOUT_RETRIES tftpy.TftpShared-module.html#TIMEOUT_RETRIES
tftpy.TftpShared.SOCK_TIMEOUT tftpy.TftpShared-module.html#SOCK_TIMEOUT
tftpy.TftpShared.LOG_LEVEL tftpy.TftpShared-module.html#LOG_LEVEL
tftpy.TftpShared.DEF_TFTP_PORT tftpy.TftpShared-module.html#DEF_TFTP_PORT
tftpy.TftpStates tftpy.TftpStates-module.html
tftpy.TftpClient'.TftpClient tftpy.TftpClient%27.TftpClient-class.html
tftpy.TftpClient'.TftpClient.upload tftpy.TftpClient%27.TftpClient-class.html#upload
tftpy.TftpClient'.TftpClient.download tftpy.TftpClient%27.TftpClient-class.html#download
tftpy.TftpClient'.TftpClient.__init__ tftpy.TftpClient%27.TftpClient-class.html#__init__
tftpy.TftpPacketFactory'.TftpPacketFactory tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html
tftpy.TftpPacketFactory'.TftpPacketFactory.parse tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html#parse
tftpy.TftpPacketFactory'.TftpPacketFactory.__create tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html#__create
tftpy.TftpPacketFactory'.TftpPacketFactory.__init__ tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html#__init__
tftpy.TftpPacketTypes.TftpPacket tftpy.TftpPacketTypes.TftpPacket-class.html
tftpy.TftpPacketTypes.TftpPacket.decode tftpy.TftpPacketTypes.TftpPacket-class.html#decode
tftpy.TftpPacketTypes.TftpPacket.encode tftpy.TftpPacketTypes.TftpPacket-class.html#encode
tftpy.TftpPacketTypes.TftpPacket.__init__ tftpy.TftpPacketTypes.TftpPacket-class.html#__init__
tftpy.TftpPacketTypes.TftpPacketACK tftpy.TftpPacketTypes.TftpPacketACK-class.html
tftpy.TftpPacketTypes.TftpPacketACK.__str__ tftpy.TftpPacketTypes.TftpPacketACK-class.html#__str__
tftpy.TftpPacketTypes.TftpPacketACK.decode tftpy.TftpPacketTypes.TftpPacketACK-class.html#decode
tftpy.TftpPacketTypes.TftpPacketACK.encode tftpy.TftpPacketTypes.TftpPacketACK-class.html#encode
tftpy.TftpPacketTypes.TftpPacketACK.__init__ tftpy.TftpPacketTypes.TftpPacketACK-class.html#__init__
tftpy.TftpPacketTypes.TftpPacketDAT tftpy.TftpPacketTypes.TftpPacketDAT-class.html
tftpy.TftpPacketTypes.TftpPacketDAT.__str__ tftpy.TftpPacketTypes.TftpPacketDAT-class.html#__str__
tftpy.TftpPacketTypes.TftpPacketDAT.decode tftpy.TftpPacketTypes.TftpPacketDAT-class.html#decode
tftpy.TftpPacketTypes.TftpPacketDAT.encode tftpy.TftpPacketTypes.TftpPacketDAT-class.html#encode
tftpy.TftpPacketTypes.TftpPacketDAT.__init__ tftpy.TftpPacketTypes.TftpPacketDAT-class.html#__init__
tftpy.TftpPacketTypes.TftpPacketERR tftpy.TftpPacketTypes.TftpPacketERR-class.html
tftpy.TftpPacketTypes.TftpPacketERR.__str__ tftpy.TftpPacketTypes.TftpPacketERR-class.html#__str__
tftpy.TftpPacketTypes.TftpPacketERR.decode tftpy.TftpPacketTypes.TftpPacketERR-class.html#decode
tftpy.TftpPacketTypes.TftpPacketERR.encode tftpy.TftpPacketTypes.TftpPacketERR-class.html#encode
tftpy.TftpPacketTypes.TftpPacketERR.__init__ tftpy.TftpPacketTypes.TftpPacketERR-class.html#__init__
tftpy.TftpPacketTypes.TftpPacketInitial tftpy.TftpPacketTypes.TftpPacketInitial-class.html
tftpy.TftpPacketTypes.TftpPacketWithOptions.setoptions tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions
tftpy.TftpPacketTypes.TftpPacketWithOptions.decode_options tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options
tftpy.TftpPacketTypes.TftpPacketInitial.decode tftpy.TftpPacketTypes.TftpPacketInitial-class.html#decode
tftpy.TftpPacketTypes.TftpPacketInitial.encode tftpy.TftpPacketTypes.TftpPacketInitial-class.html#encode
tftpy.TftpPacketTypes.TftpPacketWithOptions.getoptions tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions
tftpy.TftpPacketTypes.TftpPacketWithOptions.options tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options
tftpy.TftpPacketTypes.TftpPacketInitial.__init__ tftpy.TftpPacketTypes.TftpPacketInitial-class.html#__init__
tftpy.TftpPacketTypes.TftpPacketOACK tftpy.TftpPacketTypes.TftpPacketOACK-class.html
tftpy.TftpPacketTypes.TftpPacketWithOptions.setoptions tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions
tftpy.TftpPacketTypes.TftpPacketOACK.__str__ tftpy.TftpPacketTypes.TftpPacketOACK-class.html#__str__
tftpy.TftpPacketTypes.TftpPacketWithOptions.decode_options tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options
tftpy.TftpPacketTypes.TftpPacketOACK.decode tftpy.TftpPacketTypes.TftpPacketOACK-class.html#decode
tftpy.TftpPacketTypes.TftpPacketOACK.match_options tftpy.TftpPacketTypes.TftpPacketOACK-class.html#match_options
tftpy.TftpPacketTypes.TftpPacketOACK.encode tftpy.TftpPacketTypes.TftpPacketOACK-class.html#encode
tftpy.TftpPacketTypes.TftpPacketWithOptions.getoptions tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions
tftpy.TftpPacketTypes.TftpPacketWithOptions.options tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options
tftpy.TftpPacketTypes.TftpPacketOACK.__init__ tftpy.TftpPacketTypes.TftpPacketOACK-class.html#__init__
tftpy.TftpPacketTypes.TftpPacketRRQ tftpy.TftpPacketTypes.TftpPacketRRQ-class.html
tftpy.TftpPacketTypes.TftpPacketWithOptions.setoptions tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions
tftpy.TftpPacketTypes.TftpPacketRRQ.__str__ tftpy.TftpPacketTypes.TftpPacketRRQ-class.html#__str__
tftpy.TftpPacketTypes.TftpPacketWithOptions.decode_options tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options
tftpy.TftpPacketTypes.TftpPacketInitial.decode tftpy.TftpPacketTypes.TftpPacketInitial-class.html#decode
tftpy.TftpPacketTypes.TftpPacketInitial.encode tftpy.TftpPacketTypes.TftpPacketInitial-class.html#encode
tftpy.TftpPacketTypes.TftpPacketWithOptions.getoptions tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions
tftpy.TftpPacketTypes.TftpPacketWithOptions.options tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options
tftpy.TftpPacketTypes.TftpPacketRRQ.__init__ tftpy.TftpPacketTypes.TftpPacketRRQ-class.html#__init__
tftpy.TftpPacketTypes.TftpPacketWRQ tftpy.TftpPacketTypes.TftpPacketWRQ-class.html
tftpy.TftpPacketTypes.TftpPacketWithOptions.setoptions tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions
tftpy.TftpPacketTypes.TftpPacketWRQ.__str__ tftpy.TftpPacketTypes.TftpPacketWRQ-class.html#__str__
tftpy.TftpPacketTypes.TftpPacketWithOptions.decode_options tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options
tftpy.TftpPacketTypes.TftpPacketInitial.decode tftpy.TftpPacketTypes.TftpPacketInitial-class.html#decode
tftpy.TftpPacketTypes.TftpPacketInitial.encode tftpy.TftpPacketTypes.TftpPacketInitial-class.html#encode
tftpy.TftpPacketTypes.TftpPacketWithOptions.getoptions tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions
tftpy.TftpPacketTypes.TftpPacketWithOptions.options tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options
tftpy.TftpPacketTypes.TftpPacketWRQ.__init__ tftpy.TftpPacketTypes.TftpPacketWRQ-class.html#__init__
tftpy.TftpPacketTypes.TftpPacketWithOptions tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html
tftpy.TftpPacketTypes.TftpPacketWithOptions.decode_options tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options
tftpy.TftpPacketTypes.TftpPacketWithOptions.setoptions tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions
tftpy.TftpPacketTypes.TftpPacketWithOptions.getoptions tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions
tftpy.TftpPacketTypes.TftpPacketWithOptions.options tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options
tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__ tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#__init__
tftpy.TftpPacketTypes.TftpSession tftpy.TftpPacketTypes.TftpSession-class.html
tftpy.TftpServer'.TftpServer tftpy.TftpServer%27.TftpServer-class.html
tftpy.TftpServer'.TftpServer.__init__ tftpy.TftpServer%27.TftpServer-class.html#__init__
tftpy.TftpServer'.TftpServer.listen tftpy.TftpServer%27.TftpServer-class.html#listen
tftpy.TftpShared.TftpErrors tftpy.TftpShared.TftpErrors-class.html
tftpy.TftpShared.TftpErrors.IllegalTftpOp tftpy.TftpShared.TftpErrors-class.html#IllegalTftpOp
tftpy.TftpShared.TftpErrors.DiskFull tftpy.TftpShared.TftpErrors-class.html#DiskFull
tftpy.TftpShared.TftpErrors.UnknownTID tftpy.TftpShared.TftpErrors-class.html#UnknownTID
tftpy.TftpShared.TftpErrors.FileAlreadyExists tftpy.TftpShared.TftpErrors-class.html#FileAlreadyExists
tftpy.TftpShared.TftpErrors.NoSuchUser tftpy.TftpShared.TftpErrors-class.html#NoSuchUser
tftpy.TftpShared.TftpErrors.FailedNegotiation tftpy.TftpShared.TftpErrors-class.html#FailedNegotiation
tftpy.TftpShared.TftpErrors.NotDefined tftpy.TftpShared.TftpErrors-class.html#NotDefined
tftpy.TftpShared.TftpErrors.AccessViolation tftpy.TftpShared.TftpErrors-class.html#AccessViolation
tftpy.TftpShared.TftpErrors.FileNotFound tftpy.TftpShared.TftpErrors-class.html#FileNotFound
tftpy.TftpShared.TftpException tftpy.TftpShared.TftpException-class.html
tftpy.TftpStates.TftpContext tftpy.TftpStates.TftpContext-class.html
tftpy.TftpStates.TftpContext.end tftpy.TftpStates.TftpContext-class.html#end
tftpy.TftpStates.TftpContext.checkTimeout tftpy.TftpStates.TftpContext-class.html#checkTimeout
tftpy.TftpStates.TftpContext.sethost tftpy.TftpStates.TftpContext-class.html#sethost
tftpy.TftpStates.TftpContext.setNextBlock tftpy.TftpStates.TftpContext-class.html#setNextBlock
tftpy.TftpStates.TftpContext.start tftpy.TftpStates.TftpContext-class.html#start
tftpy.TftpStates.TftpContext.host tftpy.TftpStates.TftpContext-class.html#host
tftpy.TftpStates.TftpContext.getNextBlock tftpy.TftpStates.TftpContext-class.html#getNextBlock
tftpy.TftpStates.TftpContext.cycle tftpy.TftpStates.TftpContext-class.html#cycle
tftpy.TftpStates.TftpContext.gethost tftpy.TftpStates.TftpContext-class.html#gethost
tftpy.TftpStates.TftpContext.__init__ tftpy.TftpStates.TftpContext-class.html#__init__
tftpy.TftpStates.TftpContext.next_block tftpy.TftpStates.TftpContext-class.html#next_block
tftpy.TftpStates.TftpContextClientDownload tftpy.TftpStates.TftpContextClientDownload-class.html
tftpy.TftpStates.TftpContextClientDownload.end tftpy.TftpStates.TftpContextClientDownload-class.html#end
tftpy.TftpStates.TftpContext.checkTimeout tftpy.TftpStates.TftpContext-class.html#checkTimeout
tftpy.TftpStates.TftpContext.sethost tftpy.TftpStates.TftpContext-class.html#sethost
tftpy.TftpStates.TftpContext.setNextBlock tftpy.TftpStates.TftpContext-class.html#setNextBlock
tftpy.TftpStates.TftpContextClientDownload.start tftpy.TftpStates.TftpContextClientDownload-class.html#start
tftpy.TftpStates.TftpContext.host tftpy.TftpStates.TftpContext-class.html#host
tftpy.TftpStates.TftpContext.getNextBlock tftpy.TftpStates.TftpContext-class.html#getNextBlock
tftpy.TftpStates.TftpContext.next_block tftpy.TftpStates.TftpContext-class.html#next_block
tftpy.TftpStates.TftpContext.gethost tftpy.TftpStates.TftpContext-class.html#gethost
tftpy.TftpStates.TftpContextClientDownload.__init__ tftpy.TftpStates.TftpContextClientDownload-class.html#__init__
tftpy.TftpStates.TftpContext.cycle tftpy.TftpStates.TftpContext-class.html#cycle
tftpy.TftpStates.TftpContextClientUpload tftpy.TftpStates.TftpContextClientUpload-class.html
tftpy.TftpStates.TftpContextClientUpload.end tftpy.TftpStates.TftpContextClientUpload-class.html#end
tftpy.TftpStates.TftpContext.checkTimeout tftpy.TftpStates.TftpContext-class.html#checkTimeout
tftpy.TftpStates.TftpContext.sethost tftpy.TftpStates.TftpContext-class.html#sethost
tftpy.TftpStates.TftpContext.setNextBlock tftpy.TftpStates.TftpContext-class.html#setNextBlock
tftpy.TftpStates.TftpContextClientUpload.start tftpy.TftpStates.TftpContextClientUpload-class.html#start
tftpy.TftpStates.TftpContext.host tftpy.TftpStates.TftpContext-class.html#host
tftpy.TftpStates.TftpContext.getNextBlock tftpy.TftpStates.TftpContext-class.html#getNextBlock
tftpy.TftpStates.TftpContext.next_block tftpy.TftpStates.TftpContext-class.html#next_block
tftpy.TftpStates.TftpContext.gethost tftpy.TftpStates.TftpContext-class.html#gethost
tftpy.TftpStates.TftpContextClientUpload.__init__ tftpy.TftpStates.TftpContextClientUpload-class.html#__init__
tftpy.TftpStates.TftpContext.cycle tftpy.TftpStates.TftpContext-class.html#cycle
tftpy.TftpStates.TftpContextServer tftpy.TftpStates.TftpContextServer-class.html
tftpy.TftpStates.TftpContextServer.end tftpy.TftpStates.TftpContextServer-class.html#end
tftpy.TftpStates.TftpContext.checkTimeout tftpy.TftpStates.TftpContext-class.html#checkTimeout
tftpy.TftpStates.TftpContext.sethost tftpy.TftpStates.TftpContext-class.html#sethost
tftpy.TftpStates.TftpContext.setNextBlock tftpy.TftpStates.TftpContext-class.html#setNextBlock
tftpy.TftpStates.TftpContextServer.start tftpy.TftpStates.TftpContextServer-class.html#start
tftpy.TftpStates.TftpContext.host tftpy.TftpStates.TftpContext-class.html#host
tftpy.TftpStates.TftpContext.getNextBlock tftpy.TftpStates.TftpContext-class.html#getNextBlock
tftpy.TftpStates.TftpContext.next_block tftpy.TftpStates.TftpContext-class.html#next_block
tftpy.TftpStates.TftpContext.gethost tftpy.TftpStates.TftpContext-class.html#gethost
tftpy.TftpStates.TftpContextServer.__init__ tftpy.TftpStates.TftpContextServer-class.html#__init__
tftpy.TftpStates.TftpContext.cycle tftpy.TftpStates.TftpContext-class.html#cycle
tftpy.TftpStates.TftpMetrics tftpy.TftpStates.TftpMetrics-class.html
tftpy.TftpStates.TftpMetrics.compute tftpy.TftpStates.TftpMetrics-class.html#compute
tftpy.TftpStates.TftpMetrics.add_dup tftpy.TftpStates.TftpMetrics-class.html#add_dup
tftpy.TftpStates.TftpMetrics.__init__ tftpy.TftpStates.TftpMetrics-class.html#__init__
tftpy.TftpStates.TftpState tftpy.TftpStates.TftpState-class.html
tftpy.TftpStates.TftpState.sendError tftpy.TftpStates.TftpState-class.html#sendError
tftpy.TftpStates.TftpState.handle tftpy.TftpStates.TftpState-class.html#handle
tftpy.TftpStates.TftpState.handleOACK tftpy.TftpStates.TftpState-class.html#handleOACK
tftpy.TftpStates.TftpState.handleDat tftpy.TftpStates.TftpState-class.html#handleDat
tftpy.TftpStates.TftpState.serverInitial tftpy.TftpStates.TftpState-class.html#serverInitial
tftpy.TftpStates.TftpState.returnSupportedOptions tftpy.TftpStates.TftpState-class.html#returnSupportedOptions
tftpy.TftpStates.TftpState.sendDAT tftpy.TftpStates.TftpState-class.html#sendDAT
tftpy.TftpStates.TftpState.sendACK tftpy.TftpStates.TftpState-class.html#sendACK
tftpy.TftpStates.TftpState.sendOACK tftpy.TftpStates.TftpState-class.html#sendOACK
tftpy.TftpStates.TftpState.__init__ tftpy.TftpStates.TftpState-class.html#__init__
tftpy.TftpStates.TftpStateExpectACK tftpy.TftpStates.TftpStateExpectACK-class.html
tftpy.TftpStates.TftpState.sendError tftpy.TftpStates.TftpState-class.html#sendError
tftpy.TftpStates.TftpStateExpectACK.handle tftpy.TftpStates.TftpStateExpectACK-class.html#handle
tftpy.TftpStates.TftpState.handleOACK tftpy.TftpStates.TftpState-class.html#handleOACK
tftpy.TftpStates.TftpState.handleDat tftpy.TftpStates.TftpState-class.html#handleDat
tftpy.TftpStates.TftpState.serverInitial tftpy.TftpStates.TftpState-class.html#serverInitial
tftpy.TftpStates.TftpState.returnSupportedOptions tftpy.TftpStates.TftpState-class.html#returnSupportedOptions
tftpy.TftpStates.TftpState.__init__ tftpy.TftpStates.TftpState-class.html#__init__
tftpy.TftpStates.TftpState.sendACK tftpy.TftpStates.TftpState-class.html#sendACK
tftpy.TftpStates.TftpState.sendOACK tftpy.TftpStates.TftpState-class.html#sendOACK
tftpy.TftpStates.TftpState.sendDAT tftpy.TftpStates.TftpState-class.html#sendDAT
tftpy.TftpStates.TftpStateExpectDAT tftpy.TftpStates.TftpStateExpectDAT-class.html
tftpy.TftpStates.TftpState.sendError tftpy.TftpStates.TftpState-class.html#sendError
tftpy.TftpStates.TftpStateExpectDAT.handle tftpy.TftpStates.TftpStateExpectDAT-class.html#handle
tftpy.TftpStates.TftpState.handleOACK tftpy.TftpStates.TftpState-class.html#handleOACK
tftpy.TftpStates.TftpState.handleDat tftpy.TftpStates.TftpState-class.html#handleDat
tftpy.TftpStates.TftpState.serverInitial tftpy.TftpStates.TftpState-class.html#serverInitial
tftpy.TftpStates.TftpState.returnSupportedOptions tftpy.TftpStates.TftpState-class.html#returnSupportedOptions
tftpy.TftpStates.TftpState.__init__ tftpy.TftpStates.TftpState-class.html#__init__
tftpy.TftpStates.TftpState.sendACK tftpy.TftpStates.TftpState-class.html#sendACK
tftpy.TftpStates.TftpState.sendOACK tftpy.TftpStates.TftpState-class.html#sendOACK
tftpy.TftpStates.TftpState.sendDAT tftpy.TftpStates.TftpState-class.html#sendDAT
tftpy.TftpStates.TftpStateSentRRQ tftpy.TftpStates.TftpStateSentRRQ-class.html
tftpy.TftpStates.TftpState.sendError tftpy.TftpStates.TftpState-class.html#sendError
tftpy.TftpStates.TftpStateSentRRQ.handle tftpy.TftpStates.TftpStateSentRRQ-class.html#handle
tftpy.TftpStates.TftpState.handleOACK tftpy.TftpStates.TftpState-class.html#handleOACK
tftpy.TftpStates.TftpState.handleDat tftpy.TftpStates.TftpState-class.html#handleDat
tftpy.TftpStates.TftpState.serverInitial tftpy.TftpStates.TftpState-class.html#serverInitial
tftpy.TftpStates.TftpState.returnSupportedOptions tftpy.TftpStates.TftpState-class.html#returnSupportedOptions
tftpy.TftpStates.TftpState.__init__ tftpy.TftpStates.TftpState-class.html#__init__
tftpy.TftpStates.TftpState.sendACK tftpy.TftpStates.TftpState-class.html#sendACK
tftpy.TftpStates.TftpState.sendOACK tftpy.TftpStates.TftpState-class.html#sendOACK
tftpy.TftpStates.TftpState.sendDAT tftpy.TftpStates.TftpState-class.html#sendDAT
tftpy.TftpStates.TftpStateSentWRQ tftpy.TftpStates.TftpStateSentWRQ-class.html
tftpy.TftpStates.TftpState.sendError tftpy.TftpStates.TftpState-class.html#sendError
tftpy.TftpStates.TftpStateSentWRQ.handle tftpy.TftpStates.TftpStateSentWRQ-class.html#handle
tftpy.TftpStates.TftpState.handleOACK tftpy.TftpStates.TftpState-class.html#handleOACK
tftpy.TftpStates.TftpState.handleDat tftpy.TftpStates.TftpState-class.html#handleDat
tftpy.TftpStates.TftpState.serverInitial tftpy.TftpStates.TftpState-class.html#serverInitial
tftpy.TftpStates.TftpState.returnSupportedOptions tftpy.TftpStates.TftpState-class.html#returnSupportedOptions
tftpy.TftpStates.TftpState.__init__ tftpy.TftpStates.TftpState-class.html#__init__
tftpy.TftpStates.TftpState.sendACK tftpy.TftpStates.TftpState-class.html#sendACK
tftpy.TftpStates.TftpState.sendOACK tftpy.TftpStates.TftpState-class.html#sendOACK
tftpy.TftpStates.TftpState.sendDAT tftpy.TftpStates.TftpState-class.html#sendDAT
tftpy.TftpStates.TftpStateServerRecvRRQ tftpy.TftpStates.TftpStateServerRecvRRQ-class.html
tftpy.TftpStates.TftpState.sendError tftpy.TftpStates.TftpState-class.html#sendError
tftpy.TftpStates.TftpStateServerRecvRRQ.handle tftpy.TftpStates.TftpStateServerRecvRRQ-class.html#handle
tftpy.TftpStates.TftpState.handleOACK tftpy.TftpStates.TftpState-class.html#handleOACK
tftpy.TftpStates.TftpState.handleDat tftpy.TftpStates.TftpState-class.html#handleDat
tftpy.TftpStates.TftpState.serverInitial tftpy.TftpStates.TftpState-class.html#serverInitial
tftpy.TftpStates.TftpState.returnSupportedOptions tftpy.TftpStates.TftpState-class.html#returnSupportedOptions
tftpy.TftpStates.TftpState.__init__ tftpy.TftpStates.TftpState-class.html#__init__
tftpy.TftpStates.TftpState.sendACK tftpy.TftpStates.TftpState-class.html#sendACK
tftpy.TftpStates.TftpState.sendOACK tftpy.TftpStates.TftpState-class.html#sendOACK
tftpy.TftpStates.TftpState.sendDAT tftpy.TftpStates.TftpState-class.html#sendDAT
tftpy.TftpStates.TftpStateServerRecvWRQ tftpy.TftpStates.TftpStateServerRecvWRQ-class.html
tftpy.TftpStates.TftpState.sendError tftpy.TftpStates.TftpState-class.html#sendError
tftpy.TftpStates.TftpStateServerRecvWRQ.handle tftpy.TftpStates.TftpStateServerRecvWRQ-class.html#handle
tftpy.TftpStates.TftpState.handleOACK tftpy.TftpStates.TftpState-class.html#handleOACK
tftpy.TftpStates.TftpState.handleDat tftpy.TftpStates.TftpState-class.html#handleDat
tftpy.TftpStates.TftpState.serverInitial tftpy.TftpStates.TftpState-class.html#serverInitial
tftpy.TftpStates.TftpState.returnSupportedOptions tftpy.TftpStates.TftpState-class.html#returnSupportedOptions
tftpy.TftpStates.TftpState.__init__ tftpy.TftpStates.TftpState-class.html#__init__
tftpy.TftpStates.TftpState.sendACK tftpy.TftpStates.TftpState-class.html#sendACK
tftpy.TftpStates.TftpState.sendOACK tftpy.TftpStates.TftpState-class.html#sendOACK
tftpy.TftpStates.TftpState.sendDAT tftpy.TftpStates.TftpState-class.html#sendDAT
tftpy.TftpStates.TftpStateServerStart tftpy.TftpStates.TftpStateServerStart-class.html
tftpy.TftpStates.TftpState.sendError tftpy.TftpStates.TftpState-class.html#sendError
tftpy.TftpStates.TftpStateServerStart.handle tftpy.TftpStates.TftpStateServerStart-class.html#handle
tftpy.TftpStates.TftpState.handleOACK tftpy.TftpStates.TftpState-class.html#handleOACK
tftpy.TftpStates.TftpState.handleDat tftpy.TftpStates.TftpState-class.html#handleDat
tftpy.TftpStates.TftpState.serverInitial tftpy.TftpStates.TftpState-class.html#serverInitial
tftpy.TftpStates.TftpState.returnSupportedOptions tftpy.TftpStates.TftpState-class.html#returnSupportedOptions
tftpy.TftpStates.TftpState.__init__ tftpy.TftpStates.TftpState-class.html#__init__
tftpy.TftpStates.TftpState.sendACK tftpy.TftpStates.TftpState-class.html#sendACK
tftpy.TftpStates.TftpState.sendOACK tftpy.TftpStates.TftpState-class.html#sendOACK
tftpy.TftpStates.TftpState.sendDAT tftpy.TftpStates.TftpState-class.html#sendDAT

View File

@ -1,245 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class Hierarchy</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th bgcolor="#70b0f0" class="navbar-select"
>&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">&nbsp;</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="class-tree.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<center><b>
[ <a href="module-tree.html">Module Hierarchy</a>
| <a href="class-tree.html">Class Hierarchy</a> ]
</b></center><br />
<h1 class="epydoc">Class Hierarchy</h1>
<ul class="nomargin-top">
<li> <strong class="uidlink">object</strong>:
<em class="summary">The most base type</em>
<ul>
<li> <strong class="uidlink">exceptions.BaseException</strong>:
<em class="summary">Common base class for all exceptions</em>
<ul>
<li> <strong class="uidlink">exceptions.Exception</strong>:
<em class="summary">Common base class for all non-exit exceptions.</em>
<ul>
<li> <strong class="uidlink"><a href="tftpy.TftpShared.TftpException-class.html">tftpy.TftpShared.TftpException</a></strong>:
<em class="summary">This class is the parent class of all exceptions regarding the
handling of the TFTP protocol.</em>
</li>
</ul>
</li>
</ul>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpContext-class.html">tftpy.TftpStates.TftpContext</a></strong>:
<em class="summary">The base class of the contexts.</em>
<ul>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpContextClientDownload-class.html">tftpy.TftpStates.TftpContextClientDownload</a></strong>:
<em class="summary">The download context for the client during a download.</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpContextClientUpload-class.html">tftpy.TftpStates.TftpContextClientUpload</a></strong>:
<em class="summary">The upload context for the client during an upload.</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpContextServer-class.html">tftpy.TftpStates.TftpContextServer</a></strong>:
<em class="summary">The context for the server.</em>
</li>
</ul>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpShared.TftpErrors-class.html">tftpy.TftpShared.TftpErrors</a></strong>:
<em class="summary">This class is a convenience for defining the common tftp error
codes, and making them more readable in the code.</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpMetrics-class.html">tftpy.TftpStates.TftpMetrics</a></strong>:
<em class="summary">A class representing metrics of the transfer.</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacket-class.html">tftpy.TftpPacketTypes.TftpPacket</a></strong>:
<em class="summary">This class is the parent class of all tftp packet classes.</em>
<ul>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html">tftpy.TftpPacketTypes.TftpPacketACK</a></strong>:
<em class="summary">2 bytes 2 bytes...</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html">tftpy.TftpPacketTypes.TftpPacketDAT</a></strong>:
<em class="summary">2 bytes 2 bytes n bytes...</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html">tftpy.TftpPacketTypes.TftpPacketERR</a></strong>:
<em class="summary">2 bytes 2 bytes string 1 byte
----------------------------------------
ERROR | 05 | ErrorCode | ErrMsg | 0 |
----------------------------------------
Error Codes</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">tftpy.TftpPacketTypes.TftpPacketInitial</a></strong>:
<em class="summary">This class is a common parent class for the RRQ and WRQ packets, as
they share quite a bit of code.</em>
<ul>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html">tftpy.TftpPacketTypes.TftpPacketRRQ</a></strong>:
<em class="summary">2 bytes string 1 byte string 1 byte...</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html">tftpy.TftpPacketTypes.TftpPacketWRQ</a></strong>:
<em class="summary">2 bytes string 1 byte string 1 byte...</em>
</li>
</ul>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html">tftpy.TftpPacketTypes.TftpPacketOACK</a></strong>:
<em class="summary"># +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+ #
| opc | opt1 | 0 | value1 | 0 | optN | 0 | valueN | 0 | #
+-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+</em>
</li>
</ul>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html">tftpy.TftpPacketFactory'.TftpPacketFactory</a></strong>:
<em class="summary">This class generates TftpPacket objects.</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">tftpy.TftpPacketTypes.TftpPacketWithOptions</a></strong>:
<em class="summary">This class exists to permit some TftpPacket subclasses to share
code regarding options handling.</em>
<ul>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">tftpy.TftpPacketTypes.TftpPacketInitial</a></strong>:
<em class="summary">This class is a common parent class for the RRQ and WRQ packets, as
they share quite a bit of code.</em>
<ul>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html">tftpy.TftpPacketTypes.TftpPacketRRQ</a></strong>:
<em class="summary">2 bytes string 1 byte string 1 byte...</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html">tftpy.TftpPacketTypes.TftpPacketWRQ</a></strong>:
<em class="summary">2 bytes string 1 byte string 1 byte...</em>
</li>
</ul>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html">tftpy.TftpPacketTypes.TftpPacketOACK</a></strong>:
<em class="summary"># +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+ #
| opc | opt1 | 0 | value1 | 0 | optN | 0 | valueN | 0 | #
+-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+</em>
</li>
</ul>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes.TftpSession-class.html">tftpy.TftpPacketTypes.TftpSession</a></strong>:
<em class="summary">This class is the base class for the tftp client and server.</em>
<ul>
<li> <strong class="uidlink"><a href="tftpy.TftpClient%27.TftpClient-class.html">tftpy.TftpClient'.TftpClient</a></strong>:
<em class="summary">This class is an implementation of a tftp client.</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpServer%27.TftpServer-class.html">tftpy.TftpServer'.TftpServer</a></strong>:
<em class="summary">This class implements a tftp server object.</em>
</li>
</ul>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpState-class.html">tftpy.TftpStates.TftpState</a></strong>:
<em class="summary">The base class for the states.</em>
<ul>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpStateExpectACK-class.html">tftpy.TftpStates.TftpStateExpectACK</a></strong>:
<em class="summary">This class represents the state of the transfer when a DAT was just
sent, and we are waiting for an ACK from the server.</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpStateExpectDAT-class.html">tftpy.TftpStates.TftpStateExpectDAT</a></strong>:
<em class="summary">Just sent an ACK packet.</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpStateSentRRQ-class.html">tftpy.TftpStates.TftpStateSentRRQ</a></strong>:
<em class="summary">Just sent an RRQ packet.</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpStateSentWRQ-class.html">tftpy.TftpStates.TftpStateSentWRQ</a></strong>:
<em class="summary">Just sent an WRQ packet for an upload.</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpStateServerRecvRRQ-class.html">tftpy.TftpStates.TftpStateServerRecvRRQ</a></strong>:
<em class="summary">This class represents the state of the TFTP server when it has just
received an RRQ packet.</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpStateServerRecvWRQ-class.html">tftpy.TftpStates.TftpStateServerRecvWRQ</a></strong>:
<em class="summary">This class represents the state of the TFTP server when it has just
received a WRQ packet.</em>
</li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates.TftpStateServerStart-class.html">tftpy.TftpStates.TftpStateServerStart</a></strong>:
<em class="summary">The start state for the server.</em>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th bgcolor="#70b0f0" class="navbar-select"
>&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

View File

@ -1,322 +0,0 @@
/* Epydoc CSS Stylesheet
*
* This stylesheet can be used to customize the appearance of epydoc's
* HTML output.
*
*/
/* Default Colors & Styles
* - Set the default foreground & background color with 'body'; and
* link colors with 'a:link' and 'a:visited'.
* - Use bold for decision list terms.
* - The heading styles defined here are used for headings *within*
* docstring descriptions. All headings used by epydoc itself use
* either class='epydoc' or class='toc' (CSS styles for both
* defined below).
*/
body { background: #ffffff; color: #000000; }
p { margin-top: 0.5em; margin-bottom: 0.5em; }
a:link { color: #0000ff; }
a:visited { color: #204080; }
dt { font-weight: bold; }
h1 { font-size: +140%; font-style: italic;
font-weight: bold; }
h2 { font-size: +125%; font-style: italic;
font-weight: bold; }
h3 { font-size: +110%; font-style: italic;
font-weight: normal; }
code { font-size: 100%; }
/* N.B.: class, not pseudoclass */
a.link { font-family: monospace; }
/* Page Header & Footer
* - The standard page header consists of a navigation bar (with
* pointers to standard pages such as 'home' and 'trees'); a
* breadcrumbs list, which can be used to navigate to containing
* classes or modules; options links, to show/hide private
* variables and to show/hide frames; and a page title (using
* <h1>). The page title may be followed by a link to the
* corresponding source code (using 'span.codelink').
* - The footer consists of a navigation bar, a timestamp, and a
* pointer to epydoc's homepage.
*/
h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; }
h2.epydoc { font-size: +130%; font-weight: bold; }
h3.epydoc { font-size: +115%; font-weight: bold;
margin-top: 0.2em; }
td h3.epydoc { font-size: +115%; font-weight: bold;
margin-bottom: 0; }
table.navbar { background: #a0c0ff; color: #000000;
border: 2px groove #c0d0d0; }
table.navbar table { color: #000000; }
th.navbar-select { background: #70b0ff;
color: #000000; }
table.navbar a { text-decoration: none; }
table.navbar a:link { color: #0000ff; }
table.navbar a:visited { color: #204080; }
span.breadcrumbs { font-size: 85%; font-weight: bold; }
span.options { font-size: 70%; }
span.codelink { font-size: 85%; }
td.footer { font-size: 85%; }
/* Table Headers
* - Each summary table and details section begins with a 'header'
* row. This row contains a section title (marked by
* 'span.table-header') as well as a show/hide private link
* (marked by 'span.options', defined above).
* - Summary tables that contain user-defined groups mark those
* groups using 'group header' rows.
*/
td.table-header { background: #70b0ff; color: #000000;
border: 1px solid #608090; }
td.table-header table { color: #000000; }
td.table-header table a:link { color: #0000ff; }
td.table-header table a:visited { color: #204080; }
span.table-header { font-size: 120%; font-weight: bold; }
th.group-header { background: #c0e0f8; color: #000000;
text-align: left; font-style: italic;
font-size: 115%;
border: 1px solid #608090; }
/* Summary Tables (functions, variables, etc)
* - Each object is described by a single row of the table with
* two cells. The left cell gives the object's type, and is
* marked with 'code.summary-type'. The right cell gives the
* object's name and a summary description.
* - CSS styles for the table's header and group headers are
* defined above, under 'Table Headers'
*/
table.summary { border-collapse: collapse;
background: #e8f0f8; color: #000000;
border: 1px solid #608090;
margin-bottom: 0.5em; }
td.summary { border: 1px solid #608090; }
code.summary-type { font-size: 85%; }
table.summary a:link { color: #0000ff; }
table.summary a:visited { color: #204080; }
/* Details Tables (functions, variables, etc)
* - Each object is described in its own div.
* - A single-row summary table w/ table-header is used as
* a header for each details section (CSS style for table-header
* is defined above, under 'Table Headers').
*/
table.details { border-collapse: collapse;
background: #e8f0f8; color: #000000;
border: 1px solid #608090;
margin: .2em 0 0 0; }
table.details table { color: #000000; }
table.details a:link { color: #0000ff; }
table.details a:visited { color: #204080; }
/* Fields */
dl.fields { margin-left: 2em; margin-top: 1em;
margin-bottom: 1em; }
dl.fields dd ul { margin-left: 0em; padding-left: 0em; }
dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; }
div.fields { margin-left: 2em; }
div.fields p { margin-bottom: 0.5em; }
/* Index tables (identifier index, term index, etc)
* - link-index is used for indices containing lists of links
* (namely, the identifier index & term index).
* - index-where is used in link indices for the text indicating
* the container/source for each link.
* - metadata-index is used for indices containing metadata
* extracted from fields (namely, the bug index & todo index).
*/
table.link-index { border-collapse: collapse;
background: #e8f0f8; color: #000000;
border: 1px solid #608090; }
td.link-index { border-width: 0px; }
table.link-index a:link { color: #0000ff; }
table.link-index a:visited { color: #204080; }
span.index-where { font-size: 70%; }
table.metadata-index { border-collapse: collapse;
background: #e8f0f8; color: #000000;
border: 1px solid #608090;
margin: .2em 0 0 0; }
td.metadata-index { border-width: 1px; border-style: solid; }
table.metadata-index a:link { color: #0000ff; }
table.metadata-index a:visited { color: #204080; }
/* Function signatures
* - sig* is used for the signature in the details section.
* - .summary-sig* is used for the signature in the summary
* table, and when listing property accessor functions.
* */
.sig-name { color: #006080; }
.sig-arg { color: #008060; }
.sig-default { color: #602000; }
.summary-sig { font-family: monospace; }
.summary-sig-name { color: #006080; font-weight: bold; }
table.summary a.summary-sig-name:link
{ color: #006080; font-weight: bold; }
table.summary a.summary-sig-name:visited
{ color: #006080; font-weight: bold; }
.summary-sig-arg { color: #006040; }
.summary-sig-default { color: #501800; }
/* Subclass list
*/
ul.subclass-list { display: inline; }
ul.subclass-list li { display: inline; }
/* To render variables, classes etc. like functions */
table.summary .summary-name { color: #006080; font-weight: bold;
font-family: monospace; }
table.summary
a.summary-name:link { color: #006080; font-weight: bold;
font-family: monospace; }
table.summary
a.summary-name:visited { color: #006080; font-weight: bold;
font-family: monospace; }
/* Variable values
* - In the 'variable details' sections, each varaible's value is
* listed in a 'pre.variable' box. The width of this box is
* restricted to 80 chars; if the value's repr is longer than
* this it will be wrapped, using a backslash marked with
* class 'variable-linewrap'. If the value's repr is longer
* than 3 lines, the rest will be ellided; and an ellipsis
* marker ('...' marked with 'variable-ellipsis') will be used.
* - If the value is a string, its quote marks will be marked
* with 'variable-quote'.
* - If the variable is a regexp, it is syntax-highlighted using
* the re* CSS classes.
*/
pre.variable { padding: .5em; margin: 0;
background: #dce4ec; color: #000000;
border: 1px solid #708890; }
.variable-linewrap { color: #604000; font-weight: bold; }
.variable-ellipsis { color: #604000; font-weight: bold; }
.variable-quote { color: #604000; font-weight: bold; }
.variable-group { color: #008000; font-weight: bold; }
.variable-op { color: #604000; font-weight: bold; }
.variable-string { color: #006030; }
.variable-unknown { color: #a00000; font-weight: bold; }
.re { color: #000000; }
.re-char { color: #006030; }
.re-op { color: #600000; }
.re-group { color: #003060; }
.re-ref { color: #404040; }
/* Base tree
* - Used by class pages to display the base class hierarchy.
*/
pre.base-tree { font-size: 80%; margin: 0; }
/* Frames-based table of contents headers
* - Consists of two frames: one for selecting modules; and
* the other listing the contents of the selected module.
* - h1.toc is used for each frame's heading
* - h2.toc is used for subheadings within each frame.
*/
h1.toc { text-align: center; font-size: 105%;
margin: 0; font-weight: bold;
padding: 0; }
h2.toc { font-size: 100%; font-weight: bold;
margin: 0.5em 0 0 -0.3em; }
/* Syntax Highlighting for Source Code
* - doctest examples are displayed in a 'pre.py-doctest' block.
* If the example is in a details table entry, then it will use
* the colors specified by the 'table pre.py-doctest' line.
* - Source code listings are displayed in a 'pre.py-src' block.
* Each line is marked with 'span.py-line' (used to draw a line
* down the left margin, separating the code from the line
* numbers). Line numbers are displayed with 'span.py-lineno'.
* The expand/collapse block toggle button is displayed with
* 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not
* modify the font size of the text.)
* - If a source code page is opened with an anchor, then the
* corresponding code block will be highlighted. The code
* block's header is highlighted with 'py-highlight-hdr'; and
* the code block's body is highlighted with 'py-highlight'.
* - The remaining py-* classes are used to perform syntax
* highlighting (py-string for string literals, py-name for names,
* etc.)
*/
pre.py-doctest { padding: .5em; margin: 1em;
background: #e8f0f8; color: #000000;
border: 1px solid #708890; }
table pre.py-doctest { background: #dce4ec;
color: #000000; }
pre.py-src { border: 2px solid #000000;
background: #f0f0f0; color: #000000; }
.py-line { border-left: 2px solid #000000;
margin-left: .2em; padding-left: .4em; }
.py-lineno { font-style: italic; font-size: 90%;
padding-left: .5em; }
a.py-toggle { text-decoration: none; }
div.py-highlight-hdr { border-top: 2px solid #000000;
border-bottom: 2px solid #000000;
background: #d8e8e8; }
div.py-highlight { border-bottom: 2px solid #000000;
background: #d0e0e0; }
.py-prompt { color: #005050; font-weight: bold;}
.py-more { color: #005050; font-weight: bold;}
.py-string { color: #006030; }
.py-comment { color: #003060; }
.py-keyword { color: #600000; }
.py-output { color: #404040; }
.py-name { color: #000050; }
.py-name:link { color: #000050 !important; }
.py-name:visited { color: #000050 !important; }
.py-number { color: #005000; }
.py-defname { color: #000060; font-weight: bold; }
.py-def-name { color: #000060; font-weight: bold; }
.py-base-class { color: #000060; }
.py-param { color: #000060; }
.py-docstring { color: #006030; }
.py-decorator { color: #804020; }
/* Use this if you don't want links to names underlined: */
/*a.py-name { text-decoration: none; }*/
/* Graphs & Diagrams
* - These CSS styles are used for graphs & diagrams generated using
* Graphviz dot. 'img.graph-without-title' is used for bare
* diagrams (to remove the border created by making the image
* clickable).
*/
img.graph-without-title { border: none; }
img.graph-with-title { border: 1px solid #000000; }
span.graph-title { font-weight: bold; }
span.graph-caption { }
/* General-purpose classes
* - 'p.indent-wrapped-lines' defines a paragraph whose first line
* is not indented, but whose subsequent lines are.
* - The 'nomargin-top' class is used to remove the top margin (e.g.
* from lists). The 'nomargin' class is used to remove both the
* top and bottom margin (but not the left or right margin --
* for lists, that would cause the bullets to disappear.)
*/
p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em;
margin: 0; }
.nomargin-top { margin-top: 0; }
.nomargin { margin-top: 0; margin-bottom: 0; }
/* HTML Log */
div.log-block { padding: 0; margin: .5em 0 .5em 0;
background: #e8f0f8; color: #000000;
border: 1px solid #000000; }
div.log-error { padding: .1em .3em .1em .3em; margin: 4px;
background: #ffb0b0; color: #000000;
border: 1px solid #000000; }
div.log-warning { padding: .1em .3em .1em .3em; margin: 4px;
background: #ffffb0; color: #000000;
border: 1px solid #000000; }
div.log-info { padding: .1em .3em .1em .3em; margin: 4px;
background: #b0ffb0; color: #000000;
border: 1px solid #000000; }
h2.log-hdr { background: #70b0ff; color: #000000;
margin: 0; padding: 0em 0.5em 0em 0.5em;
border-bottom: 1px solid #000000; font-size: 110%; }
p.log { font-weight: bold; margin: .5em 0 .5em 0; }
tr.opt-changed { color: #000000; font-weight: bold; }
tr.opt-default { color: #606060; }
pre.log { margin: 0; padding: 0; padding-left: 1em; }

View File

@ -1,293 +0,0 @@
function toggle_private() {
// Search for any private/public links on this page. Store
// their old text in "cmd," so we will know what action to
// take; and change their text to the opposite action.
var cmd = "?";
var elts = document.getElementsByTagName("a");
for(var i=0; i<elts.length; i++) {
if (elts[i].className == "privatelink") {
cmd = elts[i].innerHTML;
elts[i].innerHTML = ((cmd && cmd.substr(0,4)=="show")?
"hide&nbsp;private":"show&nbsp;private");
}
}
// Update all DIVs containing private objects.
var elts = document.getElementsByTagName("div");
for(var i=0; i<elts.length; i++) {
if (elts[i].className == "private") {
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
}
else if (elts[i].className == "public") {
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"block":"none");
}
}
// Update all table rows containing private objects. Note, we
// use "" instead of "block" becaue IE & firefox disagree on what
// this should be (block vs table-row), and "" just gives the
// default for both browsers.
var elts = document.getElementsByTagName("tr");
for(var i=0; i<elts.length; i++) {
if (elts[i].className == "private") {
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"");
}
}
// Update all list items containing private objects.
var elts = document.getElementsByTagName("li");
for(var i=0; i<elts.length; i++) {
if (elts[i].className == "private") {
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?
"none":"");
}
}
// Update all list items containing private objects.
var elts = document.getElementsByTagName("ul");
for(var i=0; i<elts.length; i++) {
if (elts[i].className == "private") {
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
}
}
// Set a cookie to remember the current option.
document.cookie = "EpydocPrivate="+cmd;
}
function show_private() {
var elts = document.getElementsByTagName("a");
for(var i=0; i<elts.length; i++) {
if (elts[i].className == "privatelink") {
cmd = elts[i].innerHTML;
if (cmd && cmd.substr(0,4)=="show")
toggle_private();
}
}
}
function getCookie(name) {
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1) {
begin = dc.indexOf(prefix);
if (begin != 0) return null;
} else
{ begin += 2; }
var end = document.cookie.indexOf(";", begin);
if (end == -1)
{ end = dc.length; }
return unescape(dc.substring(begin + prefix.length, end));
}
function setFrame(url1, url2) {
parent.frames[1].location.href = url1;
parent.frames[2].location.href = url2;
}
function checkCookie() {
var cmd=getCookie("EpydocPrivate");
if (cmd && cmd.substr(0,4)!="show" && location.href.indexOf("#_") < 0)
toggle_private();
}
function toggleCallGraph(id) {
var elt = document.getElementById(id);
if (elt.style.display == "none")
elt.style.display = "block";
else
elt.style.display = "none";
}
function expand(id) {
var elt = document.getElementById(id+"-expanded");
if (elt) elt.style.display = "block";
var elt = document.getElementById(id+"-expanded-linenums");
if (elt) elt.style.display = "block";
var elt = document.getElementById(id+"-collapsed");
if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
var elt = document.getElementById(id+"-collapsed-linenums");
if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
var elt = document.getElementById(id+"-toggle");
if (elt) { elt.innerHTML = "-"; }
}
function collapse(id) {
var elt = document.getElementById(id+"-expanded");
if (elt) elt.style.display = "none";
var elt = document.getElementById(id+"-expanded-linenums");
if (elt) elt.style.display = "none";
var elt = document.getElementById(id+"-collapsed-linenums");
if (elt) { elt.innerHTML = "<br />"; elt.style.display="block"; }
var elt = document.getElementById(id+"-toggle");
if (elt) { elt.innerHTML = "+"; }
var elt = document.getElementById(id+"-collapsed");
if (elt) {
elt.style.display = "block";
var indent = elt.getAttribute("indent");
var pad = elt.getAttribute("pad");
var s = "<tt class='py-lineno'>";
for (var i=0; i<pad.length; i++) { s += "&nbsp;" }
s += "</tt>";
s += "&nbsp;&nbsp;<tt class='py-line'>";
for (var i=0; i<indent.length; i++) { s += "&nbsp;" }
s += "<a href='#' onclick='expand(\"" + id;
s += "\");return false'>...</a></tt><br />";
elt.innerHTML = s;
}
}
function toggle(id) {
elt = document.getElementById(id+"-toggle");
if (elt.innerHTML == "-")
collapse(id);
else
expand(id);
return false;
}
function highlight(id) {
var elt = document.getElementById(id+"-def");
if (elt) elt.className = "py-highlight-hdr";
var elt = document.getElementById(id+"-expanded");
if (elt) elt.className = "py-highlight";
var elt = document.getElementById(id+"-collapsed");
if (elt) elt.className = "py-highlight";
}
function num_lines(s) {
var n = 1;
var pos = s.indexOf("\n");
while ( pos > 0) {
n += 1;
pos = s.indexOf("\n", pos+1);
}
return n;
}
// Collapse all blocks that mave more than `min_lines` lines.
function collapse_all(min_lines) {
var elts = document.getElementsByTagName("div");
for (var i=0; i<elts.length; i++) {
var elt = elts[i];
var split = elt.id.indexOf("-");
if (split > 0)
if (elt.id.substring(split, elt.id.length) == "-expanded")
if (num_lines(elt.innerHTML) > min_lines)
collapse(elt.id.substring(0, split));
}
}
function expandto(href) {
var start = href.indexOf("#")+1;
if (start != 0 && start != href.length) {
if (href.substring(start, href.length) != "-") {
collapse_all(4);
pos = href.indexOf(".", start);
while (pos != -1) {
var id = href.substring(start, pos);
expand(id);
pos = href.indexOf(".", pos+1);
}
var id = href.substring(start, href.length);
expand(id);
highlight(id);
}
}
}
function kill_doclink(id) {
var parent = document.getElementById(id);
parent.removeChild(parent.childNodes.item(0));
}
function auto_kill_doclink(ev) {
if (!ev) var ev = window.event;
if (!this.contains(ev.toElement)) {
var parent = document.getElementById(this.parentID);
parent.removeChild(parent.childNodes.item(0));
}
}
function doclink(id, name, targets_id) {
var elt = document.getElementById(id);
// If we already opened the box, then destroy it.
// (This case should never occur, but leave it in just in case.)
if (elt.childNodes.length > 1) {
elt.removeChild(elt.childNodes.item(0));
}
else {
// The outer box: relative + inline positioning.
var box1 = document.createElement("div");
box1.style.position = "relative";
box1.style.display = "inline";
box1.style.top = 0;
box1.style.left = 0;
// A shadow for fun
var shadow = document.createElement("div");
shadow.style.position = "absolute";
shadow.style.left = "-1.3em";
shadow.style.top = "-1.3em";
shadow.style.background = "#404040";
// The inner box: absolute positioning.
var box2 = document.createElement("div");
box2.style.position = "relative";
box2.style.border = "1px solid #a0a0a0";
box2.style.left = "-.2em";
box2.style.top = "-.2em";
box2.style.background = "white";
box2.style.padding = ".3em .4em .3em .4em";
box2.style.fontStyle = "normal";
box2.onmouseout=auto_kill_doclink;
box2.parentID = id;
// Get the targets
var targets_elt = document.getElementById(targets_id);
var targets = targets_elt.getAttribute("targets");
var links = "";
target_list = targets.split(",");
for (var i=0; i<target_list.length; i++) {
var target = target_list[i].split("=");
links += "<li><a href='" + target[1] +
"' style='text-decoration:none'>" +
target[0] + "</a></li>";
}
// Put it all together.
elt.insertBefore(box1, elt.childNodes.item(0));
//box1.appendChild(box2);
box1.appendChild(shadow);
shadow.appendChild(box2);
box2.innerHTML =
"Which <b>"+name+"</b> do you want to see documentation for?" +
"<ul style='margin-bottom: 0;'>" +
links +
"<li><a href='#' style='text-decoration:none' " +
"onclick='kill_doclink(\""+id+"\");return false;'>"+
"<i>None of the above</i></a></li></ul>";
}
return false;
}
function get_anchor() {
var href = location.href;
var start = href.indexOf("#")+1;
if ((start != 0) && (start != href.length))
return href.substring(start, href.length);
}
function redirect_url(dottedName) {
// Scan through each element of the "pages" list, and check
// if "name" matches with any of them.
for (var i=0; i<pages.length; i++) {
// Each page has the form "<pagename>-m" or "<pagename>-c";
// extract the <pagename> portion & compare it to dottedName.
var pagename = pages[i].substring(0, pages[i].length-2);
if (pagename == dottedName.substring(0,pagename.length)) {
// We've found a page that matches `dottedName`;
// construct its URL, using leftover `dottedName`
// content to form an anchor.
var pagetype = pages[i].charAt(pages[i].length-1);
var url = pagename + ((pagetype=="m")?"-module.html":
"-class.html");
if (dottedName.length > pagename.length)
url += "#" + dottedName.substring(pagename.length+1,
dottedName.length);
return url;
}
}
}

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title> API Documentation </title>
</head>
<frameset cols="20%,80%">
<frameset rows="30%,70%">
<frame src="toc.html" name="moduleListFrame"
id="moduleListFrame" />
<frame src="toc-everything.html" name="moduleFrame"
id="moduleFrame" />
</frameset>
<frame src="tftpy-module.html" name="mainFrame" id="mainFrame" />
</frameset>
</html>

View File

@ -1,268 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Help</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th bgcolor="#70b0f0" class="navbar-select"
>&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">&nbsp;</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="help.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc"> API Documentation </h1>
<p> This document contains the API (Application Programming Interface)
documentation for this project. Documentation for the Python
objects defined by the project is divided into separate pages for each
package, module, and class. The API documentation also includes two
pages containing information about the project as a whole: a trees
page, and an index page. </p>
<h2> Object Documentation </h2>
<p>Each <strong>Package Documentation</strong> page contains: </p>
<ul>
<li> A description of the package. </li>
<li> A list of the modules and sub-packages contained by the
package. </li>
<li> A summary of the classes defined by the package. </li>
<li> A summary of the functions defined by the package. </li>
<li> A summary of the variables defined by the package. </li>
<li> A detailed description of each function defined by the
package. </li>
<li> A detailed description of each variable defined by the
package. </li>
</ul>
<p>Each <strong>Module Documentation</strong> page contains:</p>
<ul>
<li> A description of the module. </li>
<li> A summary of the classes defined by the module. </li>
<li> A summary of the functions defined by the module. </li>
<li> A summary of the variables defined by the module. </li>
<li> A detailed description of each function defined by the
module. </li>
<li> A detailed description of each variable defined by the
module. </li>
</ul>
<p>Each <strong>Class Documentation</strong> page contains: </p>
<ul>
<li> A class inheritance diagram. </li>
<li> A list of known subclasses. </li>
<li> A description of the class. </li>
<li> A summary of the methods defined by the class. </li>
<li> A summary of the instance variables defined by the class. </li>
<li> A summary of the class (static) variables defined by the
class. </li>
<li> A detailed description of each method defined by the
class. </li>
<li> A detailed description of each instance variable defined by the
class. </li>
<li> A detailed description of each class (static) variable defined
by the class. </li>
</ul>
<h2> Project Documentation </h2>
<p> The <strong>Trees</strong> page contains the module and class hierarchies: </p>
<ul>
<li> The <em>module hierarchy</em> lists every package and module, with
modules grouped into packages. At the top level, and within each
package, modules and sub-packages are listed alphabetically. </li>
<li> The <em>class hierarchy</em> lists every class, grouped by base
class. If a class has more than one base class, then it will be
listed under each base class. At the top level, and under each base
class, classes are listed alphabetically. </li>
</ul>
<p> The <strong>Index</strong> page contains indices of terms and
identifiers: </p>
<ul>
<li> The <em>term index</em> lists every term indexed by any object's
documentation. For each term, the index provides links to each
place where the term is indexed. </li>
<li> The <em>identifier index</em> lists the (short) name of every package,
module, class, method, function, variable, and parameter. For each
identifier, the index provides a short description, and a link to
its documentation. </li>
</ul>
<h2> The Table of Contents </h2>
<p> The table of contents occupies the two frames on the left side of
the window. The upper-left frame displays the <em>project
contents</em>, and the lower-left frame displays the <em>module
contents</em>: </p>
<table class="help summary" border="1" cellspacing="0" cellpadding="3">
<tr style="height: 30%">
<td align="center" style="font-size: small">
Project<br />Contents<hr />...</td>
<td align="center" style="font-size: small" rowspan="2" width="70%">
API<br />Documentation<br />Frame<br /><br /><br />
</td>
</tr>
<tr>
<td align="center" style="font-size: small">
Module<br />Contents<hr />&nbsp;<br />...<br />&nbsp;
</td>
</tr>
</table><br />
<p> The <strong>project contents frame</strong> contains a list of all packages
and modules that are defined by the project. Clicking on an entry
will display its contents in the module contents frame. Clicking on a
special entry, labeled "Everything," will display the contents of
the entire project. </p>
<p> The <strong>module contents frame</strong> contains a list of every
submodule, class, type, exception, function, and variable defined by a
module or package. Clicking on an entry will display its
documentation in the API documentation frame. Clicking on the name of
the module, at the top of the frame, will display the documentation
for the module itself. </p>
<p> The "<strong>frames</strong>" and "<strong>no frames</strong>" buttons below the top
navigation bar can be used to control whether the table of contents is
displayed or not. </p>
<h2> The Navigation Bar </h2>
<p> A navigation bar is located at the top and bottom of every page.
It indicates what type of page you are currently viewing, and allows
you to go to related pages. The following table describes the labels
on the navigation bar. Note that not some labels (such as
[Parent]) are not displayed on all pages. </p>
<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
<tr class="summary">
<th>Label</th>
<th>Highlighted when...</th>
<th>Links to...</th>
</tr>
<tr><td valign="top"><strong>[Parent]</strong></td>
<td valign="top"><em>(never highlighted)</em></td>
<td valign="top"> the parent of the current package </td></tr>
<tr><td valign="top"><strong>[Package]</strong></td>
<td valign="top">viewing a package</td>
<td valign="top">the package containing the current object
</td></tr>
<tr><td valign="top"><strong>[Module]</strong></td>
<td valign="top">viewing a module</td>
<td valign="top">the module containing the current object
</td></tr>
<tr><td valign="top"><strong>[Class]</strong></td>
<td valign="top">viewing a class </td>
<td valign="top">the class containing the current object</td></tr>
<tr><td valign="top"><strong>[Trees]</strong></td>
<td valign="top">viewing the trees page</td>
<td valign="top"> the trees page </td></tr>
<tr><td valign="top"><strong>[Index]</strong></td>
<td valign="top">viewing the index page</td>
<td valign="top"> the index page </td></tr>
<tr><td valign="top"><strong>[Help]</strong></td>
<td valign="top">viewing the help page</td>
<td valign="top"> the help page </td></tr>
</table>
<p> The "<strong>show private</strong>" and "<strong>hide private</strong>" buttons below
the top navigation bar can be used to control whether documentation
for private objects is displayed. Private objects are usually defined
as objects whose (short) names begin with a single underscore, but do
not end with an underscore. For example, "<code>_x</code>",
"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
are private objects; but "<code>re.sub</code>",
"<code>__init__</code>", and "<code>type_</code>" are not. However,
if a module defines the "<code>__all__</code>" variable, then its
contents are used to decide which objects are private. </p>
<p> A timestamp below the bottom navigation bar indicates when each
page was last updated. </p>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th bgcolor="#70b0f0" class="navbar-select"
>&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,711 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Identifier Index</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th bgcolor="#70b0f0" class="navbar-select"
>&nbsp;&nbsp;&nbsp;Indices&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">&nbsp;</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="identifier-index.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<table border="0" width="100%">
<tr valign="bottom"><td>
<h1 class="epydoc">Identifier Index</h1>
</td><td>
[
<a href="#A">A</a>
B
<a href="#C">C</a>
<a href="#D">D</a>
<a href="#E">E</a>
<a href="#F">F</a>
<a href="#G">G</a>
<a href="#H">H</a>
<a href="#I">I</a>
J
K
<a href="#L">L</a>
<a href="#M">M</a>
<a href="#N">N</a>
<a href="#O">O</a>
<a href="#P">P</a>
Q
<a href="#R">R</a>
<a href="#S">S</a>
<a href="#T">T</a>
<a href="#U">U</a>
<a href="#V">V</a>
W
X
Y
Z
<a href="#_">_</a>
]
</td></table>
<table border="0" width="100%">
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="A">A</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpShared.TftpErrors-class.html#AccessViolation">AccessViolation</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared.TftpErrors-class.html">TftpErrors</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpMetrics-class.html#add_dup">add_dup()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpMetrics-class.html">TftpMetrics</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="C">C</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContext-class.html#checkTimeout">checkTimeout()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpMetrics-class.html#compute">compute()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpMetrics-class.html">TftpMetrics</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContext-class.html#cycle">cycle()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a>)</span></td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="D">D</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacket-class.html#decode">decode()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacket-class.html">TftpPacket</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options">decode_options()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27-module.html#DEF_TFTP_PORT">DEF_TFTP_PORT</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27-module.html">tftpy.TftpPacketFactory'</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html#decode">decode()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html">TftpPacketACK</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27-module.html#DEF_BLKSIZE">DEF_BLKSIZE</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27-module.html">tftpy.TftpClient'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27-module.html#DEF_TFTP_PORT">DEF_TFTP_PORT</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpServer%27-module.html">tftpy.TftpServer'</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html#decode">decode()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html">TftpPacketDAT</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27-module.html#DEF_BLKSIZE">DEF_BLKSIZE</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27-module.html">tftpy.TftpPacketFactory'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared-module.html#DEF_TFTP_PORT">DEF_TFTP_PORT</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html#decode">decode()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html">TftpPacketERR</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27-module.html#DEF_BLKSIZE">DEF_BLKSIZE</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpServer%27-module.html">tftpy.TftpServer'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared.TftpErrors-class.html#DiskFull">DiskFull</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared.TftpErrors-class.html">TftpErrors</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#decode">decode()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">TftpPacketInitial</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared-module.html#DEF_BLKSIZE">DEF_BLKSIZE</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27.TftpClient-class.html#download">download()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27.TftpClient-class.html">TftpClient</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#decode">decode()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html">TftpPacketOACK</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27-module.html#DEF_TFTP_PORT">DEF_TFTP_PORT</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27-module.html">tftpy.TftpClient'</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="E">E</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacket-class.html#encode">encode()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacket-class.html">TftpPacket</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#encode">encode()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">TftpPacketInitial</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContextClientUpload-class.html#end">end()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContextClientUpload-class.html">TftpContextClientUpload</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html#encode">encode()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html">TftpPacketACK</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#encode">encode()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html">TftpPacketOACK</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContextServer-class.html#end">end()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContextServer-class.html">TftpContextServer</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html#encode">encode()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html">TftpPacketDAT</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContext-class.html#end">end()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html#encode">encode()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html">TftpPacketERR</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContextClientDownload-class.html#end">end()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContextClientDownload-class.html">TftpContextClientDownload</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="F">F</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpShared.TftpErrors-class.html#FailedNegotiation">FailedNegotiation</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared.TftpErrors-class.html">TftpErrors</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared.TftpErrors-class.html#FileAlreadyExists">FileAlreadyExists</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared.TftpErrors-class.html">TftpErrors</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared.TftpErrors-class.html#FileNotFound">FileNotFound</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared.TftpErrors-class.html">TftpErrors</a>)</span></td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="G">G</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContext-class.html#gethost">gethost()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContext-class.html#getNextBlock">getNextBlock()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions">getoptions()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a>)</span></td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="H">H</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpState-class.html#handle">handle()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateSentWRQ-class.html#handle">handle()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpStateSentWRQ-class.html">TftpStateSentWRQ</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpState-class.html#handleDat">handleDat()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateExpectACK-class.html#handle">handle()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpStateExpectACK-class.html">TftpStateExpectACK</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateServerRecvRRQ-class.html#handle">handle()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpStateServerRecvRRQ-class.html">TftpStateServerRecvRRQ</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpState-class.html#handleOACK">handleOACK()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateExpectDAT-class.html#handle">handle()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpStateExpectDAT-class.html">TftpStateExpectDAT</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateServerRecvWRQ-class.html#handle">handle()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpStateServerRecvWRQ-class.html">TftpStateServerRecvWRQ</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContext-class.html#host">host</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateSentRRQ-class.html#handle">handle()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpStateSentRRQ-class.html">TftpStateSentRRQ</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateServerStart-class.html#handle">handle()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpStateServerStart-class.html">TftpStateServerStart</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="I">I</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpShared.TftpErrors-class.html#IllegalTftpOp">IllegalTftpOp</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared.TftpErrors-class.html">TftpErrors</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="L">L</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27.TftpServer-class.html#listen">listen()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpServer%27.TftpServer-class.html">TftpServer</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27-module.html#log">log</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpServer%27-module.html">tftpy.TftpServer'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27-module.html#LOG_LEVEL">LOG_LEVEL</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27-module.html">tftpy.TftpPacketFactory'</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27-module.html#log">log</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27-module.html">tftpy.TftpClient'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared-module.html#log">log</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27-module.html#LOG_LEVEL">LOG_LEVEL</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpServer%27-module.html">tftpy.TftpServer'</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27-module.html#log">log</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27-module.html">tftpy.TftpPacketFactory'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27-module.html#LOG_LEVEL">LOG_LEVEL</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27-module.html">tftpy.TftpClient'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared-module.html#LOG_LEVEL">LOG_LEVEL</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
</tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="M">M</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#match_options">match_options()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html">TftpPacketOACK</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27-module.html#MAX_DUPS">MAX_DUPS</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27-module.html">tftpy.TftpClient'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27-module.html#MIN_BLKSIZE">MIN_BLKSIZE</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27-module.html">tftpy.TftpPacketFactory'</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27-module.html#MAX_BLKSIZE">MAX_BLKSIZE</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27-module.html">tftpy.TftpClient'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27-module.html#MAX_DUPS">MAX_DUPS</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27-module.html">tftpy.TftpPacketFactory'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27-module.html#MIN_BLKSIZE">MIN_BLKSIZE</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpServer%27-module.html">tftpy.TftpServer'</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27-module.html#MAX_BLKSIZE">MAX_BLKSIZE</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27-module.html">tftpy.TftpPacketFactory'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27-module.html#MAX_DUPS">MAX_DUPS</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpServer%27-module.html">tftpy.TftpServer'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared-module.html#MIN_BLKSIZE">MIN_BLKSIZE</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27-module.html#MAX_BLKSIZE">MAX_BLKSIZE</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpServer%27-module.html">tftpy.TftpServer'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared-module.html#MAX_DUPS">MAX_DUPS</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpShared-module.html#MAX_BLKSIZE">MAX_BLKSIZE</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27-module.html#MIN_BLKSIZE">MIN_BLKSIZE</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27-module.html">tftpy.TftpClient'</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="N">N</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContext-class.html#next_block">next_block</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared.TftpErrors-class.html#NoSuchUser">NoSuchUser</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared.TftpErrors-class.html">TftpErrors</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared.TftpErrors-class.html#NotDefined">NotDefined</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared.TftpErrors-class.html">TftpErrors</a>)</span></td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="O">O</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options">options</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="P">P</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html#parse">parse()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html">TftpPacketFactory</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="R">R</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpState-class.html#returnSupportedOptions">returnSupportedOptions()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="S">S</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpState-class.html#sendACK">sendACK()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared-module.html#setLogLevel">setLogLevel()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared-module.html#SOCK_TIMEOUT">SOCK_TIMEOUT</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpState-class.html#sendDAT">sendDAT()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContext-class.html#setNextBlock">setNextBlock()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContext-class.html#start">start()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpState-class.html#sendError">sendError()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions">setoptions()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContextClientDownload-class.html#start">start()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContextClientDownload-class.html">TftpContextClientDownload</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpState-class.html#sendOACK">sendOACK()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27-module.html#SOCK_TIMEOUT">SOCK_TIMEOUT</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27-module.html">tftpy.TftpClient'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContextClientUpload-class.html#start">start()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContextClientUpload-class.html">TftpContextClientUpload</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpState-class.html#serverInitial">serverInitial()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27-module.html#SOCK_TIMEOUT">SOCK_TIMEOUT</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27-module.html">tftpy.TftpPacketFactory'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContextServer-class.html#start">start()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContextServer-class.html">TftpContextServer</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContext-class.html#sethost">sethost()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27-module.html#SOCK_TIMEOUT">SOCK_TIMEOUT</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpServer%27-module.html">tftpy.TftpServer'</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="T">T</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpShared-module.html#tftpassert">tftpassert()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html">TftpPacketFactory</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27-module.html">tftpy.TftpPacketFactory'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateExpectDAT-class.html">TftpStateExpectDAT</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27.TftpClient-class.html">TftpClient</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27-module.html">tftpy.TftpClient'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27-module.html">TftpPacketFactory'</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy-module.html">tftpy</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates-module.html">TftpStates</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy-module.html">tftpy</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27-module.html">TftpClient'</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy-module.html">tftpy</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">TftpPacketInitial</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes-module.html">tftpy.TftpPacketTypes</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateSentRRQ-class.html">TftpStateSentRRQ</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html">TftpPacketOACK</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes-module.html">tftpy.TftpPacketTypes</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateSentWRQ-class.html">TftpStateSentWRQ</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContextClientDownload-class.html">TftpContextClientDownload</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html">TftpPacketRRQ</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes-module.html">tftpy.TftpPacketTypes</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateServerRecvRRQ-class.html">TftpStateServerRecvRRQ</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContextClientUpload-class.html">TftpContextClientUpload</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes-module.html">TftpPacketTypes</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy-module.html">tftpy</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateServerRecvWRQ-class.html">TftpStateServerRecvWRQ</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContextServer-class.html">TftpContextServer</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes-module.html">tftpy.TftpPacketTypes</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateServerStart-class.html">TftpStateServerStart</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpShared.TftpErrors-class.html">TftpErrors</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html">TftpPacketWRQ</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes-module.html">tftpy.TftpPacketTypes</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy-module.html">tftpy</a></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpShared.TftpException-class.html">TftpException</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27.TftpServer-class.html">TftpServer</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpServer%27-module.html">tftpy.TftpServer'</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27-module.html#TIMEOUT_RETRIES">TIMEOUT_RETRIES</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27-module.html">tftpy.TftpClient'</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpMetrics-class.html">TftpMetrics</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27-module.html">TftpServer'</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy-module.html">tftpy</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27-module.html#TIMEOUT_RETRIES">TIMEOUT_RETRIES</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27-module.html">tftpy.TftpPacketFactory'</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacket-class.html">TftpPacket</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes-module.html">tftpy.TftpPacketTypes</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpSession-class.html">TftpSession</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes-module.html">tftpy.TftpPacketTypes</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27-module.html#TIMEOUT_RETRIES">TIMEOUT_RETRIES</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpServer%27-module.html">tftpy.TftpServer'</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html">TftpPacketACK</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes-module.html">tftpy.TftpPacketTypes</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared-module.html">TftpShared</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy-module.html">tftpy</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpShared-module.html#TIMEOUT_RETRIES">TIMEOUT_RETRIES</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html">TftpPacketDAT</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes-module.html">tftpy.TftpPacketTypes</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpState-class.html">TftpState</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html">TftpPacketERR</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes-module.html">tftpy.TftpPacketTypes</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpStateExpectACK-class.html">TftpStateExpectACK</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="U">U</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpShared.TftpErrors-class.html#UnknownTID">UnknownTID</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpShared.TftpErrors-class.html">TftpErrors</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27.TftpClient-class.html#upload">upload()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27.TftpClient-class.html">TftpClient</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="V">V</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy-module.html#verlist">verlist</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy-module.html">tftpy</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="_">_</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html#__create">__create()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html">TftpPacketFactory</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html">TftpPacketRRQ</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpState-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpClient%27.TftpClient-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpClient%27.TftpClient-class.html">TftpClient</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html">TftpPacketWRQ</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html">TftpPacketACK</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html">TftpPacketFactory</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html">TftpPacketDAT</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacket-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacket-class.html">TftpPacket</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpServer%27.TftpServer-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpServer%27.TftpServer-class.html">TftpServer</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html">TftpPacketERR</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html">TftpPacketACK</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContext-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html">TftpPacketOACK</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html">TftpPacketDAT</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContextClientDownload-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContextClientDownload-class.html">TftpContextClientDownload</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html">TftpPacketRRQ</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html">TftpPacketERR</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContextClientUpload-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContextClientUpload-class.html">TftpContextClientUpload</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html#__str__">__str__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html">TftpPacketWRQ</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">TftpPacketInitial</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpContextServer-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpContextServer-class.html">TftpContextServer</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html">TftpPacketOACK</a>)</span></td>
<td width="33%" class="link-index"><a href="tftpy.TftpStates.TftpMetrics-class.html#__init__">__init__()</a><br />
<span class="index-where">(in&nbsp;<a href="tftpy.TftpStates.TftpMetrics-class.html">TftpMetrics</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
</table>
<br /><br /><!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th bgcolor="#70b0f0" class="navbar-select"
>&nbsp;&nbsp;&nbsp;Indices&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title> API Documentation </title>
</head>
<frameset cols="20%,80%">
<frameset rows="30%,70%">
<frame src="toc.html" name="moduleListFrame"
id="moduleListFrame" />
<frame src="toc-everything.html" name="moduleFrame"
id="moduleFrame" />
</frameset>
<frame src="tftpy-module.html" name="mainFrame" id="mainFrame" />
</frameset>
</html>

View File

@ -1,117 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Module Hierarchy</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th bgcolor="#70b0f0" class="navbar-select"
>&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">&nbsp;</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="module-tree.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<center><b>
[ <a href="module-tree.html">Module Hierarchy</a>
| <a href="class-tree.html">Class Hierarchy</a> ]
</b></center><br />
<h1 class="epydoc">Module Hierarchy</h1>
<ul class="nomargin-top">
<li> <strong class="uidlink"><a href="tftpy-module.html">tftpy</a></strong>: <em class="summary">This library implements the tftp protocol, based on rfc 1350.</em>
<ul>
<li> <strong class="uidlink">tftpy.TftpClient</strong> </li>
<li> <strong class="uidlink"><a href="tftpy.TftpClient%27-module.html">tftpy.TftpClient'</a></strong> </li>
<li> <strong class="uidlink">tftpy.TftpPacketFactory</strong> </li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketFactory%27-module.html">tftpy.TftpPacketFactory'</a></strong> </li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes-module.html">tftpy.TftpPacketTypes</a></strong> </li>
<li> <strong class="uidlink">tftpy.TftpServer</strong> </li>
<li> <strong class="uidlink"><a href="tftpy.TftpServer%27-module.html">tftpy.TftpServer'</a></strong> </li>
<li> <strong class="uidlink"><a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a></strong> </li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a></strong> </li>
</ul>
</li>
</ul>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th bgcolor="#70b0f0" class="navbar-select"
>&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,38 +0,0 @@
<html><head><title>Epydoc Redirect Page</title>
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body>
<script type="text/javascript">
<!--
var pages = ["tftpy.TftpPacketTypes.TftpPacketWithOptions-c", "tftpy.TftpPacketFactory'.TftpPacketFactory-c", "tftpy.TftpStates.TftpContextClientDownload-c", "tftpy.TftpStates.TftpContextClientUpload-c", "tftpy.TftpPacketTypes.TftpPacketInitial-c", "tftpy.TftpStates.TftpStateServerRecvRRQ-c", "tftpy.TftpStates.TftpStateServerRecvWRQ-c", "tftpy.TftpStates.TftpStateServerStart-c", "tftpy.TftpPacketTypes.TftpPacketOACK-c", "tftpy.TftpPacketTypes.TftpPacketACK-c", "tftpy.TftpPacketTypes.TftpPacketDAT-c", "tftpy.TftpPacketTypes.TftpPacketERR-c", "tftpy.TftpPacketTypes.TftpPacketRRQ-c", "tftpy.TftpPacketTypes.TftpPacketWRQ-c", "tftpy.TftpStates.TftpStateExpectACK-c", "tftpy.TftpStates.TftpStateExpectDAT-c", "tftpy.TftpStates.TftpContextServer-c", "tftpy.TftpPacketTypes.TftpSession-c", "tftpy.TftpStates.TftpStateSentRRQ-c", "tftpy.TftpStates.TftpStateSentWRQ-c", "tftpy.TftpPacketTypes.TftpPacket-c", "tftpy.TftpShared.TftpException-c", "tftpy.TftpClient'.TftpClient-c", "tftpy.TftpServer'.TftpServer-c", "tftpy.TftpStates.TftpContext-c", "tftpy.TftpStates.TftpMetrics-c", "tftpy.TftpShared.TftpErrors-c", "tftpy.TftpStates.TftpState-c", "tftpy.TftpPacketFactory'-m", "tftpy.TftpPacketTypes-m", "tftpy.TftpClient'-m", "tftpy.TftpServer'-m", "tftpy.TftpShared-m", "tftpy.TftpStates-m", "tftpy-m"];
var dottedName = get_anchor();
if (dottedName) {
var target = redirect_url(dottedName);
if (target) window.location.replace(target);
}
// -->
</script>
<h3>Epydoc Auto-redirect page</h3>
<p>When javascript is enabled, this page will redirect URLs of
the form <tt>redirect.html#<i>dotted.name</i></tt> to the
documentation for the object with the given fully-qualified
dotted name.</p>
<p><a id="message"> &nbsp; </a></p>
<script type="text/javascript">
<!--
if (dottedName) {
var msg = document.getElementById("message");
msg.innerHTML = "No documentation found for <tt>"+
dottedName+"</tt>";
}
// -->
</script>
</body>
</html>

View File

@ -1,165 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th bgcolor="#70b0f0" class="navbar-select"
>&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
Package&nbsp;tftpy
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy-module.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
<h1 class="epydoc">Package tftpy</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy-pysrc.html">source&nbsp;code</a></span></p>
<p>This library implements the tftp protocol, based on rfc 1350.
http://www.faqs.org/rfcs/rfc1350.html At the moment it implements only a
client class, but will include a server, with support for variable block
sizes.</p>
<!-- ==================== SUBMODULES ==================== -->
<a name="section-Submodules"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Submodules</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Submodules"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr><td class="summary">
<ul class="nomargin">
<li> <strong class="uidlink">tftpy.TftpClient</strong> </li>
<li> <strong class="uidlink"><a href="tftpy.TftpClient%27-module.html">tftpy.TftpClient'</a></strong> </li>
<li> <strong class="uidlink">tftpy.TftpPacketFactory</strong> </li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketFactory%27-module.html">tftpy.TftpPacketFactory'</a></strong> </li>
<li> <strong class="uidlink"><a href="tftpy.TftpPacketTypes-module.html">tftpy.TftpPacketTypes</a></strong> </li>
<li> <strong class="uidlink">tftpy.TftpServer</strong> </li>
<li> <strong class="uidlink"><a href="tftpy.TftpServer%27-module.html">tftpy.TftpServer'</a></strong> </li>
<li> <strong class="uidlink"><a href="tftpy.TftpShared-module.html">tftpy.TftpShared</a></strong> </li>
<li> <strong class="uidlink"><a href="tftpy.TftpStates-module.html">tftpy.TftpStates</a></strong> </li>
</ul></td></tr>
</table>
<br />
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Variables"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="verlist"></a><span class="summary-name">verlist</span> = <code title="(2, 5, 2, 'final', 0)"><code class="variable-group">(</code>2<code class="variable-op">, </code>5<code class="variable-op">, </code>2<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">final</code><code class="variable-quote">'</code><code class="variable-op">, </code>0<code class="variable-group">)</code></code>
</td>
</tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th bgcolor="#70b0f0" class="navbar-select"
>&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,128 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th bgcolor="#70b0f0" class="navbar-select"
>&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
Package&nbsp;tftpy
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy-pysrc.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Source Code for <a href="tftpy-module.html">Package tftpy</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-docstring">"""This library implements the tftp protocol, based on rfc 1350.</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-docstring">http://www.faqs.org/rfcs/rfc1350.html</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-docstring">At the moment it implements only a client class, but will include a server,</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-docstring">with support for variable block sizes.</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-comment"># Make sure that this is at least Python 2.3</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-comment"></tt><tt id="link-0" class="py-name" targets="Variable tftpy.verlist=tftpy-module.html#verlist"><a title="tftpy.verlist" class="py-name" href="#" onclick="return doclink('link-0', 'verlist', 'link-0');">verlist</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">version_info</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-1" class="py-name"><a title="tftpy.verlist" class="py-name" href="#" onclick="return doclink('link-1', 'verlist', 'link-0');">verlist</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">2</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt id="link-2" class="py-name"><a title="tftpy.verlist" class="py-name" href="#" onclick="return doclink('link-2', 'verlist', 'link-0');">verlist</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">3</tt><tt class="py-op">:</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">AssertionError</tt><tt class="py-op">,</tt> <tt class="py-string">"Requires at least Python 2.3"</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name" targets="Module tftpy.TftpShared=tftpy.TftpShared-module.html"><a title="tftpy.TftpShared" class="py-name" href="#" onclick="return doclink('link-3', 'TftpShared', 'link-3');">TftpShared</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-4" class="py-name" targets="Module tftpy.TftpPacketTypes=tftpy.TftpPacketTypes-module.html"><a title="tftpy.TftpPacketTypes" class="py-name" href="#" onclick="return doclink('link-4', 'TftpPacketTypes', 'link-4');">TftpPacketTypes</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-5" class="py-name" targets="Class tftpy.TftpPacketFactory'.TftpPacketFactory=tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html"><a title="tftpy.TftpPacketFactory'.TftpPacketFactory" class="py-name" href="#" onclick="return doclink('link-5', 'TftpPacketFactory', 'link-5');">TftpPacketFactory</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-6" class="py-name" targets="Class tftpy.TftpClient'.TftpClient=tftpy.TftpClient%27.TftpClient-class.html"><a title="tftpy.TftpClient'.TftpClient" class="py-name" href="#" onclick="return doclink('link-6', 'TftpClient', 'link-6');">TftpClient</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-7" class="py-name" targets="Class tftpy.TftpServer'.TftpServer=tftpy.TftpServer%27.TftpServer-class.html"><a title="tftpy.TftpServer'.TftpServer" class="py-name" href="#" onclick="return doclink('link-7', 'TftpServer', 'link-7');">TftpServer</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th bgcolor="#70b0f0" class="navbar-select"
>&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:22 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,211 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpClient'</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
Module&nbsp;TftpClient'
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpClient%27-module.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module TftpClient'</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpClient%27-pysrc.html">source&nbsp;code</a></span></p>
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Classes</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Classes"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpClient%27.TftpClient-class.html" class="summary-name">TftpClient</a><br />
This class is an implementation of a tftp client.
</td>
</tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Variables"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="DEF_BLKSIZE"></a><span class="summary-name">DEF_BLKSIZE</span> = <code title="512">512</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="DEF_TFTP_PORT"></a><span class="summary-name">DEF_TFTP_PORT</span> = <code title="69">69</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="LOG_LEVEL"></a><span class="summary-name">LOG_LEVEL</span> = <code title="0">0</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MAX_BLKSIZE"></a><span class="summary-name">MAX_BLKSIZE</span> = <code title="65536">65536</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MAX_DUPS"></a><span class="summary-name">MAX_DUPS</span> = <code title="20">20</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MIN_BLKSIZE"></a><span class="summary-name">MIN_BLKSIZE</span> = <code title="8">8</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="SOCK_TIMEOUT"></a><span class="summary-name">SOCK_TIMEOUT</span> = <code title="5">5</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="TIMEOUT_RETRIES"></a><span class="summary-name">TIMEOUT_RETRIES</span> = <code title="5">5</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="log"></a><span class="summary-name">log</span> = <code title="logging.getLogger('tftpy')">logging.getLogger('tftpy')</code>
</td>
</tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,297 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpClient'</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
Module&nbsp;TftpClient'
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpClient%27-pysrc.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Source Code for <a href="tftpy.TftpClient%27-module.html">Module tftpy.TftpClient'</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">time</tt><tt class="py-op">,</tt> <tt class="py-name">types</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module tftpy.TftpShared=tftpy.TftpShared-module.html"><a title="tftpy.TftpShared" class="py-name" href="#" onclick="return doclink('link-0', 'TftpShared', 'link-0');">TftpShared</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Class tftpy.TftpPacketFactory'.TftpPacketFactory=tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html"><a title="tftpy.TftpPacketFactory'.TftpPacketFactory" class="py-name" href="#" onclick="return doclink('link-1', 'TftpPacketFactory', 'link-1');">TftpPacketFactory</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Module tftpy.TftpStates=tftpy.TftpStates-module.html"><a title="tftpy.TftpStates" class="py-name" href="#" onclick="return doclink('link-2', 'TftpStates', 'link-2');">TftpStates</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Class tftpy.TftpStates.TftpContextClientDownload=tftpy.TftpStates.TftpContextClientDownload-class.html"><a title="tftpy.TftpStates.TftpContextClientDownload" class="py-name" href="#" onclick="return doclink('link-3', 'TftpContextClientDownload', 'link-3');">TftpContextClientDownload</a></tt><tt class="py-op">,</tt> <tt id="link-4" class="py-name" targets="Class tftpy.TftpStates.TftpContextClientUpload=tftpy.TftpStates.TftpContextClientUpload-class.html"><a title="tftpy.TftpStates.TftpContextClientUpload" class="py-name" href="#" onclick="return doclink('link-4', 'TftpContextClientUpload', 'link-4');">TftpContextClientUpload</a></tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> </tt>
<a name="TftpClient"></a><div id="TftpClient-def"><a name="L6"></a><tt class="py-lineno"> 6</tt> <a class="py-toggle" href="#" id="TftpClient-toggle" onclick="return toggle('TftpClient');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpClient'.TftpClient-class.html">TftpClient</a><tt class="py-op">(</tt><tt class="py-base-class">TftpSession</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpClient-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="TftpClient-expanded"><a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"> <tt class="py-docstring">"""This class is an implementation of a tftp client. Once instantiated, a</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> download can be initiated via the download() method."""</tt> </tt>
<a name="TftpClient.__init__"></a><div id="TftpClient.__init__-def"><a name="L9"></a><tt class="py-lineno"> 9</tt> <a class="py-toggle" href="#" id="TftpClient.__init__-toggle" onclick="return toggle('TftpClient.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpClient'.TftpClient-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">host</tt><tt class="py-op">,</tt> <tt class="py-param">port</tt><tt class="py-op">,</tt> <tt class="py-param">options</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpClient.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="TftpClient.__init__-expanded"><a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"> <tt class="py-docstring">"""This constructor returns an instance of TftpClient, taking the</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"><tt class="py-docstring"> remote host, the remote port, and the filename to fetch."""</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"> <tt id="link-5" class="py-name" targets="Class tftpy.TftpPacketTypes.TftpSession=tftpy.TftpPacketTypes.TftpSession-class.html"><a title="tftpy.TftpPacketTypes.TftpSession" class="py-name" href="#" onclick="return doclink('link-5', 'TftpSession', 'link-5');">TftpSession</a></tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method tftpy.TftpClient'.TftpClient.__init__()=tftpy.TftpClient%27.TftpClient-class.html#__init__,Method tftpy.TftpPacketFactory'.TftpPacketFactory.__init__()=tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacket.__init__()=tftpy.TftpPacketTypes.TftpPacket-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketACK.__init__()=tftpy.TftpPacketTypes.TftpPacketACK-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketDAT.__init__()=tftpy.TftpPacketTypes.TftpPacketDAT-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketERR.__init__()=tftpy.TftpPacketTypes.TftpPacketERR-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketInitial.__init__()=tftpy.TftpPacketTypes.TftpPacketInitial-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketOACK.__init__()=tftpy.TftpPacketTypes.TftpPacketOACK-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketRRQ.__init__()=tftpy.TftpPacketTypes.TftpPacketRRQ-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketWRQ.__init__()=tftpy.TftpPacketTypes.TftpPacketWRQ-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__()=tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#__init__,Method tftpy.TftpServer'.TftpServer.__init__()=tftpy.TftpServer%27.TftpServer-class.html#__init__,Method tftpy.TftpStates.TftpContext.__init__()=tftpy.TftpStates.TftpContext-class.html#__init__,Method tftpy.TftpStates.TftpContextClientDownload.__init__()=tftpy.TftpStates.TftpContextClientDownload-class.html#__init__,Method tftpy.TftpStates.TftpContextClientUpload.__init__()=tftpy.TftpStates.TftpContextClientUpload-class.html#__init__,Method tftpy.TftpStates.TftpContextServer.__init__()=tftpy.TftpStates.TftpContextServer-class.html#__init__,Method tftpy.TftpStates.TftpMetrics.__init__()=tftpy.TftpStates.TftpMetrics-class.html#__init__,Method tftpy.TftpStates.TftpState.__init__()=tftpy.TftpStates.TftpState-class.html#__init__"><a title="tftpy.TftpClient'.TftpClient.__init__
tftpy.TftpPacketFactory'.TftpPacketFactory.__init__
tftpy.TftpPacketTypes.TftpPacket.__init__
tftpy.TftpPacketTypes.TftpPacketACK.__init__
tftpy.TftpPacketTypes.TftpPacketDAT.__init__
tftpy.TftpPacketTypes.TftpPacketERR.__init__
tftpy.TftpPacketTypes.TftpPacketInitial.__init__
tftpy.TftpPacketTypes.TftpPacketOACK.__init__
tftpy.TftpPacketTypes.TftpPacketRRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__
tftpy.TftpServer'.TftpServer.__init__
tftpy.TftpStates.TftpContext.__init__
tftpy.TftpStates.TftpContextClientDownload.__init__
tftpy.TftpStates.TftpContextClientUpload.__init__
tftpy.TftpStates.TftpContextServer.__init__
tftpy.TftpStates.TftpMetrics.__init__
tftpy.TftpStates.TftpState.__init__" class="py-name" href="#" onclick="return doclink('link-6', '__init__', 'link-6');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Variable tftpy.TftpStates.TftpContext.host=tftpy.TftpStates.TftpContext-class.html#host"><a title="tftpy.TftpStates.TftpContext.host" class="py-name" href="#" onclick="return doclink('link-7', 'host', 'link-7');">host</a></tt> <tt class="py-op">=</tt> <tt id="link-8" class="py-name"><a title="tftpy.TftpStates.TftpContext.host" class="py-name" href="#" onclick="return doclink('link-8', 'host', 'link-7');">host</a></tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">iport</tt> <tt class="py-op">=</tt> <tt class="py-name">port</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Variable tftpy.TftpPacketTypes.TftpPacketWithOptions.options=tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-9', 'options', 'link-9');">options</a></tt> <tt class="py-op">=</tt> <tt id="link-10" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-10', 'options', 'link-9');">options</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> <tt class="py-comment"># FIXME: If the blksize is DEF_BLKSIZE, we should just skip sending</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># it.</tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-11', 'options', 'link-9');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt class="py-string">'blksize'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"> <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-12', 'options', 'link-9');">options</a></tt><tt class="py-op">[</tt><tt class="py-string">'blksize'</tt><tt class="py-op">]</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> <tt id="link-13" class="py-name" targets="Function tftpy.TftpShared.tftpassert()=tftpy.TftpShared-module.html#tftpassert"><a title="tftpy.TftpShared.tftpassert" class="py-name" href="#" onclick="return doclink('link-13', 'tftpassert', 'link-13');">tftpassert</a></tt><tt class="py-op">(</tt><tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">IntType</tt> <tt class="py-op">==</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">size</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"blksize must be an int"</tt><tt class="py-op">)</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">size</tt> <tt class="py-op">&lt;</tt> <tt id="link-14" class="py-name" targets="Variable tftpy.TftpClient'.MIN_BLKSIZE=tftpy.TftpClient%27-module.html#MIN_BLKSIZE,Variable tftpy.TftpPacketFactory'.MIN_BLKSIZE=tftpy.TftpPacketFactory%27-module.html#MIN_BLKSIZE,Variable tftpy.TftpServer'.MIN_BLKSIZE=tftpy.TftpServer%27-module.html#MIN_BLKSIZE,Variable tftpy.TftpShared.MIN_BLKSIZE=tftpy.TftpShared-module.html#MIN_BLKSIZE"><a title="tftpy.TftpClient'.MIN_BLKSIZE
tftpy.TftpPacketFactory'.MIN_BLKSIZE
tftpy.TftpServer'.MIN_BLKSIZE
tftpy.TftpShared.MIN_BLKSIZE" class="py-name" href="#" onclick="return doclink('link-14', 'MIN_BLKSIZE', 'link-14');">MIN_BLKSIZE</a></tt> <tt class="py-keyword">or</tt> <tt class="py-name">size</tt> <tt class="py-op">&gt;</tt> <tt id="link-15" class="py-name" targets="Variable tftpy.TftpClient'.MAX_BLKSIZE=tftpy.TftpClient%27-module.html#MAX_BLKSIZE,Variable tftpy.TftpPacketFactory'.MAX_BLKSIZE=tftpy.TftpPacketFactory%27-module.html#MAX_BLKSIZE,Variable tftpy.TftpServer'.MAX_BLKSIZE=tftpy.TftpServer%27-module.html#MAX_BLKSIZE,Variable tftpy.TftpShared.MAX_BLKSIZE=tftpy.TftpShared-module.html#MAX_BLKSIZE"><a title="tftpy.TftpClient'.MAX_BLKSIZE
tftpy.TftpPacketFactory'.MAX_BLKSIZE
tftpy.TftpServer'.MAX_BLKSIZE
tftpy.TftpShared.MAX_BLKSIZE" class="py-name" href="#" onclick="return doclink('link-15', 'MAX_BLKSIZE', 'link-15');">MAX_BLKSIZE</a></tt><tt class="py-op">:</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-16" class="py-name" targets="Class tftpy.TftpShared.TftpException=tftpy.TftpShared.TftpException-class.html"><a title="tftpy.TftpShared.TftpException" class="py-name" href="#" onclick="return doclink('link-16', 'TftpException', 'link-16');">TftpException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Invalid blksize: %d"</tt> <tt class="py-op">%</tt> <tt class="py-name">size</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-17', 'options', 'link-9');">options</a></tt><tt class="py-op">[</tt><tt class="py-string">'blksize'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-18" class="py-name" targets="Variable tftpy.TftpClient'.DEF_BLKSIZE=tftpy.TftpClient%27-module.html#DEF_BLKSIZE,Variable tftpy.TftpPacketFactory'.DEF_BLKSIZE=tftpy.TftpPacketFactory%27-module.html#DEF_BLKSIZE,Variable tftpy.TftpServer'.DEF_BLKSIZE=tftpy.TftpServer%27-module.html#DEF_BLKSIZE,Variable tftpy.TftpShared.DEF_BLKSIZE=tftpy.TftpShared-module.html#DEF_BLKSIZE"><a title="tftpy.TftpClient'.DEF_BLKSIZE
tftpy.TftpPacketFactory'.DEF_BLKSIZE
tftpy.TftpServer'.DEF_BLKSIZE
tftpy.TftpShared.DEF_BLKSIZE" class="py-name" href="#" onclick="return doclink('link-18', 'DEF_BLKSIZE', 'link-18');">DEF_BLKSIZE</a></tt> </tt>
</div><a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> </tt>
<a name="TftpClient.download"></a><div id="TftpClient.download-def"><a name="L28"></a><tt class="py-lineno">28</tt> <a class="py-toggle" href="#" id="TftpClient.download-toggle" onclick="return toggle('TftpClient.download');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpClient'.TftpClient-class.html#download">download</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">output</tt><tt class="py-op">,</tt> <tt class="py-param">packethook</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">timeout</tt><tt class="py-op">=</tt><tt id="link-19" class="py-name" targets="Variable tftpy.TftpClient'.SOCK_TIMEOUT=tftpy.TftpClient%27-module.html#SOCK_TIMEOUT,Variable tftpy.TftpPacketFactory'.SOCK_TIMEOUT=tftpy.TftpPacketFactory%27-module.html#SOCK_TIMEOUT,Variable tftpy.TftpServer'.SOCK_TIMEOUT=tftpy.TftpServer%27-module.html#SOCK_TIMEOUT,Variable tftpy.TftpShared.SOCK_TIMEOUT=tftpy.TftpShared-module.html#SOCK_TIMEOUT"><a title="tftpy.TftpClient'.SOCK_TIMEOUT
tftpy.TftpPacketFactory'.SOCK_TIMEOUT
tftpy.TftpServer'.SOCK_TIMEOUT
tftpy.TftpShared.SOCK_TIMEOUT" class="py-name" href="#" onclick="return doclink('link-19', 'SOCK_TIMEOUT', 'link-19');">SOCK_TIMEOUT</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpClient.download-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="TftpClient.download-expanded"><a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"> <tt class="py-docstring">"""This method initiates a tftp download from the configured remote</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"><tt class="py-docstring"> host, requesting the filename passed. It saves the file to a local</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> file specified in the output parameter. If a packethook is provided,</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-docstring"> it must be a function that takes a single parameter, which will be a</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"><tt class="py-docstring"> copy of each DAT packet received in the form of a TftpPacketDAT</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"><tt class="py-docstring"> object. The timeout parameter may be used to override the default</tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"><tt class="py-docstring"> SOCK_TIMEOUT setting, which is the amount of time that the client will</tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"><tt class="py-docstring"> wait for a receive packet to arrive."""</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"> <tt class="py-comment"># We're downloading.</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt id="link-20" class="py-name" targets="Variable tftpy.TftpClient'.log=tftpy.TftpClient%27-module.html#log,Variable tftpy.TftpPacketFactory'.log=tftpy.TftpPacketFactory%27-module.html#log,Variable tftpy.TftpServer'.log=tftpy.TftpServer%27-module.html#log,Variable tftpy.TftpShared.log=tftpy.TftpShared-module.html#log"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-20', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Creating download context with the following params:"</tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"> <tt id="link-21" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-21', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"host = %s, port = %s, filename = %s, output = %s"</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="tftpy.TftpStates.TftpContext.host" class="py-name" href="#" onclick="return doclink('link-22', 'host', 'link-7');">host</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">iport</tt><tt class="py-op">,</tt> <tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">output</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"> <tt id="link-23" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-23', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"options = %s, packethook = %s, timeout = %s"</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-24', 'options', 'link-9');">options</a></tt><tt class="py-op">,</tt> <tt class="py-name">packethook</tt><tt class="py-op">,</tt> <tt class="py-name">timeout</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt> <tt class="py-op">=</tt> <tt id="link-25" class="py-name"><a title="tftpy.TftpStates.TftpContextClientDownload" class="py-name" href="#" onclick="return doclink('link-25', 'TftpContextClientDownload', 'link-3');">TftpContextClientDownload</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="tftpy.TftpStates.TftpContext.host" class="py-name" href="#" onclick="return doclink('link-26', 'host', 'link-7');">host</a></tt><tt class="py-op">,</tt> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">iport</tt><tt class="py-op">,</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"> <tt class="py-name">filename</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"> <tt class="py-name">output</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-27', 'options', 'link-9');">options</a></tt><tt class="py-op">,</tt> </tt>
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"> <tt class="py-name">packethook</tt><tt class="py-op">,</tt> </tt>
<a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"> <tt class="py-name">timeout</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno">50</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name" targets="Method tftpy.TftpStates.TftpContext.start()=tftpy.TftpStates.TftpContext-class.html#start,Method tftpy.TftpStates.TftpContextClientDownload.start()=tftpy.TftpStates.TftpContextClientDownload-class.html#start,Method tftpy.TftpStates.TftpContextClientUpload.start()=tftpy.TftpStates.TftpContextClientUpload-class.html#start,Method tftpy.TftpStates.TftpContextServer.start()=tftpy.TftpStates.TftpContextServer-class.html#start"><a title="tftpy.TftpStates.TftpContext.start
tftpy.TftpStates.TftpContextClientDownload.start
tftpy.TftpStates.TftpContextClientUpload.start
tftpy.TftpStates.TftpContextServer.start" class="py-name" href="#" onclick="return doclink('link-28', 'start', 'link-28');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"> <tt class="py-comment"># Download happens here</tt> </tt>
<a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method tftpy.TftpStates.TftpContext.end()=tftpy.TftpStates.TftpContext-class.html#end,Method tftpy.TftpStates.TftpContextClientDownload.end()=tftpy.TftpStates.TftpContextClientDownload-class.html#end,Method tftpy.TftpStates.TftpContextClientUpload.end()=tftpy.TftpStates.TftpContextClientUpload-class.html#end,Method tftpy.TftpStates.TftpContextServer.end()=tftpy.TftpStates.TftpContextServer-class.html#end"><a title="tftpy.TftpStates.TftpContext.end
tftpy.TftpStates.TftpContextClientDownload.end
tftpy.TftpStates.TftpContextClientUpload.end
tftpy.TftpStates.TftpContextServer.end" class="py-name" href="#" onclick="return doclink('link-29', 'end', 'link-29');">end</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"> </tt>
<a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"> <tt class="py-name">metrics</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt><tt class="py-op">.</tt><tt class="py-name">metrics</tt> </tt>
<a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"> </tt>
<a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"> <tt id="link-30" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-30', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"> <tt id="link-31" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-31', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Download complete."</tt><tt class="py-op">)</tt> </tt>
<a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">duration</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L59"></a><tt class="py-lineno">59</tt> <tt class="py-line"> <tt id="link-32" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-32', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Duration too short, rate undetermined"</tt><tt class="py-op">)</tt> </tt>
<a name="L60"></a><tt class="py-lineno">60</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L61"></a><tt class="py-lineno">61</tt> <tt class="py-line"> <tt id="link-33" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-33', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Downloaded %.2f bytes in %.2f seconds"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">bytes</tt><tt class="py-op">,</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">duration</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L62"></a><tt class="py-lineno">62</tt> <tt class="py-line"> <tt id="link-34" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-34', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Average rate: %.2f kbps"</tt> <tt class="py-op">%</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">kbps</tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno">63</tt> <tt class="py-line"> <tt id="link-35" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-35', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"%.2f bytes in resent data"</tt> <tt class="py-op">%</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">resent_bytes</tt><tt class="py-op">)</tt> </tt>
<a name="L64"></a><tt class="py-lineno">64</tt> <tt class="py-line"> <tt id="link-36" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-36', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Received %d duplicate packets"</tt> <tt class="py-op">%</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">dupcount</tt><tt class="py-op">)</tt> </tt>
</div><a name="L65"></a><tt class="py-lineno">65</tt> <tt class="py-line"> </tt>
<a name="TftpClient.upload"></a><div id="TftpClient.upload-def"><a name="L66"></a><tt class="py-lineno">66</tt> <a class="py-toggle" href="#" id="TftpClient.upload-toggle" onclick="return toggle('TftpClient.upload');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpClient'.TftpClient-class.html#upload">upload</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">input</tt><tt class="py-op">,</tt> <tt class="py-param">packethook</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">timeout</tt><tt class="py-op">=</tt><tt id="link-37" class="py-name"><a title="tftpy.TftpClient'.SOCK_TIMEOUT
tftpy.TftpPacketFactory'.SOCK_TIMEOUT
tftpy.TftpServer'.SOCK_TIMEOUT
tftpy.TftpShared.SOCK_TIMEOUT" class="py-name" href="#" onclick="return doclink('link-37', 'SOCK_TIMEOUT', 'link-19');">SOCK_TIMEOUT</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpClient.upload-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="TftpClient.upload-expanded"><a name="L67"></a><tt class="py-lineno">67</tt> <tt class="py-line"> <tt class="py-comment"># Open the input file.</tt> </tt>
<a name="L68"></a><tt class="py-lineno">68</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># FIXME: As of the state machine, this is now broken. Need to</tt> </tt>
<a name="L69"></a><tt class="py-lineno">69</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># implement with new state machine.</tt> </tt>
<a name="L70"></a><tt class="py-lineno">70</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt> <tt class="py-op">=</tt> <tt id="link-38" class="py-name"><a title="tftpy.TftpStates.TftpContextClientUpload" class="py-name" href="#" onclick="return doclink('link-38', 'TftpContextClientUpload', 'link-4');">TftpContextClientUpload</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="tftpy.TftpStates.TftpContext.host" class="py-name" href="#" onclick="return doclink('link-39', 'host', 'link-7');">host</a></tt><tt class="py-op">,</tt> </tt>
<a name="L71"></a><tt class="py-lineno">71</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">iport</tt><tt class="py-op">,</tt> </tt>
<a name="L72"></a><tt class="py-lineno">72</tt> <tt class="py-line"> <tt class="py-name">filename</tt><tt class="py-op">,</tt> </tt>
<a name="L73"></a><tt class="py-lineno">73</tt> <tt class="py-line"> <tt class="py-name">input</tt><tt class="py-op">,</tt> </tt>
<a name="L74"></a><tt class="py-lineno">74</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-40', 'options', 'link-9');">options</a></tt><tt class="py-op">,</tt> </tt>
<a name="L75"></a><tt class="py-lineno">75</tt> <tt class="py-line"> <tt class="py-name">packethook</tt><tt class="py-op">,</tt> </tt>
<a name="L76"></a><tt class="py-lineno">76</tt> <tt class="py-line"> <tt class="py-name">timeout</tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno">77</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name"><a title="tftpy.TftpStates.TftpContext.start
tftpy.TftpStates.TftpContextClientDownload.start
tftpy.TftpStates.TftpContextClientUpload.start
tftpy.TftpStates.TftpContextServer.start" class="py-name" href="#" onclick="return doclink('link-41', 'start', 'link-28');">start</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L78"></a><tt class="py-lineno">78</tt> <tt class="py-line"> <tt class="py-comment"># Upload happens here</tt> </tt>
<a name="L79"></a><tt class="py-lineno">79</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="tftpy.TftpStates.TftpContext.end
tftpy.TftpStates.TftpContextClientDownload.end
tftpy.TftpStates.TftpContextClientUpload.end
tftpy.TftpStates.TftpContextServer.end" class="py-name" href="#" onclick="return doclink('link-42', 'end', 'link-29');">end</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L80"></a><tt class="py-lineno">80</tt> <tt class="py-line"> </tt>
<a name="L81"></a><tt class="py-lineno">81</tt> <tt class="py-line"> <tt class="py-name">metrics</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">context</tt><tt class="py-op">.</tt><tt class="py-name">metrics</tt> </tt>
<a name="L82"></a><tt class="py-lineno">82</tt> <tt class="py-line"> </tt>
<a name="L83"></a><tt class="py-lineno">83</tt> <tt class="py-line"> <tt id="link-43" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-43', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L84"></a><tt class="py-lineno">84</tt> <tt class="py-line"> <tt id="link-44" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-44', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Upload complete."</tt><tt class="py-op">)</tt> </tt>
<a name="L85"></a><tt class="py-lineno">85</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">duration</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L86"></a><tt class="py-lineno">86</tt> <tt class="py-line"> <tt id="link-45" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-45', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Duration too short, rate undetermined"</tt><tt class="py-op">)</tt> </tt>
<a name="L87"></a><tt class="py-lineno">87</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L88"></a><tt class="py-lineno">88</tt> <tt class="py-line"> <tt id="link-46" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-46', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Uploaded %.2f bytes in %.2f seconds"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">bytes</tt><tt class="py-op">,</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">duration</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno">89</tt> <tt class="py-line"> <tt id="link-47" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-47', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Average rate: %.2f kbps"</tt> <tt class="py-op">%</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">kbps</tt><tt class="py-op">)</tt> </tt>
<a name="L90"></a><tt class="py-lineno">90</tt> <tt class="py-line"> <tt id="link-48" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-48', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"%.2f bytes in resent data"</tt> <tt class="py-op">%</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">resent_bytes</tt><tt class="py-op">)</tt> </tt>
<a name="L91"></a><tt class="py-lineno">91</tt> <tt class="py-line"> <tt id="link-49" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-49', 'log', 'link-20');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Resent %d packets"</tt> <tt class="py-op">%</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">dupcount</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L92"></a><tt class="py-lineno">92</tt> <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:22 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,314 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpClient'.TftpClient</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpClient%27-module.html">Module&nbsp;TftpClient'</a> ::
Class&nbsp;TftpClient
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpClient%27.TftpClient-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpClient</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpClient%27-pysrc.html#TftpClient">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpPacketTypes.TftpSession-class.html">TftpPacketTypes.TftpSession</a> --+
|
<strong class="uidshort">TftpClient</strong>
</pre>
<hr />
<p>This class is an implementation of a tftp client. Once instantiated, a
download can be initiated via the download() method.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpClient%27.TftpClient-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">host</span>,
<span class="summary-sig-arg">port</span>,
<span class="summary-sig-arg">options</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
This constructor returns an instance of TftpClient, taking the remote
host, the remote port, and the filename to fetch.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpClient%27-pysrc.html#TftpClient.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpClient%27.TftpClient-class.html#download" class="summary-sig-name">download</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">filename</span>,
<span class="summary-sig-arg">output</span>,
<span class="summary-sig-arg">packethook</span>=<span class="summary-sig-default">None</span>,
<span class="summary-sig-arg">timeout</span>=<span class="summary-sig-default">5</span>)</span><br />
This method initiates a tftp download from the configured remote
host, requesting the filename passed.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpClient%27-pysrc.html#TftpClient.download">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="upload"></a><span class="summary-sig-name">upload</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">filename</span>,
<span class="summary-sig-arg">input</span>,
<span class="summary-sig-arg">packethook</span>=<span class="summary-sig-default">None</span>,
<span class="summary-sig-arg">timeout</span>=<span class="summary-sig-default">5</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpClient%27-pysrc.html#TftpClient.upload">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">host</span>,
<span class="sig-arg">port</span>,
<span class="sig-arg">options</span>=<span class="sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpClient%27-pysrc.html#TftpClient.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>This constructor returns an instance of TftpClient, taking the remote
host, the remote port, and the filename to fetch.</p>
<dl class="fields">
<dt>Overrides:
object.__init__
</dt>
</dl>
</td></tr></table>
</div>
<a name="download"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">download</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">filename</span>,
<span class="sig-arg">output</span>,
<span class="sig-arg">packethook</span>=<span class="sig-default">None</span>,
<span class="sig-arg">timeout</span>=<span class="sig-default">5</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpClient%27-pysrc.html#TftpClient.download">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>This method initiates a tftp download from the configured remote host,
requesting the filename passed. It saves the file to a local file
specified in the output parameter. If a packethook is provided, it must
be a function that takes a single parameter, which will be a copy of each
DAT packet received in the form of a TftpPacketDAT object. The timeout
parameter may be used to override the default SOCK_TIMEOUT setting, which
is the amount of time that the client will wait for a receive packet to
arrive.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,211 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketFactory'</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
Module&nbsp;TftpPacketFactory'
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketFactory%27-module.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module TftpPacketFactory'</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketFactory%27-pysrc.html">source&nbsp;code</a></span></p>
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Classes</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Classes"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html" class="summary-name">TftpPacketFactory</a><br />
This class generates TftpPacket objects.
</td>
</tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Variables"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="DEF_BLKSIZE"></a><span class="summary-name">DEF_BLKSIZE</span> = <code title="512">512</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="DEF_TFTP_PORT"></a><span class="summary-name">DEF_TFTP_PORT</span> = <code title="69">69</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="LOG_LEVEL"></a><span class="summary-name">LOG_LEVEL</span> = <code title="0">0</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MAX_BLKSIZE"></a><span class="summary-name">MAX_BLKSIZE</span> = <code title="65536">65536</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MAX_DUPS"></a><span class="summary-name">MAX_DUPS</span> = <code title="20">20</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MIN_BLKSIZE"></a><span class="summary-name">MIN_BLKSIZE</span> = <code title="8">8</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="SOCK_TIMEOUT"></a><span class="summary-name">SOCK_TIMEOUT</span> = <code title="5">5</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="TIMEOUT_RETRIES"></a><span class="summary-name">TIMEOUT_RETRIES</span> = <code title="5">5</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="log"></a><span class="summary-name">log</span> = <code title="logging.getLogger('tftpy')">logging.getLogger('tftpy')</code>
</td>
</tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,159 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketFactory'</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
Module&nbsp;TftpPacketFactory'
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketFactory%27-pysrc.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Source Code for <a href="tftpy.TftpPacketFactory%27-module.html">Module tftpy.TftpPacketFactory'</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module tftpy.TftpShared=tftpy.TftpShared-module.html"><a title="tftpy.TftpShared" class="py-name" href="#" onclick="return doclink('link-0', 'TftpShared', 'link-0');">TftpShared</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Module tftpy.TftpPacketTypes=tftpy.TftpPacketTypes-module.html"><a title="tftpy.TftpPacketTypes" class="py-name" href="#" onclick="return doclink('link-1', 'TftpPacketTypes', 'link-1');">TftpPacketTypes</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
<a name="TftpPacketFactory"></a><div id="TftpPacketFactory-def"><a name="L4"></a><tt class="py-lineno"> 4</tt> <a class="py-toggle" href="#" id="TftpPacketFactory-toggle" onclick="return toggle('TftpPacketFactory');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpPacketFactory'.TftpPacketFactory-class.html">TftpPacketFactory</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketFactory-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="TftpPacketFactory-expanded"><a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> <tt class="py-docstring">"""This class generates TftpPacket objects. It is responsible for parsing</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> raw buffers off of the wire and returning objects representing them, via</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"> the parse() method."""</tt> </tt>
<a name="TftpPacketFactory.__init__"></a><div id="TftpPacketFactory.__init__-def"><a name="L8"></a><tt class="py-lineno"> 8</tt> <a class="py-toggle" href="#" id="TftpPacketFactory.__init__-toggle" onclick="return toggle('TftpPacketFactory.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketFactory'.TftpPacketFactory-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketFactory.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="TftpPacketFactory.__init__-expanded"><a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">classes</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"> <tt class="py-number">1</tt><tt class="py-op">:</tt> <tt id="link-2" class="py-name" targets="Class tftpy.TftpPacketTypes.TftpPacketRRQ=tftpy.TftpPacketTypes.TftpPacketRRQ-class.html"><a title="tftpy.TftpPacketTypes.TftpPacketRRQ" class="py-name" href="#" onclick="return doclink('link-2', 'TftpPacketRRQ', 'link-2');">TftpPacketRRQ</a></tt><tt class="py-op">,</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"> <tt class="py-number">2</tt><tt class="py-op">:</tt> <tt id="link-3" class="py-name" targets="Class tftpy.TftpPacketTypes.TftpPacketWRQ=tftpy.TftpPacketTypes.TftpPacketWRQ-class.html"><a title="tftpy.TftpPacketTypes.TftpPacketWRQ" class="py-name" href="#" onclick="return doclink('link-3', 'TftpPacketWRQ', 'link-3');">TftpPacketWRQ</a></tt><tt class="py-op">,</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"> <tt class="py-number">3</tt><tt class="py-op">:</tt> <tt id="link-4" class="py-name" targets="Class tftpy.TftpPacketTypes.TftpPacketDAT=tftpy.TftpPacketTypes.TftpPacketDAT-class.html"><a title="tftpy.TftpPacketTypes.TftpPacketDAT" class="py-name" href="#" onclick="return doclink('link-4', 'TftpPacketDAT', 'link-4');">TftpPacketDAT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"> <tt class="py-number">4</tt><tt class="py-op">:</tt> <tt id="link-5" class="py-name" targets="Class tftpy.TftpPacketTypes.TftpPacketACK=tftpy.TftpPacketTypes.TftpPacketACK-class.html"><a title="tftpy.TftpPacketTypes.TftpPacketACK" class="py-name" href="#" onclick="return doclink('link-5', 'TftpPacketACK', 'link-5');">TftpPacketACK</a></tt><tt class="py-op">,</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"> <tt class="py-number">5</tt><tt class="py-op">:</tt> <tt id="link-6" class="py-name" targets="Class tftpy.TftpPacketTypes.TftpPacketERR=tftpy.TftpPacketTypes.TftpPacketERR-class.html"><a title="tftpy.TftpPacketTypes.TftpPacketERR" class="py-name" href="#" onclick="return doclink('link-6', 'TftpPacketERR', 'link-6');">TftpPacketERR</a></tt><tt class="py-op">,</tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"> <tt class="py-number">6</tt><tt class="py-op">:</tt> <tt id="link-7" class="py-name" targets="Class tftpy.TftpPacketTypes.TftpPacketOACK=tftpy.TftpPacketTypes.TftpPacketOACK-class.html"><a title="tftpy.TftpPacketTypes.TftpPacketOACK" class="py-name" href="#" onclick="return doclink('link-7', 'TftpPacketOACK', 'link-7');">TftpPacketOACK</a></tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"> <tt class="py-op">}</tt> </tt>
</div><a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"> </tt>
<a name="TftpPacketFactory.parse"></a><div id="TftpPacketFactory.parse-def"><a name="L18"></a><tt class="py-lineno">18</tt> <a class="py-toggle" href="#" id="TftpPacketFactory.parse-toggle" onclick="return toggle('TftpPacketFactory.parse');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketFactory'.TftpPacketFactory-class.html#parse">parse</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">buffer</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketFactory.parse-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="TftpPacketFactory.parse-expanded"><a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"> <tt class="py-docstring">"""This method is used to parse an existing datagram into its</tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"><tt class="py-docstring"> corresponding TftpPacket object. The buffer is the raw bytes off of</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"><tt class="py-docstring"> the network."""</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> <tt id="link-8" class="py-name" targets="Variable tftpy.TftpClient'.log=tftpy.TftpClient%27-module.html#log,Variable tftpy.TftpPacketFactory'.log=tftpy.TftpPacketFactory%27-module.html#log,Variable tftpy.TftpServer'.log=tftpy.TftpServer%27-module.html#log,Variable tftpy.TftpShared.log=tftpy.TftpShared-module.html#log"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-8', 'log', 'link-8');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"parsing a %d byte packet"</tt> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">opcode</tt><tt class="py-op">,</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">"!H"</tt><tt class="py-op">,</tt> <tt class="py-name">buffer</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> <tt id="link-9" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-9', 'log', 'link-8');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"opcode is %d"</tt> <tt class="py-op">%</tt> <tt class="py-name">opcode</tt><tt class="py-op">)</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"> <tt class="py-name">packet</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Method tftpy.TftpPacketFactory'.TftpPacketFactory.__create()=tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html#__create"><a title="tftpy.TftpPacketFactory'.TftpPacketFactory.__create" class="py-name" href="#" onclick="return doclink('link-10', '__create', 'link-10');">__create</a></tt><tt class="py-op">(</tt><tt class="py-name">opcode</tt><tt class="py-op">)</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"> <tt class="py-name">packet</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt> <tt class="py-op">=</tt> <tt class="py-name">buffer</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">packet</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method tftpy.TftpPacketTypes.TftpPacket.decode()=tftpy.TftpPacketTypes.TftpPacket-class.html#decode,Method tftpy.TftpPacketTypes.TftpPacketACK.decode()=tftpy.TftpPacketTypes.TftpPacketACK-class.html#decode,Method tftpy.TftpPacketTypes.TftpPacketDAT.decode()=tftpy.TftpPacketTypes.TftpPacketDAT-class.html#decode,Method tftpy.TftpPacketTypes.TftpPacketERR.decode()=tftpy.TftpPacketTypes.TftpPacketERR-class.html#decode,Method tftpy.TftpPacketTypes.TftpPacketInitial.decode()=tftpy.TftpPacketTypes.TftpPacketInitial-class.html#decode,Method tftpy.TftpPacketTypes.TftpPacketOACK.decode()=tftpy.TftpPacketTypes.TftpPacketOACK-class.html#decode"><a title="tftpy.TftpPacketTypes.TftpPacket.decode
tftpy.TftpPacketTypes.TftpPacketACK.decode
tftpy.TftpPacketTypes.TftpPacketDAT.decode
tftpy.TftpPacketTypes.TftpPacketERR.decode
tftpy.TftpPacketTypes.TftpPacketInitial.decode
tftpy.TftpPacketTypes.TftpPacketOACK.decode" class="py-name" href="#" onclick="return doclink('link-11', 'decode', 'link-11');">decode</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"> </tt>
<a name="TftpPacketFactory.__create"></a><div id="TftpPacketFactory.__create-def"><a name="L29"></a><tt class="py-lineno">29</tt> <a class="py-toggle" href="#" id="TftpPacketFactory.__create-toggle" onclick="return toggle('TftpPacketFactory.__create');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketFactory'.TftpPacketFactory-class.html#__create">__create</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">opcode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketFactory.__create-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="TftpPacketFactory.__create-expanded"><a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"> <tt class="py-docstring">"""This method returns the appropriate class object corresponding to</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> the passed opcode."""</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"> <tt id="link-12" class="py-name" targets="Function tftpy.TftpShared.tftpassert()=tftpy.TftpShared-module.html#tftpassert"><a title="tftpy.TftpShared.tftpassert" class="py-name" href="#" onclick="return doclink('link-12', 'tftpassert', 'link-12');">tftpassert</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">classes</tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt class="py-name">opcode</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"> <tt class="py-string">"Unsupported opcode: %d"</tt> <tt class="py-op">%</tt> <tt class="py-name">opcode</tt><tt class="py-op">)</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"> <tt class="py-name">packet</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">classes</tt><tt class="py-op">[</tt><tt class="py-name">opcode</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">packet</tt> </tt>
</div></div><a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:22 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,295 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketFactory'.TftpPacketFactory</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpPacketFactory%27-module.html">Module&nbsp;TftpPacketFactory'</a> ::
Class&nbsp;TftpPacketFactory
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpPacketFactory</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketFactory%27-pysrc.html#TftpPacketFactory">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<strong class="uidshort">TftpPacketFactory</strong>
</pre>
<hr />
<p>This class generates TftpPacket objects. It is responsible for parsing
raw buffers off of the wire and returning objects representing them, via
the parse() method.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="__create"></a><span class="summary-sig-name">__create</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">opcode</span>)</span><br />
This method returns the appropriate class object corresponding to the
passed opcode.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketFactory%27-pysrc.html#TftpPacketFactory.__create">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketFactory%27-pysrc.html#TftpPacketFactory.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html#parse" class="summary-sig-name">parse</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">buffer</span>)</span><br />
This method is used to parse an existing datagram into its
corresponding TftpPacket object.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketFactory%27-pysrc.html#TftpPacketFactory.parse">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketFactory%27-pysrc.html#TftpPacketFactory.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
signature</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="parse"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">parse</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">buffer</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketFactory%27-pysrc.html#TftpPacketFactory.parse">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>This method is used to parse an existing datagram into its
corresponding TftpPacket object. The buffer is the raw bytes off of the
network.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,210 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketTypes</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
Module&nbsp;TftpPacketTypes
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketTypes-module.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module TftpPacketTypes</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html">source&nbsp;code</a></span></p>
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Classes</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Classes"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpPacketTypes.TftpSession-class.html" class="summary-name">TftpSession</a><br />
This class is the base class for the tftp client and server.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html" class="summary-name">TftpPacketWithOptions</a><br />
This class exists to permit some TftpPacket subclasses to share
code regarding options handling.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html" class="summary-name">TftpPacket</a><br />
This class is the parent class of all tftp packet classes.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html" class="summary-name">TftpPacketInitial</a><br />
This class is a common parent class for the RRQ and WRQ packets, as
they share quite a bit of code.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html" class="summary-name">TftpPacketRRQ</a><br />
2 bytes string 1 byte string 1 byte...
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html" class="summary-name">TftpPacketWRQ</a><br />
2 bytes string 1 byte string 1 byte...
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html" class="summary-name">TftpPacketDAT</a><br />
2 bytes 2 bytes n bytes...
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html" class="summary-name">TftpPacketACK</a><br />
2 bytes 2 bytes...
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html" class="summary-name">TftpPacketERR</a><br />
2 bytes 2 bytes string 1 byte
----------------------------------------
ERROR | 05 | ErrorCode | ErrMsg | 0 |
----------------------------------------
Error Codes
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html" class="summary-name">TftpPacketOACK</a><br />
# +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+ #
| opc | opt1 | 0 | value1 | 0 | optN | 0 | valueN | 0 | #
+-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
</td>
</tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,833 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketTypes</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
Module&nbsp;TftpPacketTypes
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketTypes-pysrc.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Source Code for <a href="tftpy.TftpPacketTypes-module.html">Module tftpy.TftpPacketTypes</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">struct</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module tftpy.TftpShared=tftpy.TftpShared-module.html"><a title="tftpy.TftpShared" class="py-name" href="#" onclick="return doclink('link-0', 'TftpShared', 'link-0');">TftpShared</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
<a name="TftpSession"></a><div id="TftpSession-def"><a name="L4"></a><tt class="py-lineno"> 4</tt> <a class="py-toggle" href="#" id="TftpSession-toggle" onclick="return toggle('TftpSession');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpSession-class.html">TftpSession</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpSession-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TftpSession-expanded"><a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> <tt class="py-docstring">"""This class is the base class for the tftp client and server. Any shared</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> code should be in this class."""</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"> <tt class="py-comment"># FIXME: do we need this anymore?</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">pass</tt> </tt>
</div><a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"> </tt>
<a name="TftpPacketWithOptions"></a><div id="TftpPacketWithOptions-def"><a name="L10"></a><tt class="py-lineno"> 10</tt> <a class="py-toggle" href="#" id="TftpPacketWithOptions-toggle" onclick="return toggle('TftpPacketWithOptions');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketWithOptions-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TftpPacketWithOptions-expanded"><a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"> <tt class="py-docstring">"""This class exists to permit some TftpPacket subclasses to share code</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-docstring"> regarding options handling. It does not inherit from TftpPacket, as the</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-docstring"> goal is just to share code here, and not cause diamond inheritance."""</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"> </tt>
<a name="TftpPacketWithOptions.__init__"></a><div id="TftpPacketWithOptions.__init__-def"><a name="L15"></a><tt class="py-lineno"> 15</tt> <a class="py-toggle" href="#" id="TftpPacketWithOptions.__init__-toggle" onclick="return toggle('TftpPacketWithOptions.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketWithOptions.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketWithOptions.__init__-expanded"><a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Variable tftpy.TftpPacketTypes.TftpPacketWithOptions.options=tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-1', 'options', 'link-1');">options</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
</div><a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"> </tt>
<a name="TftpPacketWithOptions.setoptions"></a><div id="TftpPacketWithOptions.setoptions-def"><a name="L18"></a><tt class="py-lineno"> 18</tt> <a class="py-toggle" href="#" id="TftpPacketWithOptions.setoptions-toggle" onclick="return toggle('TftpPacketWithOptions.setoptions');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions">setoptions</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">options</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketWithOptions.setoptions-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketWithOptions.setoptions-expanded"><a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"> <tt id="link-2" class="py-name" targets="Variable tftpy.TftpClient'.log=tftpy.TftpClient%27-module.html#log,Variable tftpy.TftpPacketFactory'.log=tftpy.TftpPacketFactory%27-module.html#log,Variable tftpy.TftpServer'.log=tftpy.TftpServer%27-module.html#log,Variable tftpy.TftpShared.log=tftpy.TftpShared-module.html#log"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-2', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"in TftpPacketWithOptions.setoptions"</tt><tt class="py-op">)</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"> <tt id="link-3" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-3', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"options: "</tt> <tt class="py-op">+</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-4" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-4', 'options', 'link-1');">options</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"> <tt class="py-name">myoptions</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-5" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-5', 'options', 'link-1');">options</a></tt><tt class="py-op">:</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"> <tt class="py-name">newkey</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"> <tt class="py-name">myoptions</tt><tt class="py-op">[</tt><tt class="py-name">newkey</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-6" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-6', 'options', 'link-1');">options</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"> <tt id="link-7" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-7', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"populated myoptions with %s = %s"</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">newkey</tt><tt class="py-op">,</tt> <tt class="py-name">myoptions</tt><tt class="py-op">[</tt><tt class="py-name">newkey</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"> <tt id="link-8" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-8', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"setting options hash to: "</tt> <tt class="py-op">+</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">myoptions</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_options</tt> <tt class="py-op">=</tt> <tt class="py-name">myoptions</tt> </tt>
</div><a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"> </tt>
<a name="TftpPacketWithOptions.getoptions"></a><div id="TftpPacketWithOptions.getoptions-def"><a name="L31"></a><tt class="py-lineno"> 31</tt> <a class="py-toggle" href="#" id="TftpPacketWithOptions.getoptions-toggle" onclick="return toggle('TftpPacketWithOptions.getoptions');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions">getoptions</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketWithOptions.getoptions-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketWithOptions.getoptions-expanded"><a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"> <tt id="link-9" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-9', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"in TftpPacketWithOptions.getoptions"</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_options</tt> </tt>
</div><a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"> <tt class="py-comment"># Set up getter and setter on options to ensure that they are the proper</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># type. They should always be strings, but we don't need to force the</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># client to necessarily enter strings if we can avoid it.</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt id="link-10" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-10', 'options', 'link-1');">options</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-11" class="py-name" targets="Method tftpy.TftpPacketTypes.TftpPacketWithOptions.getoptions()=tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.getoptions" class="py-name" href="#" onclick="return doclink('link-11', 'getoptions', 'link-11');">getoptions</a></tt><tt class="py-op">,</tt> <tt id="link-12" class="py-name" targets="Method tftpy.TftpPacketTypes.TftpPacketWithOptions.setoptions()=tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.setoptions" class="py-name" href="#" onclick="return doclink('link-12', 'setoptions', 'link-12');">setoptions</a></tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"> </tt>
<a name="TftpPacketWithOptions.decode_options"></a><div id="TftpPacketWithOptions.decode_options-def"><a name="L40"></a><tt class="py-lineno"> 40</tt> <a class="py-toggle" href="#" id="TftpPacketWithOptions.decode_options-toggle" onclick="return toggle('TftpPacketWithOptions.decode_options');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options">decode_options</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">buffer</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketWithOptions.decode_options-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketWithOptions.decode_options-expanded"><a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"> <tt class="py-docstring">"""This method decodes the section of the buffer that contains an</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"><tt class="py-docstring"> unknown number of options. It returns a dictionary of option names and</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"><tt class="py-docstring"> values."""</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"> <tt class="py-name">nulls</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-string">"!"</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"> <tt id="link-13" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-13', 'options', 'link-1');">options</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"> <tt id="link-14" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-14', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"decode_options: buffer is: "</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"> <tt id="link-15" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-15', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"size of buffer is %d bytes"</tt> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"> <tt id="link-16" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-16', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"size of buffer is zero, returning empty hash"</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"> <tt class="py-comment"># Count the nulls in the buffer. Each one terminates a string.</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt id="link-17" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-17', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"about to iterate options buffer counting nulls"</tt><tt class="py-op">)</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"> <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">buffer</tt><tt class="py-op">:</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt> <tt class="py-line"> <tt class="py-comment">#log.debug("iterating this byte: " + repr(c))</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-name">ord</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"> <tt id="link-18" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-18', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"found a null at length %d"</tt> <tt class="py-op">%</tt> <tt class="py-name">length</tt><tt class="py-op">)</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">length</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">+=</tt> <tt class="py-string">"%dsx"</tt> <tt class="py-op">%</tt> <tt class="py-name">length</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"> <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-19" class="py-name" targets="Class tftpy.TftpShared.TftpException=tftpy.TftpShared.TftpException-class.html"><a title="tftpy.TftpShared.TftpException" class="py-name" href="#" onclick="return doclink('link-19', 'TftpException', 'link-19');">TftpException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Invalid options in buffer"</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"> <tt class="py-name">length</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"> <tt id="link-20" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-20', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"about to unpack, format is: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"> <tt class="py-name">mystruct</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> <tt class="py-name">buffer</tt><tt class="py-op">)</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"> <tt id="link-21" class="py-name" targets="Function tftpy.TftpShared.tftpassert()=tftpy.TftpShared-module.html#tftpassert"><a title="tftpy.TftpShared.tftpassert" class="py-name" href="#" onclick="return doclink('link-21', 'tftpassert', 'link-21');">tftpassert</a></tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">mystruct</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-number">2</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"> <tt class="py-string">"packet with odd number of option/value pairs"</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">mystruct</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"> <tt id="link-22" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-22', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"setting option %s to %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">mystruct</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">mystruct</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"> <tt id="link-23" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-23', 'options', 'link-1');">options</a></tt><tt class="py-op">[</tt><tt class="py-name">mystruct</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">mystruct</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt id="link-24" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-24', 'options', 'link-1');">options</a></tt> </tt>
</div></div><a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"> </tt>
<a name="TftpPacket"></a><div id="TftpPacket-def"><a name="L80"></a><tt class="py-lineno"> 80</tt> <a class="py-toggle" href="#" id="TftpPacket-toggle" onclick="return toggle('TftpPacket');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacket-class.html">TftpPacket</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacket-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TftpPacket-expanded"><a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"> <tt class="py-docstring">"""This class is the parent class of all tftp packet classes. It is an</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"><tt class="py-docstring"> abstract class, providing an interface, and should not be instantiated</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"><tt class="py-docstring"> directly."""</tt> </tt>
<a name="TftpPacket.__init__"></a><div id="TftpPacket.__init__-def"><a name="L84"></a><tt class="py-lineno"> 84</tt> <a class="py-toggle" href="#" id="TftpPacket.__init__-toggle" onclick="return toggle('TftpPacket.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacket-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacket.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacket.__init__-expanded"><a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"> </tt>
<a name="TftpPacket.encode"></a><div id="TftpPacket.encode-def"><a name="L88"></a><tt class="py-lineno"> 88</tt> <a class="py-toggle" href="#" id="TftpPacket.encode-toggle" onclick="return toggle('TftpPacket.encode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacket-class.html#encode">encode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacket.encode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacket.encode-expanded"><a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"> <tt class="py-docstring">"""The encode method of a TftpPacket takes keyword arguments specific</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"><tt class="py-docstring"> to the type of packet, and packs an appropriate buffer in network-byte</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt> <tt class="py-line"><tt class="py-docstring"> order suitable for sending over the wire.</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"><tt class="py-docstring"> This is an abstract method."""</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt><tt class="py-op">,</tt> <tt class="py-string">"Abstract method"</tt> </tt>
</div><a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"> </tt>
<a name="TftpPacket.decode"></a><div id="TftpPacket.decode-def"><a name="L96"></a><tt class="py-lineno"> 96</tt> <a class="py-toggle" href="#" id="TftpPacket.decode-toggle" onclick="return toggle('TftpPacket.decode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacket-class.html#decode">decode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacket.decode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacket.decode-expanded"><a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"> <tt class="py-docstring">"""The decode method of a TftpPacket takes a buffer off of the wire in</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"><tt class="py-docstring"> network-byte order, and decodes it, populating internal properties as</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"><tt class="py-docstring"> appropriate. This can only be done once the first 2-byte opcode has</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"><tt class="py-docstring"> already been decoded, but the data section does include the entire</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt> <tt class="py-line"><tt class="py-docstring"> datagram.</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line"><tt class="py-docstring"> This is an abstract method."""</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt><tt class="py-op">,</tt> <tt class="py-string">"Abstract method"</tt> </tt>
</div></div><a name="L105"></a><tt class="py-lineno">105</tt> <tt class="py-line"> </tt>
<a name="TftpPacketInitial"></a><div id="TftpPacketInitial-def"><a name="L106"></a><tt class="py-lineno">106</tt> <a class="py-toggle" href="#" id="TftpPacketInitial-toggle" onclick="return toggle('TftpPacketInitial');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">TftpPacketInitial</a><tt class="py-op">(</tt><tt class="py-base-class">TftpPacket</tt><tt class="py-op">,</tt> <tt class="py-base-class">TftpPacketWithOptions</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketInitial-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TftpPacketInitial-expanded"><a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"> <tt class="py-docstring">"""This class is a common parent class for the RRQ and WRQ packets, as</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"><tt class="py-docstring"> they share quite a bit of code."""</tt> </tt>
<a name="TftpPacketInitial.__init__"></a><div id="TftpPacketInitial.__init__-def"><a name="L109"></a><tt class="py-lineno">109</tt> <a class="py-toggle" href="#" id="TftpPacketInitial.__init__-toggle" onclick="return toggle('TftpPacketInitial.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketInitial.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketInitial.__init__-expanded"><a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"> <tt id="link-25" class="py-name" targets="Class tftpy.TftpPacketTypes.TftpPacket=tftpy.TftpPacketTypes.TftpPacket-class.html"><a title="tftpy.TftpPacketTypes.TftpPacket" class="py-name" href="#" onclick="return doclink('link-25', 'TftpPacket', 'link-25');">TftpPacket</a></tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Method tftpy.TftpClient'.TftpClient.__init__()=tftpy.TftpClient%27.TftpClient-class.html#__init__,Method tftpy.TftpPacketFactory'.TftpPacketFactory.__init__()=tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacket.__init__()=tftpy.TftpPacketTypes.TftpPacket-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketACK.__init__()=tftpy.TftpPacketTypes.TftpPacketACK-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketDAT.__init__()=tftpy.TftpPacketTypes.TftpPacketDAT-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketERR.__init__()=tftpy.TftpPacketTypes.TftpPacketERR-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketInitial.__init__()=tftpy.TftpPacketTypes.TftpPacketInitial-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketOACK.__init__()=tftpy.TftpPacketTypes.TftpPacketOACK-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketRRQ.__init__()=tftpy.TftpPacketTypes.TftpPacketRRQ-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketWRQ.__init__()=tftpy.TftpPacketTypes.TftpPacketWRQ-class.html#__init__,Method tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__()=tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#__init__,Method tftpy.TftpServer'.TftpServer.__init__()=tftpy.TftpServer%27.TftpServer-class.html#__init__,Method tftpy.TftpStates.TftpContext.__init__()=tftpy.TftpStates.TftpContext-class.html#__init__,Method tftpy.TftpStates.TftpContextClientDownload.__init__()=tftpy.TftpStates.TftpContextClientDownload-class.html#__init__,Method tftpy.TftpStates.TftpContextClientUpload.__init__()=tftpy.TftpStates.TftpContextClientUpload-class.html#__init__,Method tftpy.TftpStates.TftpContextServer.__init__()=tftpy.TftpStates.TftpContextServer-class.html#__init__,Method tftpy.TftpStates.TftpMetrics.__init__()=tftpy.TftpStates.TftpMetrics-class.html#__init__,Method tftpy.TftpStates.TftpState.__init__()=tftpy.TftpStates.TftpState-class.html#__init__"><a title="tftpy.TftpClient'.TftpClient.__init__
tftpy.TftpPacketFactory'.TftpPacketFactory.__init__
tftpy.TftpPacketTypes.TftpPacket.__init__
tftpy.TftpPacketTypes.TftpPacketACK.__init__
tftpy.TftpPacketTypes.TftpPacketDAT.__init__
tftpy.TftpPacketTypes.TftpPacketERR.__init__
tftpy.TftpPacketTypes.TftpPacketInitial.__init__
tftpy.TftpPacketTypes.TftpPacketOACK.__init__
tftpy.TftpPacketTypes.TftpPacketRRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__
tftpy.TftpServer'.TftpServer.__init__
tftpy.TftpStates.TftpContext.__init__
tftpy.TftpStates.TftpContextClientDownload.__init__
tftpy.TftpStates.TftpContextClientUpload.__init__
tftpy.TftpStates.TftpContextServer.__init__
tftpy.TftpStates.TftpMetrics.__init__
tftpy.TftpStates.TftpState.__init__" class="py-name" href="#" onclick="return doclink('link-26', '__init__', 'link-26');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt> <tt class="py-line"> <tt id="link-27" class="py-name" targets="Class tftpy.TftpPacketTypes.TftpPacketWithOptions=tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions" class="py-name" href="#" onclick="return doclink('link-27', 'TftpPacketWithOptions', 'link-27');">TftpPacketWithOptions</a></tt><tt class="py-op">.</tt><tt id="link-28" class="py-name"><a title="tftpy.TftpClient'.TftpClient.__init__
tftpy.TftpPacketFactory'.TftpPacketFactory.__init__
tftpy.TftpPacketTypes.TftpPacket.__init__
tftpy.TftpPacketTypes.TftpPacketACK.__init__
tftpy.TftpPacketTypes.TftpPacketDAT.__init__
tftpy.TftpPacketTypes.TftpPacketERR.__init__
tftpy.TftpPacketTypes.TftpPacketInitial.__init__
tftpy.TftpPacketTypes.TftpPacketOACK.__init__
tftpy.TftpPacketTypes.TftpPacketRRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__
tftpy.TftpServer'.TftpServer.__init__
tftpy.TftpStates.TftpContext.__init__
tftpy.TftpStates.TftpContextClientDownload.__init__
tftpy.TftpStates.TftpContextClientUpload.__init__
tftpy.TftpStates.TftpContextServer.__init__
tftpy.TftpStates.TftpMetrics.__init__
tftpy.TftpStates.TftpState.__init__" class="py-name" href="#" onclick="return doclink('link-28', '__init__', 'link-26');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"> </tt>
<a name="TftpPacketInitial.encode"></a><div id="TftpPacketInitial.encode-def"><a name="L115"></a><tt class="py-lineno">115</tt> <a class="py-toggle" href="#" id="TftpPacketInitial.encode-toggle" onclick="return toggle('TftpPacketInitial.encode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#encode">encode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketInitial.encode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketInitial.encode-expanded"><a name="L116"></a><tt class="py-lineno">116</tt> <tt class="py-line"> <tt class="py-docstring">"""Encode the packet's buffer from the instance variables."""</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"> <tt id="link-29" class="py-name"><a title="tftpy.TftpShared.tftpassert" class="py-name" href="#" onclick="return doclink('link-29', 'tftpassert', 'link-21');">tftpassert</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">"filename required in initial packet"</tt><tt class="py-op">)</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"> <tt id="link-30" class="py-name"><a title="tftpy.TftpShared.tftpassert" class="py-name" href="#" onclick="return doclink('link-30', 'tftpassert', 'link-21');">tftpassert</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt><tt class="py-op">,</tt> <tt class="py-string">"mode required in initial packet"</tt><tt class="py-op">)</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"> <tt class="py-name">ptype</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> <tt class="py-name">ptype</tt> <tt class="py-op">=</tt> <tt class="py-string">"RRQ"</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-name">ptype</tt> <tt class="py-op">=</tt> <tt class="py-string">"WRQ"</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt> <tt class="py-line"> <tt id="link-31" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-31', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Encoding %s packet, filename = %s, mode = %s"</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">ptype</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-32', 'options', 'link-1');">options</a></tt><tt class="py-op">:</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt> <tt class="py-line"> <tt id="link-33" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-33', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">" Option %s = %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-34', 'options', 'link-1');">options</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-string">"!H"</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">+=</tt> <tt class="py-string">"%dsx"</tt> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> <tt class="py-op">==</tt> <tt class="py-string">"octet"</tt><tt class="py-op">:</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">+=</tt> <tt class="py-string">"5sx"</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">AssertionError</tt><tt class="py-op">,</tt> <tt class="py-string">"Unsupported mode: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">mode</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"> <tt class="py-comment"># Add options.</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">options_list</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-35', 'options', 'link-1');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">keys</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"> <tt id="link-36" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-36', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"there are options to encode"</tt><tt class="py-op">)</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-37', 'options', 'link-1');">options</a></tt><tt class="py-op">:</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line"> <tt class="py-comment"># Populate the option name</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">format</tt> <tt class="py-op">+=</tt> <tt class="py-string">"%dsx"</tt> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"> <tt class="py-name">options_list</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"> <tt class="py-comment"># Populate the option value</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">format</tt> <tt class="py-op">+=</tt> <tt class="py-string">"%dsx"</tt> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-38', 'options', 'link-1');">options</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> <tt class="py-name">options_list</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-39', 'options', 'link-1');">options</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"> <tt id="link-40" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-40', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"format is %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> <tt id="link-41" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-41', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"options_list is %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">options_list</tt><tt class="py-op">)</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line"> <tt id="link-42" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-42', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"size of struct is %d"</tt> <tt class="py-op">%</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">calcsize</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt><tt class="py-op">,</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt><tt class="py-op">,</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"> <tt class="py-op">*</tt><tt class="py-name">options_list</tt><tt class="py-op">)</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"> <tt id="link-43" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-43', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"buffer is "</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line"> </tt>
<a name="TftpPacketInitial.decode"></a><div id="TftpPacketInitial.decode-def"><a name="L159"></a><tt class="py-lineno">159</tt> <a class="py-toggle" href="#" id="TftpPacketInitial.decode-toggle" onclick="return toggle('TftpPacketInitial.decode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#decode">decode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketInitial.decode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketInitial.decode-expanded"><a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> <tt id="link-44" class="py-name"><a title="tftpy.TftpShared.tftpassert" class="py-name" href="#" onclick="return doclink('link-44', 'tftpassert', 'link-21');">tftpassert</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">,</tt> <tt class="py-string">"Can't decode, buffer is empty"</tt><tt class="py-op">)</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt> <tt class="py-line"> <tt class="py-comment"># FIXME - this shares a lot of code with decode_options</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">nulls</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-string">""</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"> <tt class="py-name">nulls</tt> <tt class="py-op">=</tt> <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt class="py-name">tlength</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt> <tt class="py-line"> <tt id="link-45" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-45', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"in decode: about to iterate buffer counting nulls"</tt><tt class="py-op">)</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt> <tt class="py-line"> <tt class="py-name">subbuf</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">subbuf</tt><tt class="py-op">:</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt> <tt class="py-line"> <tt id="link-46" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-46', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"iterating this byte: "</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">ord</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt> <tt class="py-line"> <tt class="py-name">nulls</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt> <tt class="py-line"> <tt id="link-47" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-47', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"found a null at length %d, now have %d"</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">length</tt><tt class="py-op">,</tt> <tt class="py-name">nulls</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">+=</tt> <tt class="py-string">"%dsx"</tt> <tt class="py-op">%</tt> <tt class="py-name">length</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt> <tt class="py-line"> <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt> <tt class="py-line"> <tt class="py-comment"># At 2 nulls, we want to mark that position for decoding.</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-name">nulls</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt> <tt class="py-line"> <tt class="py-keyword">break</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt> <tt class="py-line"> <tt class="py-name">length</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"> <tt class="py-name">tlength</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt> <tt class="py-line"> <tt id="link-48" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-48', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"hopefully found end of mode at length %d"</tt> <tt class="py-op">%</tt> <tt class="py-name">tlength</tt><tt class="py-op">)</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt> <tt class="py-line"> <tt class="py-comment"># length should now be the end of the mode.</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt id="link-49" class="py-name"><a title="tftpy.TftpShared.tftpassert" class="py-name" href="#" onclick="return doclink('link-49', 'tftpassert', 'link-21');">tftpassert</a></tt><tt class="py-op">(</tt><tt class="py-name">nulls</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-string">"malformed packet"</tt><tt class="py-op">)</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt> <tt class="py-line"> <tt class="py-name">shortbuf</tt> <tt class="py-op">=</tt> <tt class="py-name">subbuf</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">tlength</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"> <tt id="link-50" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-50', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"about to unpack buffer with format: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt> <tt class="py-line"> <tt id="link-51" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-51', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"unpacking buffer: "</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">shortbuf</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt> <tt class="py-line"> <tt class="py-name">mystruct</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> <tt class="py-name">shortbuf</tt><tt class="py-op">)</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt> <tt class="py-line"> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt> <tt class="py-line"> <tt id="link-52" class="py-name"><a title="tftpy.TftpShared.tftpassert" class="py-name" href="#" onclick="return doclink('link-52', 'tftpassert', 'link-21');">tftpassert</a></tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">mystruct</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-string">"malformed packet"</tt><tt class="py-op">)</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt> <tt class="py-line"> <tt id="link-53" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-53', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"setting filename to %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">mystruct</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt> <tt class="py-line"> <tt id="link-54" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-54', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"setting mode to %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">mystruct</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt> <tt class="py-op">=</tt> <tt class="py-name">mystruct</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">mystruct</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt> <tt class="py-line"> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-55', 'options', 'link-1');">options</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name" targets="Method tftpy.TftpPacketTypes.TftpPacketWithOptions.decode_options()=tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.decode_options" class="py-name" href="#" onclick="return doclink('link-56', 'decode_options', 'link-56');">decode_options</a></tt><tt class="py-op">(</tt><tt class="py-name">subbuf</tt><tt class="py-op">[</tt><tt class="py-name">tlength</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div></div><a name="L198"></a><tt class="py-lineno">198</tt> <tt class="py-line"> </tt>
<a name="TftpPacketRRQ"></a><div id="TftpPacketRRQ-def"><a name="L199"></a><tt class="py-lineno">199</tt> <a class="py-toggle" href="#" id="TftpPacketRRQ-toggle" onclick="return toggle('TftpPacketRRQ');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html">TftpPacketRRQ</a><tt class="py-op">(</tt><tt class="py-base-class">TftpPacketInitial</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketRRQ-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TftpPacketRRQ-expanded"><a name="L200"></a><tt class="py-lineno">200</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt> <tt class="py-line"><tt class="py-docstring"> 2 bytes string 1 byte string 1 byte</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt> <tt class="py-line"><tt class="py-docstring"> -----------------------------------------------</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt> <tt class="py-line"><tt class="py-docstring">RRQ/ | 01/02 | Filename | 0 | Mode | 0 |</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt> <tt class="py-line"><tt class="py-docstring">WRQ -----------------------------------------------</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="TftpPacketRRQ.__init__"></a><div id="TftpPacketRRQ.__init__-def"><a name="L206"></a><tt class="py-lineno">206</tt> <a class="py-toggle" href="#" id="TftpPacketRRQ.__init__-toggle" onclick="return toggle('TftpPacketRRQ.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketRRQ.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketRRQ.__init__-expanded"><a name="L207"></a><tt class="py-lineno">207</tt> <tt class="py-line"> <tt id="link-57" class="py-name" targets="Class tftpy.TftpPacketTypes.TftpPacketInitial=tftpy.TftpPacketTypes.TftpPacketInitial-class.html"><a title="tftpy.TftpPacketTypes.TftpPacketInitial" class="py-name" href="#" onclick="return doclink('link-57', 'TftpPacketInitial', 'link-57');">TftpPacketInitial</a></tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="tftpy.TftpClient'.TftpClient.__init__
tftpy.TftpPacketFactory'.TftpPacketFactory.__init__
tftpy.TftpPacketTypes.TftpPacket.__init__
tftpy.TftpPacketTypes.TftpPacketACK.__init__
tftpy.TftpPacketTypes.TftpPacketDAT.__init__
tftpy.TftpPacketTypes.TftpPacketERR.__init__
tftpy.TftpPacketTypes.TftpPacketInitial.__init__
tftpy.TftpPacketTypes.TftpPacketOACK.__init__
tftpy.TftpPacketTypes.TftpPacketRRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__
tftpy.TftpServer'.TftpServer.__init__
tftpy.TftpStates.TftpContext.__init__
tftpy.TftpStates.TftpContextClientDownload.__init__
tftpy.TftpStates.TftpContextClientUpload.__init__
tftpy.TftpStates.TftpContextServer.__init__
tftpy.TftpStates.TftpMetrics.__init__
tftpy.TftpStates.TftpState.__init__" class="py-name" href="#" onclick="return doclink('link-58', '__init__', 'link-26');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
</div><a name="L209"></a><tt class="py-lineno">209</tt> <tt class="py-line"> </tt>
<a name="TftpPacketRRQ.__str__"></a><div id="TftpPacketRRQ.__str__-def"><a name="L210"></a><tt class="py-lineno">210</tt> <a class="py-toggle" href="#" id="TftpPacketRRQ.__str__-toggle" onclick="return toggle('TftpPacketRRQ.__str__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketRRQ.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketRRQ.__str__-expanded"><a name="L211"></a><tt class="py-lineno">211</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-string">'RRQ packet: filename = %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">+=</tt> <tt class="py-string">' mode = %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-59', 'options', 'link-1');">options</a></tt><tt class="py-op">:</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">+=</tt> <tt class="py-string">'\n options = %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-60" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-60', 'options', 'link-1');">options</a></tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">s</tt> </tt>
</div></div><a name="L216"></a><tt class="py-lineno">216</tt> <tt class="py-line"> </tt>
<a name="TftpPacketWRQ"></a><div id="TftpPacketWRQ-def"><a name="L217"></a><tt class="py-lineno">217</tt> <a class="py-toggle" href="#" id="TftpPacketWRQ-toggle" onclick="return toggle('TftpPacketWRQ');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html">TftpPacketWRQ</a><tt class="py-op">(</tt><tt class="py-base-class">TftpPacketInitial</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketWRQ-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TftpPacketWRQ-expanded"><a name="L218"></a><tt class="py-lineno">218</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt> <tt class="py-line"><tt class="py-docstring"> 2 bytes string 1 byte string 1 byte</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt> <tt class="py-line"><tt class="py-docstring"> -----------------------------------------------</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt> <tt class="py-line"><tt class="py-docstring">RRQ/ | 01/02 | Filename | 0 | Mode | 0 |</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt> <tt class="py-line"><tt class="py-docstring">WRQ -----------------------------------------------</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="TftpPacketWRQ.__init__"></a><div id="TftpPacketWRQ.__init__-def"><a name="L224"></a><tt class="py-lineno">224</tt> <a class="py-toggle" href="#" id="TftpPacketWRQ.__init__-toggle" onclick="return toggle('TftpPacketWRQ.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketWRQ.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketWRQ.__init__-expanded"><a name="L225"></a><tt class="py-lineno">225</tt> <tt class="py-line"> <tt id="link-61" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketInitial" class="py-name" href="#" onclick="return doclink('link-61', 'TftpPacketInitial', 'link-57');">TftpPacketInitial</a></tt><tt class="py-op">.</tt><tt id="link-62" class="py-name"><a title="tftpy.TftpClient'.TftpClient.__init__
tftpy.TftpPacketFactory'.TftpPacketFactory.__init__
tftpy.TftpPacketTypes.TftpPacket.__init__
tftpy.TftpPacketTypes.TftpPacketACK.__init__
tftpy.TftpPacketTypes.TftpPacketDAT.__init__
tftpy.TftpPacketTypes.TftpPacketERR.__init__
tftpy.TftpPacketTypes.TftpPacketInitial.__init__
tftpy.TftpPacketTypes.TftpPacketOACK.__init__
tftpy.TftpPacketTypes.TftpPacketRRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__
tftpy.TftpServer'.TftpServer.__init__
tftpy.TftpStates.TftpContext.__init__
tftpy.TftpStates.TftpContextClientDownload.__init__
tftpy.TftpStates.TftpContextClientUpload.__init__
tftpy.TftpStates.TftpContextServer.__init__
tftpy.TftpStates.TftpMetrics.__init__
tftpy.TftpStates.TftpState.__init__" class="py-name" href="#" onclick="return doclink('link-62', '__init__', 'link-26');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt> <tt class="py-op">=</tt> <tt class="py-number">2</tt> </tt>
</div><a name="L227"></a><tt class="py-lineno">227</tt> <tt class="py-line"> </tt>
<a name="TftpPacketWRQ.__str__"></a><div id="TftpPacketWRQ.__str__-def"><a name="L228"></a><tt class="py-lineno">228</tt> <a class="py-toggle" href="#" id="TftpPacketWRQ.__str__-toggle" onclick="return toggle('TftpPacketWRQ.__str__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketWRQ.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketWRQ.__str__-expanded"><a name="L229"></a><tt class="py-lineno">229</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-string">'WRQ packet: filename = %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">+=</tt> <tt class="py-string">' mode = %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-63', 'options', 'link-1');">options</a></tt><tt class="py-op">:</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">+=</tt> <tt class="py-string">'\n options = %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-64', 'options', 'link-1');">options</a></tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">s</tt> </tt>
</div></div><a name="L234"></a><tt class="py-lineno">234</tt> <tt class="py-line"> </tt>
<a name="TftpPacketDAT"></a><div id="TftpPacketDAT-def"><a name="L235"></a><tt class="py-lineno">235</tt> <a class="py-toggle" href="#" id="TftpPacketDAT-toggle" onclick="return toggle('TftpPacketDAT');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html">TftpPacketDAT</a><tt class="py-op">(</tt><tt class="py-base-class">TftpPacket</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketDAT-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TftpPacketDAT-expanded"><a name="L236"></a><tt class="py-lineno">236</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt> <tt class="py-line"><tt class="py-docstring"> 2 bytes 2 bytes n bytes</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt> <tt class="py-line"><tt class="py-docstring"> ---------------------------------</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt> <tt class="py-line"><tt class="py-docstring">DATA | 03 | Block # | Data |</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt> <tt class="py-line"><tt class="py-docstring"> ---------------------------------</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="TftpPacketDAT.__init__"></a><div id="TftpPacketDAT.__init__-def"><a name="L242"></a><tt class="py-lineno">242</tt> <a class="py-toggle" href="#" id="TftpPacketDAT.__init__-toggle" onclick="return toggle('TftpPacketDAT.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketDAT.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketDAT.__init__-expanded"><a name="L243"></a><tt class="py-lineno">243</tt> <tt class="py-line"> <tt id="link-65" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacket" class="py-name" href="#" onclick="return doclink('link-65', 'TftpPacket', 'link-25');">TftpPacket</a></tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="tftpy.TftpClient'.TftpClient.__init__
tftpy.TftpPacketFactory'.TftpPacketFactory.__init__
tftpy.TftpPacketTypes.TftpPacket.__init__
tftpy.TftpPacketTypes.TftpPacketACK.__init__
tftpy.TftpPacketTypes.TftpPacketDAT.__init__
tftpy.TftpPacketTypes.TftpPacketERR.__init__
tftpy.TftpPacketTypes.TftpPacketInitial.__init__
tftpy.TftpPacketTypes.TftpPacketOACK.__init__
tftpy.TftpPacketTypes.TftpPacketRRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__
tftpy.TftpServer'.TftpServer.__init__
tftpy.TftpStates.TftpContext.__init__
tftpy.TftpStates.TftpContextClientDownload.__init__
tftpy.TftpStates.TftpContextClientUpload.__init__
tftpy.TftpStates.TftpContextServer.__init__
tftpy.TftpStates.TftpMetrics.__init__
tftpy.TftpStates.TftpState.__init__" class="py-name" href="#" onclick="return doclink('link-66', '__init__', 'link-26');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt> <tt class="py-op">=</tt> <tt class="py-number">3</tt> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocknumber</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L247"></a><tt class="py-lineno">247</tt> <tt class="py-line"> </tt>
<a name="TftpPacketDAT.__str__"></a><div id="TftpPacketDAT.__str__-def"><a name="L248"></a><tt class="py-lineno">248</tt> <a class="py-toggle" href="#" id="TftpPacketDAT.__str__-toggle" onclick="return toggle('TftpPacketDAT.__str__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketDAT.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketDAT.__str__-expanded"><a name="L249"></a><tt class="py-lineno">249</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-string">'DAT packet: block %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocknumber</tt> </tt>
<a name="L250"></a><tt class="py-lineno">250</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">:</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">+=</tt> <tt class="py-string">'\n data: %d bytes'</tt> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L252"></a><tt class="py-lineno">252</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">s</tt> </tt>
</div><a name="L253"></a><tt class="py-lineno">253</tt> <tt class="py-line"> </tt>
<a name="TftpPacketDAT.encode"></a><div id="TftpPacketDAT.encode-def"><a name="L254"></a><tt class="py-lineno">254</tt> <a class="py-toggle" href="#" id="TftpPacketDAT.encode-toggle" onclick="return toggle('TftpPacketDAT.encode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html#encode">encode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketDAT.encode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketDAT.encode-expanded"><a name="L255"></a><tt class="py-lineno">255</tt> <tt class="py-line"> <tt class="py-docstring">"""Encode the DAT packet. This method populates self.buffer, and</tt> </tt>
<a name="L256"></a><tt class="py-lineno">256</tt> <tt class="py-line"><tt class="py-docstring"> returns self for easy method chaining."""</tt> </tt>
<a name="L257"></a><tt class="py-lineno">257</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L258"></a><tt class="py-lineno">258</tt> <tt class="py-line"> <tt id="link-67" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-67', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Encoding an empty DAT packet"</tt><tt class="py-op">)</tt> </tt>
<a name="L259"></a><tt class="py-lineno">259</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-string">"!HH%ds"</tt> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L260"></a><tt class="py-lineno">260</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> </tt>
<a name="L261"></a><tt class="py-lineno">261</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt><tt class="py-op">,</tt> </tt>
<a name="L262"></a><tt class="py-lineno">262</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocknumber</tt><tt class="py-op">,</tt> </tt>
<a name="L263"></a><tt class="py-lineno">263</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L264"></a><tt class="py-lineno">264</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L265"></a><tt class="py-lineno">265</tt> <tt class="py-line"> </tt>
<a name="TftpPacketDAT.decode"></a><div id="TftpPacketDAT.decode-def"><a name="L266"></a><tt class="py-lineno">266</tt> <a class="py-toggle" href="#" id="TftpPacketDAT.decode-toggle" onclick="return toggle('TftpPacketDAT.decode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html#decode">decode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketDAT.decode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketDAT.decode-expanded"><a name="L267"></a><tt class="py-lineno">267</tt> <tt class="py-line"> <tt class="py-docstring">"""Decode self.buffer into instance variables. It returns self for</tt> </tt>
<a name="L268"></a><tt class="py-lineno">268</tt> <tt class="py-line"><tt class="py-docstring"> easy method chaining."""</tt> </tt>
<a name="L269"></a><tt class="py-lineno">269</tt> <tt class="py-line"> <tt class="py-comment"># We know the first 2 bytes are the opcode. The second two are the</tt> </tt>
<a name="L270"></a><tt class="py-lineno">270</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># block number.</tt> </tt>
<a name="L271"></a><tt class="py-lineno">271</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocknumber</tt><tt class="py-op">,</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">"!H"</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-number">4</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L272"></a><tt class="py-lineno">272</tt> <tt class="py-line"> <tt id="link-68" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-68', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"decoding DAT packet, block number %d"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocknumber</tt><tt class="py-op">)</tt> </tt>
<a name="L273"></a><tt class="py-lineno">273</tt> <tt class="py-line"> <tt id="link-69" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-69', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"should be %d bytes in the packet total"</tt> </tt>
<a name="L274"></a><tt class="py-lineno">274</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L275"></a><tt class="py-lineno">275</tt> <tt class="py-line"> <tt class="py-comment"># Everything else is data.</tt> </tt>
<a name="L276"></a><tt class="py-lineno">276</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L277"></a><tt class="py-lineno">277</tt> <tt class="py-line"> <tt id="link-70" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-70', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"found %d bytes of data"</tt> </tt>
<a name="L278"></a><tt class="py-lineno">278</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L279"></a><tt class="py-lineno">279</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div></div><a name="L280"></a><tt class="py-lineno">280</tt> <tt class="py-line"> </tt>
<a name="TftpPacketACK"></a><div id="TftpPacketACK-def"><a name="L281"></a><tt class="py-lineno">281</tt> <a class="py-toggle" href="#" id="TftpPacketACK-toggle" onclick="return toggle('TftpPacketACK');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketACK-class.html">TftpPacketACK</a><tt class="py-op">(</tt><tt class="py-base-class">TftpPacket</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketACK-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TftpPacketACK-expanded"><a name="L282"></a><tt class="py-lineno">282</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L283"></a><tt class="py-lineno">283</tt> <tt class="py-line"><tt class="py-docstring"> 2 bytes 2 bytes</tt> </tt>
<a name="L284"></a><tt class="py-lineno">284</tt> <tt class="py-line"><tt class="py-docstring"> -------------------</tt> </tt>
<a name="L285"></a><tt class="py-lineno">285</tt> <tt class="py-line"><tt class="py-docstring">ACK | 04 | Block # |</tt> </tt>
<a name="L286"></a><tt class="py-lineno">286</tt> <tt class="py-line"><tt class="py-docstring"> --------------------</tt> </tt>
<a name="L287"></a><tt class="py-lineno">287</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="TftpPacketACK.__init__"></a><div id="TftpPacketACK.__init__-def"><a name="L288"></a><tt class="py-lineno">288</tt> <a class="py-toggle" href="#" id="TftpPacketACK.__init__-toggle" onclick="return toggle('TftpPacketACK.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketACK-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketACK.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketACK.__init__-expanded"><a name="L289"></a><tt class="py-lineno">289</tt> <tt class="py-line"> <tt id="link-71" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacket" class="py-name" href="#" onclick="return doclink('link-71', 'TftpPacket', 'link-25');">TftpPacket</a></tt><tt class="py-op">.</tt><tt id="link-72" class="py-name"><a title="tftpy.TftpClient'.TftpClient.__init__
tftpy.TftpPacketFactory'.TftpPacketFactory.__init__
tftpy.TftpPacketTypes.TftpPacket.__init__
tftpy.TftpPacketTypes.TftpPacketACK.__init__
tftpy.TftpPacketTypes.TftpPacketDAT.__init__
tftpy.TftpPacketTypes.TftpPacketERR.__init__
tftpy.TftpPacketTypes.TftpPacketInitial.__init__
tftpy.TftpPacketTypes.TftpPacketOACK.__init__
tftpy.TftpPacketTypes.TftpPacketRRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__
tftpy.TftpServer'.TftpServer.__init__
tftpy.TftpStates.TftpContext.__init__
tftpy.TftpStates.TftpContextClientDownload.__init__
tftpy.TftpStates.TftpContextClientUpload.__init__
tftpy.TftpStates.TftpContextServer.__init__
tftpy.TftpStates.TftpMetrics.__init__
tftpy.TftpStates.TftpState.__init__" class="py-name" href="#" onclick="return doclink('link-72', '__init__', 'link-26');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L290"></a><tt class="py-lineno">290</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt> <tt class="py-op">=</tt> <tt class="py-number">4</tt> </tt>
<a name="L291"></a><tt class="py-lineno">291</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocknumber</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
</div><a name="L292"></a><tt class="py-lineno">292</tt> <tt class="py-line"> </tt>
<a name="TftpPacketACK.__str__"></a><div id="TftpPacketACK.__str__-def"><a name="L293"></a><tt class="py-lineno">293</tt> <a class="py-toggle" href="#" id="TftpPacketACK.__str__-toggle" onclick="return toggle('TftpPacketACK.__str__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketACK-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketACK.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketACK.__str__-expanded"><a name="L294"></a><tt class="py-lineno">294</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'ACK packet: block %d'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocknumber</tt> </tt>
</div><a name="L295"></a><tt class="py-lineno">295</tt> <tt class="py-line"> </tt>
<a name="TftpPacketACK.encode"></a><div id="TftpPacketACK.encode-def"><a name="L296"></a><tt class="py-lineno">296</tt> <a class="py-toggle" href="#" id="TftpPacketACK.encode-toggle" onclick="return toggle('TftpPacketACK.encode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketACK-class.html#encode">encode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketACK.encode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketACK.encode-expanded"><a name="L297"></a><tt class="py-lineno">297</tt> <tt class="py-line"> <tt id="link-73" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-73', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"encoding ACK: opcode = %d, block = %d"</tt> </tt>
<a name="L298"></a><tt class="py-lineno">298</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocknumber</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L299"></a><tt class="py-lineno">299</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-string">"!HH"</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocknumber</tt><tt class="py-op">)</tt> </tt>
<a name="L300"></a><tt class="py-lineno">300</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L301"></a><tt class="py-lineno">301</tt> <tt class="py-line"> </tt>
<a name="TftpPacketACK.decode"></a><div id="TftpPacketACK.decode-def"><a name="L302"></a><tt class="py-lineno">302</tt> <a class="py-toggle" href="#" id="TftpPacketACK.decode-toggle" onclick="return toggle('TftpPacketACK.decode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketACK-class.html#decode">decode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketACK.decode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketACK.decode-expanded"><a name="L303"></a><tt class="py-lineno">303</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocknumber</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">"!HH"</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt> </tt>
<a name="L304"></a><tt class="py-lineno">304</tt> <tt class="py-line"> <tt id="link-74" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-74', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"decoded ACK packet: opcode = %d, block = %d"</tt> </tt>
<a name="L305"></a><tt class="py-lineno">305</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">blocknumber</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L306"></a><tt class="py-lineno">306</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div></div><a name="L307"></a><tt class="py-lineno">307</tt> <tt class="py-line"> </tt>
<a name="TftpPacketERR"></a><div id="TftpPacketERR-def"><a name="L308"></a><tt class="py-lineno">308</tt> <a class="py-toggle" href="#" id="TftpPacketERR-toggle" onclick="return toggle('TftpPacketERR');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketERR-class.html">TftpPacketERR</a><tt class="py-op">(</tt><tt class="py-base-class">TftpPacket</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketERR-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TftpPacketERR-expanded"><a name="L309"></a><tt class="py-lineno">309</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L310"></a><tt class="py-lineno">310</tt> <tt class="py-line"><tt class="py-docstring"> 2 bytes 2 bytes string 1 byte</tt> </tt>
<a name="L311"></a><tt class="py-lineno">311</tt> <tt class="py-line"><tt class="py-docstring"> ----------------------------------------</tt> </tt>
<a name="L312"></a><tt class="py-lineno">312</tt> <tt class="py-line"><tt class="py-docstring">ERROR | 05 | ErrorCode | ErrMsg | 0 |</tt> </tt>
<a name="L313"></a><tt class="py-lineno">313</tt> <tt class="py-line"><tt class="py-docstring"> ----------------------------------------</tt> </tt>
<a name="L314"></a><tt class="py-lineno">314</tt> <tt class="py-line"><tt class="py-docstring"> Error Codes</tt> </tt>
<a name="L315"></a><tt class="py-lineno">315</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt> <tt class="py-line"><tt class="py-docstring"> Value Meaning</tt> </tt>
<a name="L317"></a><tt class="py-lineno">317</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L318"></a><tt class="py-lineno">318</tt> <tt class="py-line"><tt class="py-docstring"> 0 Not defined, see error message (if any).</tt> </tt>
<a name="L319"></a><tt class="py-lineno">319</tt> <tt class="py-line"><tt class="py-docstring"> 1 File not found.</tt> </tt>
<a name="L320"></a><tt class="py-lineno">320</tt> <tt class="py-line"><tt class="py-docstring"> 2 Access violation.</tt> </tt>
<a name="L321"></a><tt class="py-lineno">321</tt> <tt class="py-line"><tt class="py-docstring"> 3 Disk full or allocation exceeded.</tt> </tt>
<a name="L322"></a><tt class="py-lineno">322</tt> <tt class="py-line"><tt class="py-docstring"> 4 Illegal TFTP operation.</tt> </tt>
<a name="L323"></a><tt class="py-lineno">323</tt> <tt class="py-line"><tt class="py-docstring"> 5 Unknown transfer ID.</tt> </tt>
<a name="L324"></a><tt class="py-lineno">324</tt> <tt class="py-line"><tt class="py-docstring"> 6 File already exists.</tt> </tt>
<a name="L325"></a><tt class="py-lineno">325</tt> <tt class="py-line"><tt class="py-docstring"> 7 No such user.</tt> </tt>
<a name="L326"></a><tt class="py-lineno">326</tt> <tt class="py-line"><tt class="py-docstring"> 8 Failed to negotiate options</tt> </tt>
<a name="L327"></a><tt class="py-lineno">327</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="TftpPacketERR.__init__"></a><div id="TftpPacketERR.__init__-def"><a name="L328"></a><tt class="py-lineno">328</tt> <a class="py-toggle" href="#" id="TftpPacketERR.__init__-toggle" onclick="return toggle('TftpPacketERR.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketERR-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketERR.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketERR.__init__-expanded"><a name="L329"></a><tt class="py-lineno">329</tt> <tt class="py-line"> <tt id="link-75" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacket" class="py-name" href="#" onclick="return doclink('link-75', 'TftpPacket', 'link-25');">TftpPacket</a></tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="tftpy.TftpClient'.TftpClient.__init__
tftpy.TftpPacketFactory'.TftpPacketFactory.__init__
tftpy.TftpPacketTypes.TftpPacket.__init__
tftpy.TftpPacketTypes.TftpPacketACK.__init__
tftpy.TftpPacketTypes.TftpPacketDAT.__init__
tftpy.TftpPacketTypes.TftpPacketERR.__init__
tftpy.TftpPacketTypes.TftpPacketInitial.__init__
tftpy.TftpPacketTypes.TftpPacketOACK.__init__
tftpy.TftpPacketTypes.TftpPacketRRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__
tftpy.TftpServer'.TftpServer.__init__
tftpy.TftpStates.TftpContext.__init__
tftpy.TftpStates.TftpContextClientDownload.__init__
tftpy.TftpStates.TftpContextClientUpload.__init__
tftpy.TftpStates.TftpContextServer.__init__
tftpy.TftpStates.TftpMetrics.__init__
tftpy.TftpStates.TftpState.__init__" class="py-name" href="#" onclick="return doclink('link-76', '__init__', 'link-26');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L330"></a><tt class="py-lineno">330</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt> <tt class="py-op">=</tt> <tt class="py-number">5</tt> </tt>
<a name="L331"></a><tt class="py-lineno">331</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errorcode</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L332"></a><tt class="py-lineno">332</tt> <tt class="py-line"> <tt class="py-comment"># FIXME: We don't encode the errmsg...</tt> </tt>
<a name="L333"></a><tt class="py-lineno">333</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errmsg</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L334"></a><tt class="py-lineno">334</tt> <tt class="py-line"> <tt class="py-comment"># FIXME - integrate in TftpErrors references?</tt> </tt>
<a name="L335"></a><tt class="py-lineno">335</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errmsgs</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
<a name="L336"></a><tt class="py-lineno">336</tt> <tt class="py-line"> <tt class="py-number">1</tt><tt class="py-op">:</tt> <tt class="py-string">"File not found"</tt><tt class="py-op">,</tt> </tt>
<a name="L337"></a><tt class="py-lineno">337</tt> <tt class="py-line"> <tt class="py-number">2</tt><tt class="py-op">:</tt> <tt class="py-string">"Access violation"</tt><tt class="py-op">,</tt> </tt>
<a name="L338"></a><tt class="py-lineno">338</tt> <tt class="py-line"> <tt class="py-number">3</tt><tt class="py-op">:</tt> <tt class="py-string">"Disk full or allocation exceeded"</tt><tt class="py-op">,</tt> </tt>
<a name="L339"></a><tt class="py-lineno">339</tt> <tt class="py-line"> <tt class="py-number">4</tt><tt class="py-op">:</tt> <tt class="py-string">"Illegal TFTP operation"</tt><tt class="py-op">,</tt> </tt>
<a name="L340"></a><tt class="py-lineno">340</tt> <tt class="py-line"> <tt class="py-number">5</tt><tt class="py-op">:</tt> <tt class="py-string">"Unknown transfer ID"</tt><tt class="py-op">,</tt> </tt>
<a name="L341"></a><tt class="py-lineno">341</tt> <tt class="py-line"> <tt class="py-number">6</tt><tt class="py-op">:</tt> <tt class="py-string">"File already exists"</tt><tt class="py-op">,</tt> </tt>
<a name="L342"></a><tt class="py-lineno">342</tt> <tt class="py-line"> <tt class="py-number">7</tt><tt class="py-op">:</tt> <tt class="py-string">"No such user"</tt><tt class="py-op">,</tt> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt> <tt class="py-line"> <tt class="py-number">8</tt><tt class="py-op">:</tt> <tt class="py-string">"Failed to negotiate options"</tt> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt> <tt class="py-line"> <tt class="py-op">}</tt> </tt>
</div><a name="L345"></a><tt class="py-lineno">345</tt> <tt class="py-line"> </tt>
<a name="TftpPacketERR.__str__"></a><div id="TftpPacketERR.__str__-def"><a name="L346"></a><tt class="py-lineno">346</tt> <a class="py-toggle" href="#" id="TftpPacketERR.__str__-toggle" onclick="return toggle('TftpPacketERR.__str__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketERR-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketERR.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketERR.__str__-expanded"><a name="L347"></a><tt class="py-lineno">347</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-string">'ERR packet: errorcode = %d'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errorcode</tt> </tt>
<a name="L348"></a><tt class="py-lineno">348</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">+=</tt> <tt class="py-string">'\n msg = %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errmsgs</tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errorcode</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L349"></a><tt class="py-lineno">349</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">s</tt> </tt>
</div><a name="L350"></a><tt class="py-lineno">350</tt> <tt class="py-line"> </tt>
<a name="TftpPacketERR.encode"></a><div id="TftpPacketERR.encode-def"><a name="L351"></a><tt class="py-lineno">351</tt> <a class="py-toggle" href="#" id="TftpPacketERR.encode-toggle" onclick="return toggle('TftpPacketERR.encode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketERR-class.html#encode">encode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketERR.encode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketERR.encode-expanded"><a name="L352"></a><tt class="py-lineno">352</tt> <tt class="py-line"> <tt class="py-docstring">"""Encode the DAT packet based on instance variables, populating</tt> </tt>
<a name="L353"></a><tt class="py-lineno">353</tt> <tt class="py-line"><tt class="py-docstring"> self.buffer, returning self."""</tt> </tt>
<a name="L354"></a><tt class="py-lineno">354</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-string">"!HH%dsx"</tt> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errmsgs</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errorcode</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L355"></a><tt class="py-lineno">355</tt> <tt class="py-line"> <tt id="link-77" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-77', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"encoding ERR packet with format %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
<a name="L356"></a><tt class="py-lineno">356</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> </tt>
<a name="L357"></a><tt class="py-lineno">357</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt><tt class="py-op">,</tt> </tt>
<a name="L358"></a><tt class="py-lineno">358</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errorcode</tt><tt class="py-op">,</tt> </tt>
<a name="L359"></a><tt class="py-lineno">359</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errmsgs</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errorcode</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L360"></a><tt class="py-lineno">360</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L361"></a><tt class="py-lineno">361</tt> <tt class="py-line"> </tt>
<a name="TftpPacketERR.decode"></a><div id="TftpPacketERR.decode-def"><a name="L362"></a><tt class="py-lineno">362</tt> <a class="py-toggle" href="#" id="TftpPacketERR.decode-toggle" onclick="return toggle('TftpPacketERR.decode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketERR-class.html#decode">decode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketERR.decode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketERR.decode-expanded"><a name="L363"></a><tt class="py-lineno">363</tt> <tt class="py-line"> <tt class="py-docstring">"Decode self.buffer, populating instance variables and return self."</tt> </tt>
<a name="L364"></a><tt class="py-lineno">364</tt> <tt class="py-line"> <tt class="py-name">buflen</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt> </tt>
<a name="L365"></a><tt class="py-lineno">365</tt> <tt class="py-line"> <tt id="link-78" class="py-name"><a title="tftpy.TftpShared.tftpassert" class="py-name" href="#" onclick="return doclink('link-78', 'tftpassert', 'link-21');">tftpassert</a></tt><tt class="py-op">(</tt><tt class="py-name">buflen</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">4</tt><tt class="py-op">,</tt> <tt class="py-string">"malformed ERR packet, too short"</tt><tt class="py-op">)</tt> </tt>
<a name="L366"></a><tt class="py-lineno">366</tt> <tt class="py-line"> <tt id="link-79" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-79', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Decoding ERR packet, length %s bytes"</tt> <tt class="py-op">%</tt> <tt class="py-name">buflen</tt><tt class="py-op">)</tt> </tt>
<a name="L367"></a><tt class="py-lineno">367</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">buflen</tt> <tt class="py-op">==</tt> <tt class="py-number">4</tt><tt class="py-op">:</tt> </tt>
<a name="L368"></a><tt class="py-lineno">368</tt> <tt class="py-line"> <tt id="link-80" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-80', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Allowing this affront to the RFC of a 4-byte packet"</tt><tt class="py-op">)</tt> </tt>
<a name="L369"></a><tt class="py-lineno">369</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-string">"!HH"</tt> </tt>
<a name="L370"></a><tt class="py-lineno">370</tt> <tt class="py-line"> <tt id="link-81" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-81', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Decoding ERR packet with format: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
<a name="L371"></a><tt class="py-lineno">371</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errorcode</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> </tt>
<a name="L372"></a><tt class="py-lineno">372</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt> </tt>
<a name="L373"></a><tt class="py-lineno">373</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L374"></a><tt class="py-lineno">374</tt> <tt class="py-line"> <tt id="link-82" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-82', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Good ERR packet &gt; 4 bytes"</tt><tt class="py-op">)</tt> </tt>
<a name="L375"></a><tt class="py-lineno">375</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-string">"!HH%dsx"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-number">5</tt><tt class="py-op">)</tt> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt> <tt class="py-line"> <tt id="link-83" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-83', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Decoding ERR packet with format: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
<a name="L377"></a><tt class="py-lineno">377</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errorcode</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errmsg</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> </tt>
<a name="L378"></a><tt class="py-lineno">378</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt> </tt>
<a name="L379"></a><tt class="py-lineno">379</tt> <tt class="py-line"> <tt id="link-84" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-84', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">error</tt><tt class="py-op">(</tt><tt class="py-string">"ERR packet - errorcode: %d, message: %s"</tt> </tt>
<a name="L380"></a><tt class="py-lineno">380</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errorcode</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">errmsg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L381"></a><tt class="py-lineno">381</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div></div><a name="L382"></a><tt class="py-lineno">382</tt> <tt class="py-line"> </tt>
<a name="TftpPacketOACK"></a><div id="TftpPacketOACK-def"><a name="L383"></a><tt class="py-lineno">383</tt> <a class="py-toggle" href="#" id="TftpPacketOACK-toggle" onclick="return toggle('TftpPacketOACK');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html">TftpPacketOACK</a><tt class="py-op">(</tt><tt class="py-base-class">TftpPacket</tt><tt class="py-op">,</tt> <tt class="py-base-class">TftpPacketWithOptions</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketOACK-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TftpPacketOACK-expanded"><a name="L384"></a><tt class="py-lineno">384</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt> <tt class="py-line"><tt class="py-docstring"> # +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+</tt> </tt>
<a name="L386"></a><tt class="py-lineno">386</tt> <tt class="py-line"><tt class="py-docstring"> # | opc | opt1 | 0 | value1 | 0 | optN | 0 | valueN | 0 |</tt> </tt>
<a name="L387"></a><tt class="py-lineno">387</tt> <tt class="py-line"><tt class="py-docstring"> # +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+</tt> </tt>
<a name="L388"></a><tt class="py-lineno">388</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="TftpPacketOACK.__init__"></a><div id="TftpPacketOACK.__init__-def"><a name="L389"></a><tt class="py-lineno">389</tt> <a class="py-toggle" href="#" id="TftpPacketOACK.__init__-toggle" onclick="return toggle('TftpPacketOACK.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketOACK.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketOACK.__init__-expanded"><a name="L390"></a><tt class="py-lineno">390</tt> <tt class="py-line"> <tt id="link-85" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacket" class="py-name" href="#" onclick="return doclink('link-85', 'TftpPacket', 'link-25');">TftpPacket</a></tt><tt class="py-op">.</tt><tt id="link-86" class="py-name"><a title="tftpy.TftpClient'.TftpClient.__init__
tftpy.TftpPacketFactory'.TftpPacketFactory.__init__
tftpy.TftpPacketTypes.TftpPacket.__init__
tftpy.TftpPacketTypes.TftpPacketACK.__init__
tftpy.TftpPacketTypes.TftpPacketDAT.__init__
tftpy.TftpPacketTypes.TftpPacketERR.__init__
tftpy.TftpPacketTypes.TftpPacketInitial.__init__
tftpy.TftpPacketTypes.TftpPacketOACK.__init__
tftpy.TftpPacketTypes.TftpPacketRRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__
tftpy.TftpServer'.TftpServer.__init__
tftpy.TftpStates.TftpContext.__init__
tftpy.TftpStates.TftpContextClientDownload.__init__
tftpy.TftpStates.TftpContextClientUpload.__init__
tftpy.TftpStates.TftpContextServer.__init__
tftpy.TftpStates.TftpMetrics.__init__
tftpy.TftpStates.TftpState.__init__" class="py-name" href="#" onclick="return doclink('link-86', '__init__', 'link-26');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L391"></a><tt class="py-lineno">391</tt> <tt class="py-line"> <tt id="link-87" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions" class="py-name" href="#" onclick="return doclink('link-87', 'TftpPacketWithOptions', 'link-27');">TftpPacketWithOptions</a></tt><tt class="py-op">.</tt><tt id="link-88" class="py-name"><a title="tftpy.TftpClient'.TftpClient.__init__
tftpy.TftpPacketFactory'.TftpPacketFactory.__init__
tftpy.TftpPacketTypes.TftpPacket.__init__
tftpy.TftpPacketTypes.TftpPacketACK.__init__
tftpy.TftpPacketTypes.TftpPacketDAT.__init__
tftpy.TftpPacketTypes.TftpPacketERR.__init__
tftpy.TftpPacketTypes.TftpPacketInitial.__init__
tftpy.TftpPacketTypes.TftpPacketOACK.__init__
tftpy.TftpPacketTypes.TftpPacketRRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWRQ.__init__
tftpy.TftpPacketTypes.TftpPacketWithOptions.__init__
tftpy.TftpServer'.TftpServer.__init__
tftpy.TftpStates.TftpContext.__init__
tftpy.TftpStates.TftpContextClientDownload.__init__
tftpy.TftpStates.TftpContextClientUpload.__init__
tftpy.TftpStates.TftpContextServer.__init__
tftpy.TftpStates.TftpMetrics.__init__
tftpy.TftpStates.TftpState.__init__" class="py-name" href="#" onclick="return doclink('link-88', '__init__', 'link-26');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L392"></a><tt class="py-lineno">392</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt> <tt class="py-op">=</tt> <tt class="py-number">6</tt> </tt>
</div><a name="L393"></a><tt class="py-lineno">393</tt> <tt class="py-line"> </tt>
<a name="TftpPacketOACK.__str__"></a><div id="TftpPacketOACK.__str__-def"><a name="L394"></a><tt class="py-lineno">394</tt> <a class="py-toggle" href="#" id="TftpPacketOACK.__str__-toggle" onclick="return toggle('TftpPacketOACK.__str__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketOACK.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketOACK.__str__-expanded"><a name="L395"></a><tt class="py-lineno">395</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'OACK packet:\n options = %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-89" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-89', 'options', 'link-1');">options</a></tt> </tt>
</div><a name="L396"></a><tt class="py-lineno">396</tt> <tt class="py-line"> </tt>
<a name="TftpPacketOACK.encode"></a><div id="TftpPacketOACK.encode-def"><a name="L397"></a><tt class="py-lineno">397</tt> <a class="py-toggle" href="#" id="TftpPacketOACK.encode-toggle" onclick="return toggle('TftpPacketOACK.encode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#encode">encode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketOACK.encode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketOACK.encode-expanded"><a name="L398"></a><tt class="py-lineno">398</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-string">"!H"</tt> <tt class="py-comment"># opcode</tt> </tt>
<a name="L399"></a><tt class="py-lineno">399</tt> <tt class="py-line"> <tt class="py-name">options_list</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L400"></a><tt class="py-lineno">400</tt> <tt class="py-line"> <tt id="link-90" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-90', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"in TftpPacketOACK.encode"</tt><tt class="py-op">)</tt> </tt>
<a name="L401"></a><tt class="py-lineno">401</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-91', 'options', 'link-1');">options</a></tt><tt class="py-op">:</tt> </tt>
<a name="L402"></a><tt class="py-lineno">402</tt> <tt class="py-line"> <tt id="link-92" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-92', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"looping on option key %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L403"></a><tt class="py-lineno">403</tt> <tt class="py-line"> <tt id="link-93" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-93', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"value is %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-94" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-94', 'options', 'link-1');">options</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L404"></a><tt class="py-lineno">404</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">+=</tt> <tt class="py-string">"%dsx"</tt> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L405"></a><tt class="py-lineno">405</tt> <tt class="py-line"> <tt class="py-name">format</tt> <tt class="py-op">+=</tt> <tt class="py-string">"%dsx"</tt> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-95', 'options', 'link-1');">options</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L406"></a><tt class="py-lineno">406</tt> <tt class="py-line"> <tt class="py-name">options_list</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L407"></a><tt class="py-lineno">407</tt> <tt class="py-line"> <tt class="py-name">options_list</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-96', 'options', 'link-1');">options</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L408"></a><tt class="py-lineno">408</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">opcode</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">options_list</tt><tt class="py-op">)</tt> </tt>
<a name="L409"></a><tt class="py-lineno">409</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L410"></a><tt class="py-lineno">410</tt> <tt class="py-line"> </tt>
<a name="TftpPacketOACK.decode"></a><div id="TftpPacketOACK.decode-def"><a name="L411"></a><tt class="py-lineno">411</tt> <a class="py-toggle" href="#" id="TftpPacketOACK.decode-toggle" onclick="return toggle('TftpPacketOACK.decode');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#decode">decode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketOACK.decode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketOACK.decode-expanded"><a name="L412"></a><tt class="py-lineno">412</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-97', 'options', 'link-1');">options</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.decode_options" class="py-name" href="#" onclick="return doclink('link-98', 'decode_options', 'link-56');">decode_options</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L413"></a><tt class="py-lineno">413</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L414"></a><tt class="py-lineno">414</tt> <tt class="py-line"> </tt>
<a name="TftpPacketOACK.match_options"></a><div id="TftpPacketOACK.match_options-def"><a name="L415"></a><tt class="py-lineno">415</tt> <a class="py-toggle" href="#" id="TftpPacketOACK.match_options-toggle" onclick="return toggle('TftpPacketOACK.match_options');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#match_options">match_options</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">options</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpPacketOACK.match_options-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpPacketOACK.match_options-expanded"><a name="L416"></a><tt class="py-lineno">416</tt> <tt class="py-line"> <tt class="py-docstring">"""This method takes a set of options, and tries to match them with</tt> </tt>
<a name="L417"></a><tt class="py-lineno">417</tt> <tt class="py-line"><tt class="py-docstring"> its own. It can accept some changes in those options from the server as</tt> </tt>
<a name="L418"></a><tt class="py-lineno">418</tt> <tt class="py-line"><tt class="py-docstring"> part of a negotiation. Changed or unchanged, it will return a dict of</tt> </tt>
<a name="L419"></a><tt class="py-lineno">419</tt> <tt class="py-line"><tt class="py-docstring"> the options so that the session can update itself to the negotiated</tt> </tt>
<a name="L420"></a><tt class="py-lineno">420</tt> <tt class="py-line"><tt class="py-docstring"> options."""</tt> </tt>
<a name="L421"></a><tt class="py-lineno">421</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-99', 'options', 'link-1');">options</a></tt><tt class="py-op">:</tt> </tt>
<a name="L422"></a><tt class="py-lineno">422</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-100" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-100', 'options', 'link-1');">options</a></tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L423"></a><tt class="py-lineno">423</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">name</tt> <tt class="py-op">==</tt> <tt class="py-string">'blksize'</tt><tt class="py-op">:</tt> </tt>
<a name="L424"></a><tt class="py-lineno">424</tt> <tt class="py-line"> <tt class="py-comment"># We can accept anything between the min and max values.</tt> </tt>
<a name="L425"></a><tt class="py-lineno">425</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-101', 'options', 'link-1');">options</a></tt><tt class="py-op">[</tt><tt class="py-name">name</tt><tt class="py-op">]</tt> </tt>
<a name="L426"></a><tt class="py-lineno">426</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">size</tt> <tt class="py-op">&gt;=</tt> <tt id="link-102" class="py-name" targets="Variable tftpy.TftpClient'.MIN_BLKSIZE=tftpy.TftpClient%27-module.html#MIN_BLKSIZE,Variable tftpy.TftpPacketFactory'.MIN_BLKSIZE=tftpy.TftpPacketFactory%27-module.html#MIN_BLKSIZE,Variable tftpy.TftpServer'.MIN_BLKSIZE=tftpy.TftpServer%27-module.html#MIN_BLKSIZE,Variable tftpy.TftpShared.MIN_BLKSIZE=tftpy.TftpShared-module.html#MIN_BLKSIZE"><a title="tftpy.TftpClient'.MIN_BLKSIZE
tftpy.TftpPacketFactory'.MIN_BLKSIZE
tftpy.TftpServer'.MIN_BLKSIZE
tftpy.TftpShared.MIN_BLKSIZE" class="py-name" href="#" onclick="return doclink('link-102', 'MIN_BLKSIZE', 'link-102');">MIN_BLKSIZE</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">size</tt> <tt class="py-op">&lt;=</tt> <tt id="link-103" class="py-name" targets="Variable tftpy.TftpClient'.MAX_BLKSIZE=tftpy.TftpClient%27-module.html#MAX_BLKSIZE,Variable tftpy.TftpPacketFactory'.MAX_BLKSIZE=tftpy.TftpPacketFactory%27-module.html#MAX_BLKSIZE,Variable tftpy.TftpServer'.MAX_BLKSIZE=tftpy.TftpServer%27-module.html#MAX_BLKSIZE,Variable tftpy.TftpShared.MAX_BLKSIZE=tftpy.TftpShared-module.html#MAX_BLKSIZE"><a title="tftpy.TftpClient'.MAX_BLKSIZE
tftpy.TftpPacketFactory'.MAX_BLKSIZE
tftpy.TftpServer'.MAX_BLKSIZE
tftpy.TftpShared.MAX_BLKSIZE" class="py-name" href="#" onclick="return doclink('link-103', 'MAX_BLKSIZE', 'link-103');">MAX_BLKSIZE</a></tt><tt class="py-op">:</tt> </tt>
<a name="L427"></a><tt class="py-lineno">427</tt> <tt class="py-line"> <tt id="link-104" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-104', 'log', 'link-2');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"negotiated blksize of %d bytes"</tt> <tt class="py-op">%</tt> <tt class="py-name">size</tt><tt class="py-op">)</tt> </tt>
<a name="L428"></a><tt class="py-lineno">428</tt> <tt class="py-line"> <tt id="link-105" class="py-name"><a title="tftpy.TftpPacketTypes.TftpPacketWithOptions.options" class="py-name" href="#" onclick="return doclink('link-105', 'options', 'link-1');">options</a></tt><tt class="py-op">[</tt><tt class="py-name">blksize</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">size</tt> </tt>
<a name="L429"></a><tt class="py-lineno">429</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L430"></a><tt class="py-lineno">430</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-106" class="py-name"><a title="tftpy.TftpShared.TftpException" class="py-name" href="#" onclick="return doclink('link-106', 'TftpException', 'link-19');">TftpException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Unsupported option: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">name</tt> </tt>
<a name="L431"></a><tt class="py-lineno">431</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div></div><a name="L432"></a><tt class="py-lineno">432</tt> <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:22 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,325 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketTypes.TftpPacket</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpPacketTypes-module.html">Module&nbsp;TftpPacketTypes</a> ::
Class&nbsp;TftpPacket
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacket-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpPacket</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacket">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<strong class="uidshort">TftpPacket</strong>
</pre>
<dl><dt>Known Subclasses:</dt>
<dd>
<ul class="subclass-list">
<li><a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html">TftpPacketACK</a></li><li>, <a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html">TftpPacketDAT</a></li><li>, <a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html">TftpPacketERR</a></li><li>, <a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">TftpPacketInitial</a></li><li>, <a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html">TftpPacketOACK</a></li> </ul>
</dd></dl>
<hr />
<p>This class is the parent class of all tftp packet classes. It is an
abstract class, providing an interface, and should not be instantiated
directly.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacket-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacket.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacket-class.html#encode" class="summary-sig-name">encode</a>(<span class="summary-sig-arg">self</span>)</span><br />
The encode method of a TftpPacket takes keyword arguments specific to
the type of packet, and packs an appropriate buffer in network-byte
order suitable for sending over the wire.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacket.encode">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacket-class.html#decode" class="summary-sig-name">decode</a>(<span class="summary-sig-arg">self</span>)</span><br />
The decode method of a TftpPacket takes a buffer off of the wire in
network-byte order, and decodes it, populating internal properties as
appropriate.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacket.decode">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacket.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
signature</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="encode"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">encode</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacket.encode">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>The encode method of a TftpPacket takes keyword arguments specific to
the type of packet, and packs an appropriate buffer in network-byte order
suitable for sending over the wire.</p>
<p>This is an abstract method.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="decode"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">decode</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacket.decode">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>The decode method of a TftpPacket takes a buffer off of the wire in
network-byte order, and decodes it, populating internal properties as
appropriate. This can only be done once the first 2-byte opcode has
already been decoded, but the data section does include the entire
datagram.</p>
<p>This is an abstract method.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,375 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketTypes.TftpPacketACK</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpPacketTypes-module.html">Module&nbsp;TftpPacketTypes</a> ::
Class&nbsp;TftpPacketACK
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpPacketACK</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketACK">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html">TftpPacket</a> --+
|
<strong class="uidshort">TftpPacketACK</strong>
</pre>
<hr />
<pre class="literalblock">
2 bytes 2 bytes
-------------------
ACK | 04 | Block # |
--------------------
</pre>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketACK.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
str(x)</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketACK.__str__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html#encode" class="summary-sig-name">encode</a>(<span class="summary-sig-arg">self</span>)</span><br />
The encode method of a TftpPacket takes keyword arguments specific to
the type of packet, and packs an appropriate buffer in network-byte
order suitable for sending over the wire.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketACK.encode">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketACK-class.html#decode" class="summary-sig-name">decode</a>(<span class="summary-sig-arg">self</span>)</span><br />
The decode method of a TftpPacket takes a buffer off of the wire in
network-byte order, and decodes it, populating internal properties as
appropriate.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketACK.decode">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketACK.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
signature</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Informal representation operator)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketACK.__str__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>str(x)</p>
<dl class="fields">
<dt>Overrides:
object.__str__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="encode"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">encode</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketACK.encode">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>The encode method of a TftpPacket takes keyword arguments specific to
the type of packet, and packs an appropriate buffer in network-byte order
suitable for sending over the wire.</p>
<p>This is an abstract method.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html#encode">TftpPacket.encode</a>
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="decode"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">decode</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketACK.decode">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>The decode method of a TftpPacket takes a buffer off of the wire in
network-byte order, and decodes it, populating internal properties as
appropriate. This can only be done once the first 2-byte opcode has
already been decoded, but the data section does include the entire
datagram.</p>
<p>This is an abstract method.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html#decode">TftpPacket.decode</a>
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,363 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketTypes.TftpPacketDAT</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpPacketTypes-module.html">Module&nbsp;TftpPacketTypes</a> ::
Class&nbsp;TftpPacketDAT
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpPacketDAT</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketDAT">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html">TftpPacket</a> --+
|
<strong class="uidshort">TftpPacketDAT</strong>
</pre>
<hr />
<pre class="literalblock">
2 bytes 2 bytes n bytes
---------------------------------
DATA | 03 | Block # | Data |
---------------------------------
</pre>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketDAT.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
str(x)</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketDAT.__str__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html#encode" class="summary-sig-name">encode</a>(<span class="summary-sig-arg">self</span>)</span><br />
Encode the DAT packet.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketDAT.encode">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html#decode" class="summary-sig-name">decode</a>(<span class="summary-sig-arg">self</span>)</span><br />
Decode self.buffer into instance variables.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketDAT.decode">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketDAT.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
signature</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Informal representation operator)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketDAT.__str__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>str(x)</p>
<dl class="fields">
<dt>Overrides:
object.__str__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="encode"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">encode</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketDAT.encode">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Encode the DAT packet. This method populates self.buffer, and returns
self for easy method chaining.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html#encode">TftpPacket.encode</a>
</dt>
</dl>
</td></tr></table>
</div>
<a name="decode"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">decode</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketDAT.decode">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Decode self.buffer into instance variables. It returns self for easy
method chaining.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html#decode">TftpPacket.decode</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,376 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketTypes.TftpPacketERR</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpPacketTypes-module.html">Module&nbsp;TftpPacketTypes</a> ::
Class&nbsp;TftpPacketERR
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpPacketERR</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketERR">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html">TftpPacket</a> --+
|
<strong class="uidshort">TftpPacketERR</strong>
</pre>
<hr />
<pre class="literalblock">
2 bytes 2 bytes string 1 byte
----------------------------------------
ERROR | 05 | ErrorCode | ErrMsg | 0 |
----------------------------------------
Error Codes
Value Meaning
0 Not defined, see error message (if any).
1 File not found.
2 Access violation.
3 Disk full or allocation exceeded.
4 Illegal TFTP operation.
5 Unknown transfer ID.
6 File already exists.
7 No such user.
8 Failed to negotiate options
</pre>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketERR.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
str(x)</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketERR.__str__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html#encode" class="summary-sig-name">encode</a>(<span class="summary-sig-arg">self</span>)</span><br />
Encode the DAT packet based on instance variables, populating
self.buffer, returning self.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketERR.encode">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketERR-class.html#decode" class="summary-sig-name">decode</a>(<span class="summary-sig-arg">self</span>)</span><br />
Decode self.buffer, populating instance variables and return self.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketERR.decode">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketERR.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
signature</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Informal representation operator)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketERR.__str__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>str(x)</p>
<dl class="fields">
<dt>Overrides:
object.__str__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="encode"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">encode</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketERR.encode">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Encode the DAT packet based on instance variables, populating
self.buffer, returning self.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html#encode">TftpPacket.encode</a>
</dt>
</dl>
</td></tr></table>
</div>
<a name="decode"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">decode</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketERR.decode">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Decode self.buffer, populating instance variables and return self.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html#decode">TftpPacket.decode</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,340 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketTypes.TftpPacketInitial</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpPacketTypes-module.html">Module&nbsp;TftpPacketTypes</a> ::
Class&nbsp;TftpPacketInitial
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpPacketInitial</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketInitial">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html">TftpPacket</a> --+
|
object --+ |
| |
<a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a> --+
|
<strong class="uidshort">TftpPacketInitial</strong>
</pre>
<dl><dt>Known Subclasses:</dt>
<dd>
<ul class="subclass-list">
<li><a href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html">TftpPacketRRQ</a></li><li>, <a href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html">TftpPacketWRQ</a></li> </ul>
</dd></dl>
<hr />
<p>This class is a common parent class for the RRQ and WRQ packets, as
they share quite a bit of code.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketInitial.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#encode" class="summary-sig-name">encode</a>(<span class="summary-sig-arg">self</span>)</span><br />
Encode the packet's buffer from the instance variables.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketInitial.encode">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#decode" class="summary-sig-name">decode</a>(<span class="summary-sig-arg">self</span>)</span><br />
The decode method of a TftpPacket takes a buffer off of the wire in
network-byte order, and decodes it, populating internal properties as
appropriate.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketInitial.decode">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a></code></b>:
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options">decode_options</a></code>,
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions">getoptions</a></code>,
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions">setoptions</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a></code></b>:
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options">options</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketInitial.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
signature</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="encode"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">encode</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketInitial.encode">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Encode the packet's buffer from the instance variables.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html#encode">TftpPacket.encode</a>
</dt>
</dl>
</td></tr></table>
</div>
<a name="decode"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">decode</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketInitial.decode">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>The decode method of a TftpPacket takes a buffer off of the wire in
network-byte order, and decodes it, populating internal properties as
appropriate. This can only be done once the first 2-byte opcode has
already been decoded, but the data section does include the entire
datagram.</p>
<p>This is an abstract method.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html#decode">TftpPacket.decode</a>
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,424 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketTypes.TftpPacketOACK</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpPacketTypes-module.html">Module&nbsp;TftpPacketTypes</a> ::
Class&nbsp;TftpPacketOACK
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpPacketOACK</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketOACK">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html">TftpPacket</a> --+
|
object --+ |
| |
<a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a> --+
|
<strong class="uidshort">TftpPacketOACK</strong>
</pre>
<hr />
<p># +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+ # |
opc | opt1 | 0 | value1 | 0 | optN | 0 | valueN | 0 | #
+-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketOACK.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
str(x)</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketOACK.__str__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#encode" class="summary-sig-name">encode</a>(<span class="summary-sig-arg">self</span>)</span><br />
The encode method of a TftpPacket takes keyword arguments specific to
the type of packet, and packs an appropriate buffer in network-byte
order suitable for sending over the wire.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketOACK.encode">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#decode" class="summary-sig-name">decode</a>(<span class="summary-sig-arg">self</span>)</span><br />
The decode method of a TftpPacket takes a buffer off of the wire in
network-byte order, and decodes it, populating internal properties as
appropriate.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketOACK.decode">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html#match_options" class="summary-sig-name">match_options</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">options</span>)</span><br />
This method takes a set of options, and tries to match them with its
own.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketOACK.match_options">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a></code></b>:
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options">decode_options</a></code>,
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions">getoptions</a></code>,
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions">setoptions</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a></code></b>:
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options">options</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketOACK.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
signature</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Informal representation operator)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketOACK.__str__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>str(x)</p>
<dl class="fields">
<dt>Overrides:
object.__str__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="encode"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">encode</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketOACK.encode">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>The encode method of a TftpPacket takes keyword arguments specific to
the type of packet, and packs an appropriate buffer in network-byte order
suitable for sending over the wire.</p>
<p>This is an abstract method.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html#encode">TftpPacket.encode</a>
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="decode"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">decode</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketOACK.decode">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>The decode method of a TftpPacket takes a buffer off of the wire in
network-byte order, and decodes it, populating internal properties as
appropriate. This can only be done once the first 2-byte opcode has
already been decoded, but the data section does include the entire
datagram.</p>
<p>This is an abstract method.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html#decode">TftpPacket.decode</a>
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="match_options"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">match_options</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">options</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketOACK.match_options">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>This method takes a set of options, and tries to match them with its
own. It can accept some changes in those options from the server as part
of a negotiation. Changed or unchanged, it will return a dict of the
options so that the session can update itself to the negotiated
options.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,301 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketTypes.TftpPacketRRQ</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpPacketTypes-module.html">Module&nbsp;TftpPacketTypes</a> ::
Class&nbsp;TftpPacketRRQ
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpPacketRRQ</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketRRQ">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html">TftpPacket</a> --+
|
object --+ |
| |
<a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a> --+
|
<a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">TftpPacketInitial</a> --+
|
<strong class="uidshort">TftpPacketRRQ</strong>
</pre>
<hr />
<pre class="literalblock">
2 bytes string 1 byte string 1 byte
-----------------------------------------------
RRQ/ | 01/02 | Filename | 0 | Mode | 0 |
WRQ -----------------------------------------------
</pre>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketRRQ.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
str(x)</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketRRQ.__str__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">TftpPacketInitial</a></code></b>:
<code><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#decode">decode</a></code>,
<code><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#encode">encode</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a></code></b>:
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options">decode_options</a></code>,
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions">getoptions</a></code>,
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions">setoptions</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a></code></b>:
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options">options</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketRRQ.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
signature</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Informal representation operator)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketRRQ.__str__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>str(x)</p>
<dl class="fields">
<dt>Overrides:
object.__str__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,301 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketTypes.TftpPacketWRQ</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpPacketTypes-module.html">Module&nbsp;TftpPacketTypes</a> ::
Class&nbsp;TftpPacketWRQ
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpPacketWRQ</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketWRQ">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpPacketTypes.TftpPacket-class.html">TftpPacket</a> --+
|
object --+ |
| |
<a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a> --+
|
<a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">TftpPacketInitial</a> --+
|
<strong class="uidshort">TftpPacketWRQ</strong>
</pre>
<hr />
<pre class="literalblock">
2 bytes string 1 byte string 1 byte
-----------------------------------------------
RRQ/ | 01/02 | Filename | 0 | Mode | 0 |
WRQ -----------------------------------------------
</pre>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketWRQ.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
str(x)</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketWRQ.__str__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">TftpPacketInitial</a></code></b>:
<code><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#decode">decode</a></code>,
<code><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html#encode">encode</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a></code></b>:
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options">decode_options</a></code>,
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions">getoptions</a></code>,
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions">setoptions</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html">TftpPacketWithOptions</a></code></b>:
<code><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options">options</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketWRQ.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
signature</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Informal representation operator)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketWRQ.__str__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>str(x)</p>
<dl class="fields">
<dt>Overrides:
object.__str__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,359 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketTypes.TftpPacketWithOptions</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpPacketTypes-module.html">Module&nbsp;TftpPacketTypes</a> ::
Class&nbsp;TftpPacketWithOptions
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpPacketWithOptions</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketWithOptions">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<strong class="uidshort">TftpPacketWithOptions</strong>
</pre>
<dl><dt>Known Subclasses:</dt>
<dd>
<ul class="subclass-list">
<li><a href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html">TftpPacketInitial</a></li><li>, <a href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html">TftpPacketOACK</a></li> </ul>
</dd></dl>
<hr />
<p>This class exists to permit some TftpPacket subclasses to share code
regarding options handling. It does not inherit from TftpPacket, as the
goal is just to share code here, and not cause diamond inheritance.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketWithOptions.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="setoptions"></a><span class="summary-sig-name">setoptions</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">options</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketWithOptions.setoptions">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="getoptions"></a><span class="summary-sig-name">getoptions</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketWithOptions.getoptions">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#decode_options" class="summary-sig-name">decode_options</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">buffer</span>)</span><br />
This method decodes the section of the buffer that contains an
unknown number of options.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketWithOptions.decode_options">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#options" class="summary-name">options</a>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketWithOptions.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
signature</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="decode_options"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">decode_options</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">buffer</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpPacketWithOptions.decode_options">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>This method decodes the section of the buffer that contains an unknown
number of options. It returns a dictionary of option names and
values.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== PROPERTY DETAILS ==================== -->
<a name="section-PropertyDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Property Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-PropertyDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="options"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">options</h3>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#getoptions" class="summary-sig-name">getoptions</a>(<span class="summary-sig-arg">self</span>)</span>
</dd>
<dt>Set Method:</dt>
<dd class="value"><span class="summary-sig"><a href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html#setoptions" class="summary-sig-name">setoptions</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">options</span>)</span>
</dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,180 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpPacketTypes.TftpSession</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpPacketTypes-module.html">Module&nbsp;TftpPacketTypes</a> ::
Class&nbsp;TftpSession
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpPacketTypes.TftpSession-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpSession</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpPacketTypes-pysrc.html#TftpSession">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<strong class="uidshort">TftpSession</strong>
</pre>
<dl><dt>Known Subclasses:</dt>
<dd>
<ul class="subclass-list">
<li><a href="tftpy.TftpServer%27.TftpServer-class.html">TftpServer'.TftpServer</a></li><li>, <a href="tftpy.TftpClient%27.TftpClient-class.html">TftpClient'.TftpClient</a></li> </ul>
</dd></dl>
<hr />
<p>This class is the base class for the tftp client and server. Any
shared code should be in this class.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__init__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,211 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpServer'</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
Module&nbsp;TftpServer'
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpServer%27-module.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module TftpServer'</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpServer%27-pysrc.html">source&nbsp;code</a></span></p>
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Classes</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Classes"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpServer%27.TftpServer-class.html" class="summary-name">TftpServer</a><br />
This class implements a tftp server object.
</td>
</tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Variables"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="DEF_BLKSIZE"></a><span class="summary-name">DEF_BLKSIZE</span> = <code title="512">512</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="DEF_TFTP_PORT"></a><span class="summary-name">DEF_TFTP_PORT</span> = <code title="69">69</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="LOG_LEVEL"></a><span class="summary-name">LOG_LEVEL</span> = <code title="0">0</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MAX_BLKSIZE"></a><span class="summary-name">MAX_BLKSIZE</span> = <code title="65536">65536</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MAX_DUPS"></a><span class="summary-name">MAX_DUPS</span> = <code title="20">20</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MIN_BLKSIZE"></a><span class="summary-name">MIN_BLKSIZE</span> = <code title="8">8</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="SOCK_TIMEOUT"></a><span class="summary-name">SOCK_TIMEOUT</span> = <code title="5">5</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="TIMEOUT_RETRIES"></a><span class="summary-name">TIMEOUT_RETRIES</span> = <code title="5">5</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="log"></a><span class="summary-name">log</span> = <code title="logging.getLogger('tftpy')">logging.getLogger('tftpy')</code>
</td>
</tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,377 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpServer'</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
Module&nbsp;TftpServer'
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpServer%27-pysrc.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Source Code for <a href="tftpy.TftpServer%27-module.html">Module tftpy.TftpServer'</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">socket</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">,</tt> <tt class="py-name">time</tt><tt class="py-op">,</tt> <tt class="py-name">random</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">select</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module tftpy.TftpShared=tftpy.TftpShared-module.html"><a title="tftpy.TftpShared" class="py-name" href="#" onclick="return doclink('link-0', 'TftpShared', 'link-0');">TftpShared</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Module tftpy.TftpPacketTypes=tftpy.TftpPacketTypes-module.html"><a title="tftpy.TftpPacketTypes" class="py-name" href="#" onclick="return doclink('link-1', 'TftpPacketTypes', 'link-1');">TftpPacketTypes</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Class tftpy.TftpPacketFactory'.TftpPacketFactory=tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html"><a title="tftpy.TftpPacketFactory'.TftpPacketFactory" class="py-name" href="#" onclick="return doclink('link-2', 'TftpPacketFactory', 'link-2');">TftpPacketFactory</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name" targets="Module tftpy.TftpStates=tftpy.TftpStates-module.html"><a title="tftpy.TftpStates" class="py-name" href="#" onclick="return doclink('link-3', 'TftpStates', 'link-3');">TftpStates</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"> </tt>
<a name="TftpServer"></a><div id="TftpServer-def"><a name="L8"></a><tt class="py-lineno"> 8</tt> <a class="py-toggle" href="#" id="TftpServer-toggle" onclick="return toggle('TftpServer');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpServer'.TftpServer-class.html">TftpServer</a><tt class="py-op">(</tt><tt class="py-base-class">TftpSession</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpServer-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TftpServer-expanded"><a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"> <tt class="py-docstring">"""This class implements a tftp server object."""</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"> </tt>
<a name="TftpServer.__init__"></a><div id="TftpServer.__init__-def"><a name="L11"></a><tt class="py-lineno"> 11</tt> <a class="py-toggle" href="#" id="TftpServer.__init__-toggle" onclick="return toggle('TftpServer.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpServer'.TftpServer-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tftproot</tt><tt class="py-op">=</tt><tt class="py-string">'/tftpboot'</tt><tt class="py-op">,</tt> <tt class="py-param">dyn_file_func</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpServer.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpServer.__init__-expanded"><a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"> <tt class="py-docstring">"""Class constructor. It takes two optional arguments. tftproot is</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-docstring"> the path to the tftproot directory to serve files from and/or write</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-docstring"> them to. dyn_file_func is a callable that must return a file-like</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-docstring"> object to read from during downloads. This permits the serving of</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-docstring"> dynamic content."""</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">listenip</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">listenport</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sock</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"> <tt class="py-comment"># FIXME: What about multiple roots?</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">root</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">abspath</tt><tt class="py-op">(</tt><tt class="py-name">tftproot</tt><tt class="py-op">)</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dyn_file_func</tt> <tt class="py-op">=</tt> <tt class="py-name">dyn_file_func</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"> <tt class="py-comment"># A dict of sessions, where each session is keyed by a string like</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># ip:tid for the remote end.</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">root</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"> <tt id="link-4" class="py-name" targets="Variable tftpy.TftpClient'.log=tftpy.TftpClient%27-module.html#log,Variable tftpy.TftpPacketFactory'.log=tftpy.TftpPacketFactory%27-module.html#log,Variable tftpy.TftpServer'.log=tftpy.TftpServer%27-module.html#log,Variable tftpy.TftpShared.log=tftpy.TftpShared-module.html#log"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-4', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"tftproot %s does exist"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">root</tt><tt class="py-op">)</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">root</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-5" class="py-name" targets="Class tftpy.TftpShared.TftpException=tftpy.TftpShared.TftpException-class.html"><a title="tftpy.TftpShared.TftpException" class="py-name" href="#" onclick="return doclink('link-5', 'TftpException', 'link-5');">TftpException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"The tftproot must be a directory."</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"> <tt id="link-6" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-6', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"tftproot %s is a directory"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">root</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">access</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">root</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">R_OK</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"> <tt id="link-7" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-7', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"tftproot %s is readable"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">root</tt><tt class="py-op">)</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-8" class="py-name"><a title="tftpy.TftpShared.TftpException" class="py-name" href="#" onclick="return doclink('link-8', 'TftpException', 'link-5');">TftpException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"The tftproot must be readable"</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">access</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">root</tt><tt class="py-op">,</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">W_OK</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"> <tt id="link-9" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-9', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"tftproot %s is writable"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">root</tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"> <tt id="link-10" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-10', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">warning</tt><tt class="py-op">(</tt><tt class="py-string">"The tftproot %s is not writable"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">root</tt><tt class="py-op">)</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-11" class="py-name"><a title="tftpy.TftpShared.TftpException" class="py-name" href="#" onclick="return doclink('link-11', 'TftpException', 'link-5');">TftpException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"The tftproot does not exist."</tt> </tt>
</div><a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"> </tt>
<a name="TftpServer.listen"></a><div id="TftpServer.listen-def"><a name="L44"></a><tt class="py-lineno"> 44</tt> <a class="py-toggle" href="#" id="TftpServer.listen-toggle" onclick="return toggle('TftpServer.listen');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpServer'.TftpServer-class.html#listen">listen</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"> <tt class="py-param">listenip</tt><tt class="py-op">=</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"> <tt class="py-param">listenport</tt><tt class="py-op">=</tt><tt id="link-12" class="py-name" targets="Variable tftpy.TftpClient'.DEF_TFTP_PORT=tftpy.TftpClient%27-module.html#DEF_TFTP_PORT,Variable tftpy.TftpPacketFactory'.DEF_TFTP_PORT=tftpy.TftpPacketFactory%27-module.html#DEF_TFTP_PORT,Variable tftpy.TftpServer'.DEF_TFTP_PORT=tftpy.TftpServer%27-module.html#DEF_TFTP_PORT,Variable tftpy.TftpShared.DEF_TFTP_PORT=tftpy.TftpShared-module.html#DEF_TFTP_PORT"><a title="tftpy.TftpClient'.DEF_TFTP_PORT
tftpy.TftpPacketFactory'.DEF_TFTP_PORT
tftpy.TftpServer'.DEF_TFTP_PORT
tftpy.TftpShared.DEF_TFTP_PORT" class="py-name" href="#" onclick="return doclink('link-12', 'DEF_TFTP_PORT', 'link-12');">DEF_TFTP_PORT</a></tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"> <tt class="py-param">timeout</tt><tt class="py-op">=</tt><tt id="link-13" class="py-name" targets="Variable tftpy.TftpClient'.SOCK_TIMEOUT=tftpy.TftpClient%27-module.html#SOCK_TIMEOUT,Variable tftpy.TftpPacketFactory'.SOCK_TIMEOUT=tftpy.TftpPacketFactory%27-module.html#SOCK_TIMEOUT,Variable tftpy.TftpServer'.SOCK_TIMEOUT=tftpy.TftpServer%27-module.html#SOCK_TIMEOUT,Variable tftpy.TftpShared.SOCK_TIMEOUT=tftpy.TftpShared-module.html#SOCK_TIMEOUT"><a title="tftpy.TftpClient'.SOCK_TIMEOUT
tftpy.TftpPacketFactory'.SOCK_TIMEOUT
tftpy.TftpServer'.SOCK_TIMEOUT
tftpy.TftpShared.SOCK_TIMEOUT" class="py-name" href="#" onclick="return doclink('link-13', 'SOCK_TIMEOUT', 'link-13');">SOCK_TIMEOUT</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpServer.listen-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TftpServer.listen-expanded"><a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"> <tt class="py-docstring">"""Start a server listening on the supplied interface and port. This</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"><tt class="py-docstring"> defaults to INADDR_ANY (all interfaces) and UDP port 69. You can also</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"><tt class="py-docstring"> supply a different socket timeout value, if desired."""</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"> <tt class="py-name">tftp_factory</tt> <tt class="py-op">=</tt> <tt id="link-14" class="py-name"><a title="tftpy.TftpPacketFactory'.TftpPacketFactory" class="py-name" href="#" onclick="return doclink('link-14', 'TftpPacketFactory', 'link-2');">TftpPacketFactory</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt> <tt class="py-line"> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"> <tt class="py-comment"># Don't use new 2.5 ternary operator yet</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># listenip = listenip if listenip else '0.0.0.0'</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">listenip</tt><tt class="py-op">:</tt> <tt class="py-name">listenip</tt> <tt class="py-op">=</tt> <tt class="py-string">'0.0.0.0'</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"> <tt id="link-15" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-15', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Server requested on ip %s, port %s"</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">listenip</tt><tt class="py-op">,</tt> <tt class="py-name">listenport</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"> <tt class="py-comment"># FIXME - sockets should be non-blocking?</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sock</tt> <tt class="py-op">=</tt> <tt class="py-name">socket</tt><tt class="py-op">.</tt><tt class="py-name">socket</tt><tt class="py-op">(</tt><tt class="py-name">socket</tt><tt class="py-op">.</tt><tt class="py-name">AF_INET</tt><tt class="py-op">,</tt> <tt class="py-name">socket</tt><tt class="py-op">.</tt><tt class="py-name">SOCK_DGRAM</tt><tt class="py-op">)</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sock</tt><tt class="py-op">.</tt><tt class="py-name">bind</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">listenip</tt><tt class="py-op">,</tt> <tt class="py-name">listenport</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">socket</tt><tt class="py-op">.</tt><tt class="py-name">error</tt><tt class="py-op">,</tt> <tt class="py-name">err</tt><tt class="py-op">:</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"> <tt class="py-comment"># Reraise it for now.</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">raise</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"> <tt id="link-16" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-16', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Starting receive loop..."</tt><tt class="py-op">)</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"> <tt class="py-comment"># Build the inputlist array of sockets to select() on.</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">inputlist</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"> <tt class="py-name">inputlist</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sock</tt><tt class="py-op">)</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">:</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"> <tt class="py-name">inputlist</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">sock</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"> <tt class="py-comment"># Block until some socket has input on it.</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt id="link-17" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-17', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Performing select on this inputlist: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">inputlist</tt><tt class="py-op">)</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"> <tt class="py-name">readyinput</tt><tt class="py-op">,</tt> <tt class="py-name">readyoutput</tt><tt class="py-op">,</tt> <tt class="py-name">readyspecial</tt> <tt class="py-op">=</tt> <tt class="py-name">select</tt><tt class="py-op">.</tt><tt class="py-name">select</tt><tt class="py-op">(</tt><tt class="py-name">inputlist</tt><tt class="py-op">,</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"> <tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"> <tt id="link-18" class="py-name"><a title="tftpy.TftpClient'.SOCK_TIMEOUT
tftpy.TftpPacketFactory'.SOCK_TIMEOUT
tftpy.TftpServer'.SOCK_TIMEOUT
tftpy.TftpShared.SOCK_TIMEOUT" class="py-name" href="#" onclick="return doclink('link-18', 'SOCK_TIMEOUT', 'link-13');">SOCK_TIMEOUT</a></tt><tt class="py-op">)</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"> <tt class="py-name">deletion_list</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"> <tt class="py-comment"># Handle the available data, if any. Maybe we timed-out.</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">for</tt> <tt class="py-name">readysock</tt> <tt class="py-keyword">in</tt> <tt class="py-name">readyinput</tt><tt class="py-op">:</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"> <tt class="py-comment"># Is the traffic on the main server socket? ie. new session?</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-name">readysock</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sock</tt><tt class="py-op">:</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"> <tt id="link-19" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-19', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Data ready on our main socket"</tt><tt class="py-op">)</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> <tt class="py-name">buffer</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">raddress</tt><tt class="py-op">,</tt> <tt class="py-name">rport</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sock</tt><tt class="py-op">.</tt><tt class="py-name">recvfrom</tt><tt class="py-op">(</tt><tt id="link-20" class="py-name" targets="Variable tftpy.TftpClient'.MAX_BLKSIZE=tftpy.TftpClient%27-module.html#MAX_BLKSIZE,Variable tftpy.TftpPacketFactory'.MAX_BLKSIZE=tftpy.TftpPacketFactory%27-module.html#MAX_BLKSIZE,Variable tftpy.TftpServer'.MAX_BLKSIZE=tftpy.TftpServer%27-module.html#MAX_BLKSIZE,Variable tftpy.TftpShared.MAX_BLKSIZE=tftpy.TftpShared-module.html#MAX_BLKSIZE"><a title="tftpy.TftpClient'.MAX_BLKSIZE
tftpy.TftpPacketFactory'.MAX_BLKSIZE
tftpy.TftpServer'.MAX_BLKSIZE
tftpy.TftpShared.MAX_BLKSIZE" class="py-name" href="#" onclick="return doclink('link-20', 'MAX_BLKSIZE', 'link-20');">MAX_BLKSIZE</a></tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"> <tt id="link-21" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-21', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Read %d bytes"</tt> <tt class="py-op">%</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt> <tt class="py-line"> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt class="py-name">recvpkt</tt> <tt class="py-op">=</tt> <tt class="py-name">tftp_factory</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Method tftpy.TftpPacketFactory'.TftpPacketFactory.parse()=tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html#parse"><a title="tftpy.TftpPacketFactory'.TftpPacketFactory.parse" class="py-name" href="#" onclick="return doclink('link-22', 'parse', 'link-22');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"> <tt class="py-comment"># Forge a session key based on the client's IP and port,</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># which should safely work through NAT.</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s:%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">raddress</tt><tt class="py-op">,</tt> <tt class="py-name">rport</tt><tt class="py-op">)</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> <tt id="link-23" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-23', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Creating new server context for "</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> <tt class="py-string">"session key = %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-24" class="py-name" targets="Class tftpy.TftpStates.TftpContextServer=tftpy.TftpStates.TftpContextServer-class.html"><a title="tftpy.TftpStates.TftpContextServer" class="py-name" href="#" onclick="return doclink('link-24', 'TftpContextServer', 'link-24');">TftpContextServer</a></tt><tt class="py-op">(</tt><tt class="py-name">raddress</tt><tt class="py-op">,</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt> <tt class="py-line"> <tt class="py-name">rport</tt><tt class="py-op">,</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"> <tt class="py-name">timeout</tt><tt class="py-op">,</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">root</tt><tt class="py-op">,</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dyn_file_func</tt><tt class="py-op">)</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name" targets="Method tftpy.TftpStates.TftpContext.start()=tftpy.TftpStates.TftpContext-class.html#start,Method tftpy.TftpStates.TftpContextClientDownload.start()=tftpy.TftpStates.TftpContextClientDownload-class.html#start,Method tftpy.TftpStates.TftpContextClientUpload.start()=tftpy.TftpStates.TftpContextClientUpload-class.html#start,Method tftpy.TftpStates.TftpContextServer.start()=tftpy.TftpStates.TftpContextServer-class.html#start"><a title="tftpy.TftpStates.TftpContext.start
tftpy.TftpStates.TftpContextClientDownload.start
tftpy.TftpStates.TftpContextClientUpload.start
tftpy.TftpStates.TftpContextServer.start" class="py-name" href="#" onclick="return doclink('link-25', 'start', 'link-25');">start</a></tt><tt class="py-op">(</tt><tt class="py-name">buffer</tt><tt class="py-op">)</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"> <tt id="link-26" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-26', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"received traffic on main socket for "</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"> <tt class="py-string">"existing session??"</tt><tt class="py-op">)</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt> <tt class="py-line"> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt> <tt class="py-line"> <tt class="py-comment"># Must find the owner of this traffic.</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">:</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">readysock</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">sock</tt><tt class="py-op">:</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"> <tt id="link-27" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-27', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Matched input to session key %s"</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name" targets="Method tftpy.TftpStates.TftpContext.cycle()=tftpy.TftpStates.TftpContext-class.html#cycle"><a title="tftpy.TftpStates.TftpContext.cycle" class="py-name" href="#" onclick="return doclink('link-28', 'cycle', 'link-28');">cycle</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">state</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"> <tt id="link-29" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-29', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Successful transfer."</tt><tt class="py-op">)</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"> <tt class="py-name">deletion_list</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt id="link-30" class="py-name"><a title="tftpy.TftpShared.TftpException" class="py-name" href="#" onclick="return doclink('link-30', 'TftpException', 'link-5');">TftpException</a></tt><tt class="py-op">,</tt> <tt class="py-name">err</tt><tt class="py-op">:</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line"> <tt class="py-name">deletion_list</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt> <tt class="py-line"> <tt id="link-31" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-31', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">error</tt><tt class="py-op">(</tt><tt class="py-string">"Fatal exception thrown from "</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt> <tt class="py-line"> <tt class="py-string">"session %s: %s"</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">err</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt> <tt class="py-line"> <tt class="py-keyword">break</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"> <tt id="link-32" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-32', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">error</tt><tt class="py-op">(</tt><tt class="py-string">"Can't find the owner for this packet. "</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line"> <tt class="py-string">"Discarding."</tt><tt class="py-op">)</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line"> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt> <tt class="py-line"> <tt id="link-33" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-33', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Looping on all sessions to check for timeouts"</tt><tt class="py-op">)</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line"> <tt class="py-name">now</tt> <tt class="py-op">=</tt> <tt class="py-name">time</tt><tt class="py-op">.</tt><tt class="py-name">time</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">:</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name" targets="Method tftpy.TftpStates.TftpContext.checkTimeout()=tftpy.TftpStates.TftpContext-class.html#checkTimeout"><a title="tftpy.TftpStates.TftpContext.checkTimeout" class="py-name" href="#" onclick="return doclink('link-34', 'checkTimeout', 'link-34');">checkTimeout</a></tt><tt class="py-op">(</tt><tt class="py-name">now</tt><tt class="py-op">)</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt id="link-35" class="py-name"><a title="tftpy.TftpShared.TftpException" class="py-name" href="#" onclick="return doclink('link-35', 'TftpException', 'link-5');">TftpException</a></tt><tt class="py-op">,</tt> <tt class="py-name">err</tt><tt class="py-op">:</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"> <tt id="link-36" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-36', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">error</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">err</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line"> <tt class="py-name">deletion_list</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"> <tt id="link-37" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-37', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Iterating deletion list."</tt><tt class="py-op">)</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">deletion_list</tt><tt class="py-op">:</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"> <tt id="link-38" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-38', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> <tt id="link-39" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-39', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Session %s complete"</tt> <tt class="py-op">%</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"> <tt id="link-40" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-40', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Gathering up metrics from session before deleting"</tt><tt class="py-op">)</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name" targets="Method tftpy.TftpStates.TftpContext.end()=tftpy.TftpStates.TftpContext-class.html#end,Method tftpy.TftpStates.TftpContextClientDownload.end()=tftpy.TftpStates.TftpContextClientDownload-class.html#end,Method tftpy.TftpStates.TftpContextClientUpload.end()=tftpy.TftpStates.TftpContextClientUpload-class.html#end,Method tftpy.TftpStates.TftpContextServer.end()=tftpy.TftpStates.TftpContextServer-class.html#end"><a title="tftpy.TftpStates.TftpContext.end
tftpy.TftpStates.TftpContextClientDownload.end
tftpy.TftpStates.TftpContextClientUpload.end
tftpy.TftpStates.TftpContextServer.end" class="py-name" href="#" onclick="return doclink('link-41', 'end', 'link-41');">end</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line"> <tt class="py-name">metrics</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">metrics</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">duration</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"> <tt id="link-42" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-42', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Duration too short, rate undetermined"</tt><tt class="py-op">)</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"> <tt id="link-43" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-43', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Transferred %.2f bytes in %.2f seconds"</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">bytes</tt><tt class="py-op">,</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">duration</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"> <tt id="link-44" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-44', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"Average rate: %.2f kbps"</tt> <tt class="py-op">%</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">kbps</tt><tt class="py-op">)</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"> <tt id="link-45" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-45', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"%.2f bytes in resent data"</tt> <tt class="py-op">%</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">resent_bytes</tt><tt class="py-op">)</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"> <tt id="link-46" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-46', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">"%d duplicate packets"</tt> <tt class="py-op">%</tt> <tt class="py-name">metrics</tt><tt class="py-op">.</tt><tt class="py-name">dupcount</tt><tt class="py-op">)</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"> <tt id="link-47" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-47', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"Deleting session %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line"> <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sessions</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> <tt id="link-48" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-48', 'log', 'link-4');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"Strange, session %s is not on the deletion list"</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L162"></a><tt class="py-lineno">162</tt> <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,284 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpServer'.TftpServer</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpServer%27-module.html">Module&nbsp;TftpServer'</a> ::
Class&nbsp;TftpServer
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpServer%27.TftpServer-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpServer</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpServer%27-pysrc.html#TftpServer">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpPacketTypes.TftpSession-class.html">TftpPacketTypes.TftpSession</a> --+
|
<strong class="uidshort">TftpServer</strong>
</pre>
<hr />
<p>This class implements a tftp server object.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpServer%27.TftpServer-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">tftproot</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">/tftpboot</code><code class="variable-quote">'</code></span>,
<span class="summary-sig-arg">dyn_file_func</span>=<span class="summary-sig-default">None</span>)</span><br />
Class constructor.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpServer%27-pysrc.html#TftpServer.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpServer%27.TftpServer-class.html#listen" class="summary-sig-name">listen</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">listenip</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
<span class="summary-sig-arg">listenport</span>=<span class="summary-sig-default">69</span>,
<span class="summary-sig-arg">timeout</span>=<span class="summary-sig-default">5</span>)</span><br />
Start a server listening on the supplied interface and port.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpServer%27-pysrc.html#TftpServer.listen">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">tftproot</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">/tftpboot</code><code class="variable-quote">'</code></span>,
<span class="sig-arg">dyn_file_func</span>=<span class="sig-default">None</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpServer%27-pysrc.html#TftpServer.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Class constructor. It takes two optional arguments. tftproot is the
path to the tftproot directory to serve files from and/or write them to.
dyn_file_func is a callable that must return a file-like object to read
from during downloads. This permits the serving of dynamic content.</p>
<dl class="fields">
<dt>Overrides:
object.__init__
</dt>
</dl>
</td></tr></table>
</div>
<a name="listen"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">listen</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">listenip</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
<span class="sig-arg">listenport</span>=<span class="sig-default">69</span>,
<span class="sig-arg">timeout</span>=<span class="sig-default">5</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpServer%27-pysrc.html#TftpServer.listen">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Start a server listening on the supplied interface and port. This
defaults to INADDR_ANY (all interfaces) and UDP port 69. You can also
supply a different socket timeout value, if desired.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,339 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpShared</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
Module&nbsp;TftpShared
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpShared-module.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module TftpShared</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpShared-pysrc.html">source&nbsp;code</a></span></p>
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Classes</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Classes"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpShared.TftpErrors-class.html" class="summary-name">TftpErrors</a><br />
This class is a convenience for defining the common tftp error
codes, and making them more readable in the code.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpShared.TftpException-class.html" class="summary-name">TftpException</a><br />
This class is the parent class of all exceptions regarding the
handling of the TFTP protocol.
</td>
</tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Functions</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Functions"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpShared-module.html#tftpassert" class="summary-sig-name">tftpassert</a>(<span class="summary-sig-arg">condition</span>,
<span class="summary-sig-arg">msg</span>)</span><br />
This function is a simple utility that will check the condition
passed for a false state.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpShared-pysrc.html#tftpassert">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpShared-module.html#setLogLevel" class="summary-sig-name">setLogLevel</a>(<span class="summary-sig-arg">level</span>)</span><br />
This function is a utility function for setting the internal log
level.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpShared-pysrc.html#setLogLevel">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Variables"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="LOG_LEVEL"></a><span class="summary-name">LOG_LEVEL</span> = <code title="0">0</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MIN_BLKSIZE"></a><span class="summary-name">MIN_BLKSIZE</span> = <code title="8">8</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="DEF_BLKSIZE"></a><span class="summary-name">DEF_BLKSIZE</span> = <code title="512">512</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MAX_BLKSIZE"></a><span class="summary-name">MAX_BLKSIZE</span> = <code title="65536">65536</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="SOCK_TIMEOUT"></a><span class="summary-name">SOCK_TIMEOUT</span> = <code title="5">5</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MAX_DUPS"></a><span class="summary-name">MAX_DUPS</span> = <code title="20">20</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="TIMEOUT_RETRIES"></a><span class="summary-name">TIMEOUT_RETRIES</span> = <code title="5">5</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="DEF_TFTP_PORT"></a><span class="summary-name">DEF_TFTP_PORT</span> = <code title="69">69</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="log"></a><span class="summary-name">log</span> = <code title="logging.getLogger('tftpy')">logging.getLogger('tftpy')</code>
</td>
</tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Function Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-FunctionDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="tftpassert"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">tftpassert</span>(<span class="sig-arg">condition</span>,
<span class="sig-arg">msg</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpShared-pysrc.html#tftpassert">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>This function is a simple utility that will check the condition passed
for a false state. If it finds one, it throws a TftpException with the
message passed. This just makes the code throughout cleaner by
refactoring.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="setLogLevel"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">setLogLevel</span>(<span class="sig-arg">level</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpShared-pysrc.html#setLogLevel">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>This function is a utility function for setting the internal log
level. The log level defaults to logging.NOTSET, so unwanted output to
stdout is not created.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,197 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpShared</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
Module&nbsp;TftpShared
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpShared-pysrc.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Source Code for <a href="tftpy.TftpShared-module.html">Module tftpy.TftpShared</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable tftpy.TftpClient'.LOG_LEVEL=tftpy.TftpClient%27-module.html#LOG_LEVEL,Variable tftpy.TftpPacketFactory'.LOG_LEVEL=tftpy.TftpPacketFactory%27-module.html#LOG_LEVEL,Variable tftpy.TftpServer'.LOG_LEVEL=tftpy.TftpServer%27-module.html#LOG_LEVEL,Variable tftpy.TftpShared.LOG_LEVEL=tftpy.TftpShared-module.html#LOG_LEVEL"><a title="tftpy.TftpClient'.LOG_LEVEL
tftpy.TftpPacketFactory'.LOG_LEVEL
tftpy.TftpServer'.LOG_LEVEL
tftpy.TftpShared.LOG_LEVEL" class="py-name" href="#" onclick="return doclink('link-0', 'LOG_LEVEL', 'link-0');">LOG_LEVEL</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">NOTSET</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable tftpy.TftpClient'.MIN_BLKSIZE=tftpy.TftpClient%27-module.html#MIN_BLKSIZE,Variable tftpy.TftpPacketFactory'.MIN_BLKSIZE=tftpy.TftpPacketFactory%27-module.html#MIN_BLKSIZE,Variable tftpy.TftpServer'.MIN_BLKSIZE=tftpy.TftpServer%27-module.html#MIN_BLKSIZE,Variable tftpy.TftpShared.MIN_BLKSIZE=tftpy.TftpShared-module.html#MIN_BLKSIZE"><a title="tftpy.TftpClient'.MIN_BLKSIZE
tftpy.TftpPacketFactory'.MIN_BLKSIZE
tftpy.TftpServer'.MIN_BLKSIZE
tftpy.TftpShared.MIN_BLKSIZE" class="py-name" href="#" onclick="return doclink('link-1', 'MIN_BLKSIZE', 'link-1');">MIN_BLKSIZE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">8</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable tftpy.TftpClient'.DEF_BLKSIZE=tftpy.TftpClient%27-module.html#DEF_BLKSIZE,Variable tftpy.TftpPacketFactory'.DEF_BLKSIZE=tftpy.TftpPacketFactory%27-module.html#DEF_BLKSIZE,Variable tftpy.TftpServer'.DEF_BLKSIZE=tftpy.TftpServer%27-module.html#DEF_BLKSIZE,Variable tftpy.TftpShared.DEF_BLKSIZE=tftpy.TftpShared-module.html#DEF_BLKSIZE"><a title="tftpy.TftpClient'.DEF_BLKSIZE
tftpy.TftpPacketFactory'.DEF_BLKSIZE
tftpy.TftpServer'.DEF_BLKSIZE
tftpy.TftpShared.DEF_BLKSIZE" class="py-name" href="#" onclick="return doclink('link-2', 'DEF_BLKSIZE', 'link-2');">DEF_BLKSIZE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">512</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable tftpy.TftpClient'.MAX_BLKSIZE=tftpy.TftpClient%27-module.html#MAX_BLKSIZE,Variable tftpy.TftpPacketFactory'.MAX_BLKSIZE=tftpy.TftpPacketFactory%27-module.html#MAX_BLKSIZE,Variable tftpy.TftpServer'.MAX_BLKSIZE=tftpy.TftpServer%27-module.html#MAX_BLKSIZE,Variable tftpy.TftpShared.MAX_BLKSIZE=tftpy.TftpShared-module.html#MAX_BLKSIZE"><a title="tftpy.TftpClient'.MAX_BLKSIZE
tftpy.TftpPacketFactory'.MAX_BLKSIZE
tftpy.TftpServer'.MAX_BLKSIZE
tftpy.TftpShared.MAX_BLKSIZE" class="py-name" href="#" onclick="return doclink('link-3', 'MAX_BLKSIZE', 'link-3');">MAX_BLKSIZE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">65536</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt id="link-4" class="py-name" targets="Variable tftpy.TftpClient'.SOCK_TIMEOUT=tftpy.TftpClient%27-module.html#SOCK_TIMEOUT,Variable tftpy.TftpPacketFactory'.SOCK_TIMEOUT=tftpy.TftpPacketFactory%27-module.html#SOCK_TIMEOUT,Variable tftpy.TftpServer'.SOCK_TIMEOUT=tftpy.TftpServer%27-module.html#SOCK_TIMEOUT,Variable tftpy.TftpShared.SOCK_TIMEOUT=tftpy.TftpShared-module.html#SOCK_TIMEOUT"><a title="tftpy.TftpClient'.SOCK_TIMEOUT
tftpy.TftpPacketFactory'.SOCK_TIMEOUT
tftpy.TftpServer'.SOCK_TIMEOUT
tftpy.TftpShared.SOCK_TIMEOUT" class="py-name" href="#" onclick="return doclink('link-4', 'SOCK_TIMEOUT', 'link-4');">SOCK_TIMEOUT</a></tt> <tt class="py-op">=</tt> <tt class="py-number">5</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt id="link-5" class="py-name" targets="Variable tftpy.TftpClient'.MAX_DUPS=tftpy.TftpClient%27-module.html#MAX_DUPS,Variable tftpy.TftpPacketFactory'.MAX_DUPS=tftpy.TftpPacketFactory%27-module.html#MAX_DUPS,Variable tftpy.TftpServer'.MAX_DUPS=tftpy.TftpServer%27-module.html#MAX_DUPS,Variable tftpy.TftpShared.MAX_DUPS=tftpy.TftpShared-module.html#MAX_DUPS"><a title="tftpy.TftpClient'.MAX_DUPS
tftpy.TftpPacketFactory'.MAX_DUPS
tftpy.TftpServer'.MAX_DUPS
tftpy.TftpShared.MAX_DUPS" class="py-name" href="#" onclick="return doclink('link-5', 'MAX_DUPS', 'link-5');">MAX_DUPS</a></tt> <tt class="py-op">=</tt> <tt class="py-number">20</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable tftpy.TftpClient'.TIMEOUT_RETRIES=tftpy.TftpClient%27-module.html#TIMEOUT_RETRIES,Variable tftpy.TftpPacketFactory'.TIMEOUT_RETRIES=tftpy.TftpPacketFactory%27-module.html#TIMEOUT_RETRIES,Variable tftpy.TftpServer'.TIMEOUT_RETRIES=tftpy.TftpServer%27-module.html#TIMEOUT_RETRIES,Variable tftpy.TftpShared.TIMEOUT_RETRIES=tftpy.TftpShared-module.html#TIMEOUT_RETRIES"><a title="tftpy.TftpClient'.TIMEOUT_RETRIES
tftpy.TftpPacketFactory'.TIMEOUT_RETRIES
tftpy.TftpServer'.TIMEOUT_RETRIES
tftpy.TftpShared.TIMEOUT_RETRIES" class="py-name" href="#" onclick="return doclink('link-6', 'TIMEOUT_RETRIES', 'link-6');">TIMEOUT_RETRIES</a></tt> <tt class="py-op">=</tt> <tt class="py-number">5</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt id="link-7" class="py-name" targets="Variable tftpy.TftpClient'.DEF_TFTP_PORT=tftpy.TftpClient%27-module.html#DEF_TFTP_PORT,Variable tftpy.TftpPacketFactory'.DEF_TFTP_PORT=tftpy.TftpPacketFactory%27-module.html#DEF_TFTP_PORT,Variable tftpy.TftpServer'.DEF_TFTP_PORT=tftpy.TftpServer%27-module.html#DEF_TFTP_PORT,Variable tftpy.TftpShared.DEF_TFTP_PORT=tftpy.TftpShared-module.html#DEF_TFTP_PORT"><a title="tftpy.TftpClient'.DEF_TFTP_PORT
tftpy.TftpPacketFactory'.DEF_TFTP_PORT
tftpy.TftpServer'.DEF_TFTP_PORT
tftpy.TftpShared.DEF_TFTP_PORT" class="py-name" href="#" onclick="return doclink('link-7', 'DEF_TFTP_PORT', 'link-7');">DEF_TFTP_PORT</a></tt> <tt class="py-op">=</tt> <tt class="py-number">69</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"><tt class="py-comment"># Initialize the logger.</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#logging.basicConfig(</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># level=LOG_LEVEL,</tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># datefmt='%m-%d %H:%M:%S')</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">basicConfig</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"><tt class="py-comment"># The logger used by this library. Feel free to clobber it with your own, if you like, as</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># long as it conforms to Python's logging.</tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"><tt class="py-comment"></tt><tt id="link-8" class="py-name" targets="Variable tftpy.TftpClient'.log=tftpy.TftpClient%27-module.html#log,Variable tftpy.TftpPacketFactory'.log=tftpy.TftpPacketFactory%27-module.html#log,Variable tftpy.TftpServer'.log=tftpy.TftpServer%27-module.html#log,Variable tftpy.TftpShared.log=tftpy.TftpShared-module.html#log"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-8', 'log', 'link-8');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">'tftpy'</tt><tt class="py-op">)</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"> </tt>
<a name="tftpassert"></a><div id="tftpassert-def"><a name="L22"></a><tt class="py-lineno">22</tt> <a class="py-toggle" href="#" id="tftpassert-toggle" onclick="return toggle('tftpassert');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpShared-module.html#tftpassert">tftpassert</a><tt class="py-op">(</tt><tt class="py-param">condition</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="tftpassert-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="tftpassert-expanded"><a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"> <tt class="py-docstring">"""This function is a simple utility that will check the condition</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"><tt class="py-docstring"> passed for a false state. If it finds one, it throws a TftpException</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"><tt class="py-docstring"> with the message passed. This just makes the code throughout cleaner</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"><tt class="py-docstring"> by refactoring."""</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">condition</tt><tt class="py-op">:</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-9" class="py-name" targets="Class tftpy.TftpShared.TftpException=tftpy.TftpShared.TftpException-class.html"><a title="tftpy.TftpShared.TftpException" class="py-name" href="#" onclick="return doclink('link-9', 'TftpException', 'link-9');">TftpException</a></tt><tt class="py-op">,</tt> <tt class="py-name">msg</tt> </tt>
</div><a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"> </tt>
<a name="setLogLevel"></a><div id="setLogLevel-def"><a name="L30"></a><tt class="py-lineno">30</tt> <a class="py-toggle" href="#" id="setLogLevel-toggle" onclick="return toggle('setLogLevel');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="tftpy.TftpShared-module.html#setLogLevel">setLogLevel</a><tt class="py-op">(</tt><tt class="py-param">level</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="setLogLevel-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="setLogLevel-expanded"><a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"> <tt class="py-docstring">"""This function is a utility function for setting the internal log level.</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-docstring"> The log level defaults to logging.NOTSET, so unwanted output to stdout is</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"><tt class="py-docstring"> not created."""</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"> <tt class="py-keyword">global</tt> <tt id="link-10" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-10', 'log', 'link-8');">log</a></tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"> <tt id="link-11" class="py-name"><a title="tftpy.TftpClient'.log
tftpy.TftpPacketFactory'.log
tftpy.TftpServer'.log
tftpy.TftpShared.log" class="py-name" href="#" onclick="return doclink('link-11', 'log', 'link-8');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">setLevel</tt><tt class="py-op">(</tt><tt class="py-name">level</tt><tt class="py-op">)</tt> </tt>
</div><a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"> </tt>
<a name="TftpErrors"></a><div id="TftpErrors-def"><a name="L37"></a><tt class="py-lineno">37</tt> <a class="py-toggle" href="#" id="TftpErrors-toggle" onclick="return toggle('TftpErrors');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpShared.TftpErrors-class.html">TftpErrors</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpErrors-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="TftpErrors-expanded"><a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"> <tt class="py-docstring">"""This class is a convenience for defining the common tftp error codes,</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"><tt class="py-docstring"> and making them more readable in the code."""</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> <tt id="link-12" class="py-name" targets="Variable tftpy.TftpShared.TftpErrors.NotDefined=tftpy.TftpShared.TftpErrors-class.html#NotDefined"><a title="tftpy.TftpShared.TftpErrors.NotDefined" class="py-name" href="#" onclick="return doclink('link-12', 'NotDefined', 'link-12');">NotDefined</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"> <tt id="link-13" class="py-name" targets="Variable tftpy.TftpShared.TftpErrors.FileNotFound=tftpy.TftpShared.TftpErrors-class.html#FileNotFound"><a title="tftpy.TftpShared.TftpErrors.FileNotFound" class="py-name" href="#" onclick="return doclink('link-13', 'FileNotFound', 'link-13');">FileNotFound</a></tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"> <tt id="link-14" class="py-name" targets="Variable tftpy.TftpShared.TftpErrors.AccessViolation=tftpy.TftpShared.TftpErrors-class.html#AccessViolation"><a title="tftpy.TftpShared.TftpErrors.AccessViolation" class="py-name" href="#" onclick="return doclink('link-14', 'AccessViolation', 'link-14');">AccessViolation</a></tt> <tt class="py-op">=</tt> <tt class="py-number">2</tt> </tt>
<a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"> <tt id="link-15" class="py-name" targets="Variable tftpy.TftpShared.TftpErrors.DiskFull=tftpy.TftpShared.TftpErrors-class.html#DiskFull"><a title="tftpy.TftpShared.TftpErrors.DiskFull" class="py-name" href="#" onclick="return doclink('link-15', 'DiskFull', 'link-15');">DiskFull</a></tt> <tt class="py-op">=</tt> <tt class="py-number">3</tt> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"> <tt id="link-16" class="py-name" targets="Variable tftpy.TftpShared.TftpErrors.IllegalTftpOp=tftpy.TftpShared.TftpErrors-class.html#IllegalTftpOp"><a title="tftpy.TftpShared.TftpErrors.IllegalTftpOp" class="py-name" href="#" onclick="return doclink('link-16', 'IllegalTftpOp', 'link-16');">IllegalTftpOp</a></tt> <tt class="py-op">=</tt> <tt class="py-number">4</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"> <tt id="link-17" class="py-name" targets="Variable tftpy.TftpShared.TftpErrors.UnknownTID=tftpy.TftpShared.TftpErrors-class.html#UnknownTID"><a title="tftpy.TftpShared.TftpErrors.UnknownTID" class="py-name" href="#" onclick="return doclink('link-17', 'UnknownTID', 'link-17');">UnknownTID</a></tt> <tt class="py-op">=</tt> <tt class="py-number">5</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"> <tt id="link-18" class="py-name" targets="Variable tftpy.TftpShared.TftpErrors.FileAlreadyExists=tftpy.TftpShared.TftpErrors-class.html#FileAlreadyExists"><a title="tftpy.TftpShared.TftpErrors.FileAlreadyExists" class="py-name" href="#" onclick="return doclink('link-18', 'FileAlreadyExists', 'link-18');">FileAlreadyExists</a></tt> <tt class="py-op">=</tt> <tt class="py-number">6</tt> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"> <tt id="link-19" class="py-name" targets="Variable tftpy.TftpShared.TftpErrors.NoSuchUser=tftpy.TftpShared.TftpErrors-class.html#NoSuchUser"><a title="tftpy.TftpShared.TftpErrors.NoSuchUser" class="py-name" href="#" onclick="return doclink('link-19', 'NoSuchUser', 'link-19');">NoSuchUser</a></tt> <tt class="py-op">=</tt> <tt class="py-number">7</tt> </tt>
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"> <tt id="link-20" class="py-name" targets="Variable tftpy.TftpShared.TftpErrors.FailedNegotiation=tftpy.TftpShared.TftpErrors-class.html#FailedNegotiation"><a title="tftpy.TftpShared.TftpErrors.FailedNegotiation" class="py-name" href="#" onclick="return doclink('link-20', 'FailedNegotiation', 'link-20');">FailedNegotiation</a></tt> <tt class="py-op">=</tt> <tt class="py-number">8</tt> </tt>
</div><a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"> </tt>
<a name="TftpException"></a><div id="TftpException-def"><a name="L50"></a><tt class="py-lineno">50</tt> <a class="py-toggle" href="#" id="TftpException-toggle" onclick="return toggle('TftpException');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="tftpy.TftpShared.TftpException-class.html">TftpException</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TftpException-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="TftpException-expanded"><a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"> <tt class="py-docstring">"""This class is the parent class of all exceptions regarding the handling</tt> </tt>
<a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"><tt class="py-docstring"> of the TFTP protocol."""</tt> </tt>
<a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
</div><a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:22 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,255 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpShared.TftpErrors</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpShared-module.html">Module&nbsp;TftpShared</a> ::
Class&nbsp;TftpErrors
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpShared.TftpErrors-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpErrors</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpShared-pysrc.html#TftpErrors">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<strong class="uidshort">TftpErrors</strong>
</pre>
<hr />
<p>This class is a convenience for defining the common tftp error codes,
and making them more readable in the code.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__init__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Class Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-ClassVariables"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="NotDefined"></a><span class="summary-name">NotDefined</span> = <code title="0">0</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="FileNotFound"></a><span class="summary-name">FileNotFound</span> = <code title="1">1</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="AccessViolation"></a><span class="summary-name">AccessViolation</span> = <code title="2">2</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="DiskFull"></a><span class="summary-name">DiskFull</span> = <code title="3">3</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="IllegalTftpOp"></a><span class="summary-name">IllegalTftpOp</span> = <code title="4">4</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="UnknownTID"></a><span class="summary-name">UnknownTID</span> = <code title="5">5</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="FileAlreadyExists"></a><span class="summary-name">FileAlreadyExists</span> = <code title="6">6</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="NoSuchUser"></a><span class="summary-name">NoSuchUser</span> = <code title="7">7</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="FailedNegotiation"></a><span class="summary-name">FailedNegotiation</span> = <code title="8">8</code>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,189 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpShared.TftpException</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpShared-module.html">Module&nbsp;TftpShared</a> ::
Class&nbsp;TftpException
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpShared.TftpException-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpException</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpShared-pysrc.html#TftpException">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
exceptions.BaseException --+
|
exceptions.Exception --+
|
<strong class="uidshort">TftpException</strong>
</pre>
<hr />
<p>This class is the parent class of all exceptions regarding the
handling of the TFTP protocol.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.Exception</code></b>:
<code>__init__</code>,
<code>__new__</code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__getitem__</code>,
<code>__getslice__</code>,
<code>__reduce__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__setstate__</code>,
<code>__str__</code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__hash__</code>,
<code>__reduce_ex__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
<code>args</code>,
<code>message</code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,229 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
Module&nbsp;TftpStates
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates-module.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module TftpStates</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html">source&nbsp;code</a></span></p>
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Classes</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Classes"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpMetrics-class.html" class="summary-name">TftpMetrics</a><br />
A class representing metrics of the transfer.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpContext-class.html" class="summary-name">TftpContext</a><br />
The base class of the contexts.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpContextServer-class.html" class="summary-name">TftpContextServer</a><br />
The context for the server.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpContextClientUpload-class.html" class="summary-name">TftpContextClientUpload</a><br />
The upload context for the client during an upload.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpContextClientDownload-class.html" class="summary-name">TftpContextClientDownload</a><br />
The download context for the client during a download.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpState-class.html" class="summary-name">TftpState</a><br />
The base class for the states.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpStateServerRecvRRQ-class.html" class="summary-name">TftpStateServerRecvRRQ</a><br />
This class represents the state of the TFTP server when it has just
received an RRQ packet.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpStateServerRecvWRQ-class.html" class="summary-name">TftpStateServerRecvWRQ</a><br />
This class represents the state of the TFTP server when it has just
received a WRQ packet.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpStateServerStart-class.html" class="summary-name">TftpStateServerStart</a><br />
The start state for the server.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpStateExpectACK-class.html" class="summary-name">TftpStateExpectACK</a><br />
This class represents the state of the transfer when a DAT was just
sent, and we are waiting for an ACK from the server.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpStateExpectDAT-class.html" class="summary-name">TftpStateExpectDAT</a><br />
Just sent an ACK packet.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpStateSentWRQ-class.html" class="summary-name">TftpStateSentWRQ</a><br />
Just sent an WRQ packet for an upload.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpStateSentRRQ-class.html" class="summary-name">TftpStateSentRRQ</a><br />
Just sent an RRQ packet.
</td>
</tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -1,455 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpContext</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpContext
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpContext-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpContext</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContext">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<strong class="uidshort">TftpContext</strong>
</pre>
<dl><dt>Known Subclasses:</dt>
<dd>
<ul class="subclass-list">
<li><a href="tftpy.TftpStates.TftpContextClientDownload-class.html">TftpContextClientDownload</a></li><li>, <a href="tftpy.TftpStates.TftpContextClientUpload-class.html">TftpContextClientUpload</a></li><li>, <a href="tftpy.TftpStates.TftpContextServer-class.html">TftpContextServer</a></li> </ul>
</dd></dl>
<hr />
<p>The base class of the contexts.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpContext-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">host</span>,
<span class="summary-sig-arg">port</span>,
<span class="summary-sig-arg">timeout</span>)</span><br />
Constructor for the base context, setting shared instance variables.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContext.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="checkTimeout"></a><span class="summary-sig-name">checkTimeout</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">now</span>)</span><br />
Compare current time with last_update time, and raise an exception if
we're over SOCK_TIMEOUT time.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContext.checkTimeout">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="start"></a><span class="summary-sig-name">start</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContext.start">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="end"></a><span class="summary-sig-name">end</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContext.end">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="gethost"></a><span class="summary-sig-name">gethost</span>(<span class="summary-sig-arg">self</span>)</span><br />
Simple getter method for use in a property.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContext.gethost">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="sethost"></a><span class="summary-sig-name">sethost</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">host</span>)</span><br />
Setter method that also sets the address property as a result of the
host that is set.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContext.sethost">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="setNextBlock"></a><span class="summary-sig-name">setNextBlock</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">block</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContext.setNextBlock">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="getNextBlock"></a><span class="summary-sig-name">getNextBlock</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContext.getNextBlock">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="cycle"></a><span class="summary-sig-name">cycle</span>(<span class="summary-sig-arg">self</span>)</span><br />
Here we wait for a response from the server after sending it
something, and dispatch appropriate action to that response.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContext.cycle">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpContext-class.html#host" class="summary-name">host</a><br />
Simple getter method for use in a property.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="tftpy.TftpStates.TftpContext-class.html#next_block" class="summary-name">next_block</a>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">host</span>,
<span class="sig-arg">port</span>,
<span class="sig-arg">timeout</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContext.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Constructor for the base context, setting shared instance
variables.</p>
<dl class="fields">
<dt>Overrides:
object.__init__
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== PROPERTY DETAILS ==================== -->
<a name="section-PropertyDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Property Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-PropertyDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="host"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">host</h3>
<p>Simple getter method for use in a property.</p>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><a href="tftpy.TftpStates.TftpContext-class.html#gethost" class="summary-sig-name">gethost</a>(<span class="summary-sig-arg">self</span>)</span>
- Simple getter method for use in a property.
</dd>
<dt>Set Method:</dt>
<dd class="value"><span class="summary-sig"><a href="tftpy.TftpStates.TftpContext-class.html#sethost" class="summary-sig-name">sethost</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">host</span>)</span>
- Setter method that also sets the address property as a result of the
host that is set.
</dd>
</dl>
</td></tr></table>
</div>
<a name="next_block"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">next_block</h3>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><a href="tftpy.TftpStates.TftpContext-class.html#getNextBlock" class="summary-sig-name">getNextBlock</a>(<span class="summary-sig-arg">self</span>)</span>
</dd>
<dt>Set Method:</dt>
<dd class="value"><span class="summary-sig"><a href="tftpy.TftpStates.TftpContext-class.html#setNextBlock" class="summary-sig-name">setNextBlock</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">block</span>)</span>
</dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,339 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpContextClientDownload</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpContextClientDownload
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpContextClientDownload-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpContextClientDownload</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientDownload">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a> --+
|
<strong class="uidshort">TftpContextClientDownload</strong>
</pre>
<hr />
<p>The download context for the client during a download.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpContextClientDownload-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">host</span>,
<span class="summary-sig-arg">port</span>,
<span class="summary-sig-arg">filename</span>,
<span class="summary-sig-arg">output</span>,
<span class="summary-sig-arg">options</span>,
<span class="summary-sig-arg">packethook</span>,
<span class="summary-sig-arg">timeout</span>)</span><br />
Constructor for the base context, setting shared instance variables.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientDownload.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpContextClientDownload-class.html#start" class="summary-sig-name">start</a>(<span class="summary-sig-arg">self</span>)</span><br />
Initiate the download.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientDownload.start">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpContextClientDownload-class.html#end" class="summary-sig-name">end</a>(<span class="summary-sig-arg">self</span>)</span><br />
Finish up the context.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientDownload.end">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a></code></b>:
<code><a href="tftpy.TftpStates.TftpContext-class.html#checkTimeout">checkTimeout</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#cycle">cycle</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#getNextBlock">getNextBlock</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#gethost">gethost</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#setNextBlock">setNextBlock</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#sethost">sethost</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a></code></b>:
<code><a href="tftpy.TftpStates.TftpContext-class.html#host">host</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#next_block">next_block</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">host</span>,
<span class="sig-arg">port</span>,
<span class="sig-arg">filename</span>,
<span class="sig-arg">output</span>,
<span class="sig-arg">options</span>,
<span class="sig-arg">packethook</span>,
<span class="sig-arg">timeout</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientDownload.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Constructor for the base context, setting shared instance
variables.</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="start"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">start</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientDownload.start">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Initiate the download.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpContext-class.html#start">TftpContext.start</a>
</dt>
</dl>
</td></tr></table>
</div>
<a name="end"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">end</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientDownload.end">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Finish up the context.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpContext-class.html#end">TftpContext.end</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,338 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpContextClientUpload</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpContextClientUpload
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpContextClientUpload-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpContextClientUpload</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientUpload">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a> --+
|
<strong class="uidshort">TftpContextClientUpload</strong>
</pre>
<hr />
<p>The upload context for the client during an upload.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpContextClientUpload-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">host</span>,
<span class="summary-sig-arg">port</span>,
<span class="summary-sig-arg">filename</span>,
<span class="summary-sig-arg">input</span>,
<span class="summary-sig-arg">options</span>,
<span class="summary-sig-arg">packethook</span>,
<span class="summary-sig-arg">timeout</span>)</span><br />
Constructor for the base context, setting shared instance variables.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientUpload.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpContextClientUpload-class.html#start" class="summary-sig-name">start</a>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientUpload.start">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpContextClientUpload-class.html#end" class="summary-sig-name">end</a>(<span class="summary-sig-arg">self</span>)</span><br />
Finish up the context.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientUpload.end">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a></code></b>:
<code><a href="tftpy.TftpStates.TftpContext-class.html#checkTimeout">checkTimeout</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#cycle">cycle</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#getNextBlock">getNextBlock</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#gethost">gethost</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#setNextBlock">setNextBlock</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#sethost">sethost</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a></code></b>:
<code><a href="tftpy.TftpStates.TftpContext-class.html#host">host</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#next_block">next_block</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">host</span>,
<span class="sig-arg">port</span>,
<span class="sig-arg">filename</span>,
<span class="sig-arg">input</span>,
<span class="sig-arg">options</span>,
<span class="sig-arg">packethook</span>,
<span class="sig-arg">timeout</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientUpload.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Constructor for the base context, setting shared instance
variables.</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="start"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">start</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientUpload.start">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpContext-class.html#start">TftpContext.start</a>
</dt>
</dl>
</td></tr></table>
</div>
<a name="end"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">end</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextClientUpload.end">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Finish up the context.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpContext-class.html#end">TftpContext.end</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,339 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpContextServer</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpContextServer
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpContextServer-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpContextServer</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextServer">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a> --+
|
<strong class="uidshort">TftpContextServer</strong>
</pre>
<hr />
<p>The context for the server.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpContextServer-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">host</span>,
<span class="summary-sig-arg">port</span>,
<span class="summary-sig-arg">timeout</span>,
<span class="summary-sig-arg">root</span>,
<span class="summary-sig-arg">dyn_file_func</span>)</span><br />
Constructor for the base context, setting shared instance variables.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextServer.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpContextServer-class.html#start" class="summary-sig-name">start</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">buffer</span>)</span><br />
Start the state cycle.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextServer.start">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpContextServer-class.html#end" class="summary-sig-name">end</a>(<span class="summary-sig-arg">self</span>)</span><br />
Finish up the context.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextServer.end">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a></code></b>:
<code><a href="tftpy.TftpStates.TftpContext-class.html#checkTimeout">checkTimeout</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#cycle">cycle</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#getNextBlock">getNextBlock</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#gethost">gethost</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#setNextBlock">setNextBlock</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#sethost">sethost</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpContext-class.html">TftpContext</a></code></b>:
<code><a href="tftpy.TftpStates.TftpContext-class.html#host">host</a></code>,
<code><a href="tftpy.TftpStates.TftpContext-class.html#next_block">next_block</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">host</span>,
<span class="sig-arg">port</span>,
<span class="sig-arg">timeout</span>,
<span class="sig-arg">root</span>,
<span class="sig-arg">dyn_file_func</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextServer.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Constructor for the base context, setting shared instance
variables.</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="start"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">start</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">buffer</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextServer.start">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Start the state cycle. Note that the server context receives an
initial packet in its start method. Also note that the server does not
loop on cycle(), as it expects the TftpServer object to manage that.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpContext-class.html#start">TftpContext.start</a>
</dt>
</dl>
</td></tr></table>
</div>
<a name="end"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">end</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpContextServer.end">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Finish up the context.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpContext-class.html#end">TftpContext.end</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,267 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpMetrics</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpMetrics
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpMetrics-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpMetrics</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpMetrics">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<strong class="uidshort">TftpMetrics</strong>
</pre>
<hr />
<p>A class representing metrics of the transfer.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpMetrics-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpMetrics.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="compute"></a><span class="summary-sig-name">compute</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpMetrics.compute">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="add_dup"></a><span class="summary-sig-name">add_dup</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">blocknumber</span>)</span><br />
This method adds a dup for a block number to the metrics.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpMetrics.add_dup">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpMetrics.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
signature</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,508 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpState</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpState
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpState-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpState</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<strong class="uidshort">TftpState</strong>
</pre>
<dl><dt>Known Subclasses:</dt>
<dd>
<ul class="subclass-list">
<li><a href="tftpy.TftpStates.TftpStateExpectACK-class.html">TftpStateExpectACK</a></li><li>, <a href="tftpy.TftpStates.TftpStateExpectDAT-class.html">TftpStateExpectDAT</a></li><li>, <a href="tftpy.TftpStates.TftpStateSentRRQ-class.html">TftpStateSentRRQ</a></li><li>, <a href="tftpy.TftpStates.TftpStateSentWRQ-class.html">TftpStateSentWRQ</a></li><li>, <a href="tftpy.TftpStates.TftpStateServerRecvRRQ-class.html">TftpStateServerRecvRRQ</a></li><li>, <a href="tftpy.TftpStates.TftpStateServerRecvWRQ-class.html">TftpStateServerRecvWRQ</a></li><li>, <a href="tftpy.TftpStates.TftpStateServerStart-class.html">TftpStateServerStart</a></li> </ul>
</dd></dl>
<hr />
<p>The base class for the states.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpState-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">context</span>)</span><br />
Constructor for setting up common instance variables.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.__init__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpState-class.html#handle" class="summary-sig-name">handle</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">pkt</span>,
<span class="summary-sig-arg">raddress</span>,
<span class="summary-sig-arg">rport</span>)</span><br />
An abstract method for handling a packet.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.handle">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="handleOACK"></a><span class="summary-sig-name">handleOACK</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">pkt</span>)</span><br />
This method handles an OACK from the server, syncing any accepted
options.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.handleOACK">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="returnSupportedOptions"></a><span class="summary-sig-name">returnSupportedOptions</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">options</span>)</span><br />
This method takes a requested options list from a client, and returns
the ones that are supported.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.returnSupportedOptions">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpState-class.html#serverInitial" class="summary-sig-name">serverInitial</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">pkt</span>,
<span class="summary-sig-arg">raddress</span>,
<span class="summary-sig-arg">rport</span>)</span><br />
This method performs initial setup for a server context transfer, put
here to refactor code out of the TftpStateServerRecvRRQ and
TftpStateServerRecvWRQ classes, since their initial setup is
identical.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.serverInitial">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpState-class.html#sendDAT" class="summary-sig-name">sendDAT</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">resend</span>=<span class="summary-sig-default">False</span>)</span><br />
This method sends the next DAT packet based on the data in the
context.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.sendDAT">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpState-class.html#sendACK" class="summary-sig-name">sendACK</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">blocknumber</span>=<span class="summary-sig-default">None</span>)</span><br />
This method sends an ack packet to the block number specified.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.sendACK">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="sendError"></a><span class="summary-sig-name">sendError</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">errorcode</span>)</span><br />
This method uses the socket passed, and uses the errorcode to compose
and send an error packet.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.sendError">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="sendOACK"></a><span class="summary-sig-name">sendOACK</span>(<span class="summary-sig-arg">self</span>)</span><br />
This method sends an OACK packet with the options from the current
context.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.sendOACK">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="handleDat"></a><span class="summary-sig-name">handleDat</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">pkt</span>)</span><br />
This method handles a DAT packet during a client download, or a
server upload.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.handleDat">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">context</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.__init__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Constructor for setting up common instance variables. The involved
file object is required, since in tftp there's always a file
involved.</p>
<dl class="fields">
<dt>Overrides:
object.__init__
</dt>
</dl>
</td></tr></table>
</div>
<a name="handle"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">handle</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">pkt</span>,
<span class="sig-arg">raddress</span>,
<span class="sig-arg">rport</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.handle">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>An abstract method for handling a packet. It is expected to return a
TftpState object, either itself or a new state.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="serverInitial"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">serverInitial</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">pkt</span>,
<span class="sig-arg">raddress</span>,
<span class="sig-arg">rport</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.serverInitial">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>This method performs initial setup for a server context transfer, put
here to refactor code out of the TftpStateServerRecvRRQ and
TftpStateServerRecvWRQ classes, since their initial setup is identical.
The method returns a boolean, sendoack, to indicate whether it is
required to send an OACK to the client.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="sendDAT"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">sendDAT</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">resend</span>=<span class="sig-default">False</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.sendDAT">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>This method sends the next DAT packet based on the data in the
context. It returns a boolean indicating whether the transfer is
finished.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="sendACK"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">sendACK</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">blocknumber</span>=<span class="sig-default">None</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpState.sendACK">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>This method sends an ack packet to the block number specified. If none
is specified, it defaults to the next_block property in the parent
context.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,252 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpStateExpectACK</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpStateExpectACK
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpStateExpectACK-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpStateExpectACK</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateExpectACK">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a> --+
|
<strong class="uidshort">TftpStateExpectACK</strong>
</pre>
<hr />
<p>This class represents the state of the transfer when a DAT was just
sent, and we are waiting for an ACK from the server. This class is the
same one used by the client during the upload, and the server during the
download.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpStateExpectACK-class.html#handle" class="summary-sig-name">handle</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">pkt</span>,
<span class="summary-sig-arg">raddress</span>,
<span class="summary-sig-arg">rport</span>)</span><br />
Handle a packet, hopefully an ACK since we just sent a DAT.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateExpectACK.handle">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpState-class.html">TftpState</a></code></b>:
<code><a href="tftpy.TftpStates.TftpState-class.html#__init__">__init__</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleDat">handleDat</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleOACK">handleOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#returnSupportedOptions">returnSupportedOptions</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendACK">sendACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendDAT">sendDAT</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendError">sendError</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendOACK">sendOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#serverInitial">serverInitial</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="handle"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">handle</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">pkt</span>,
<span class="sig-arg">raddress</span>,
<span class="sig-arg">rport</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateExpectACK.handle">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Handle a packet, hopefully an ACK since we just sent a DAT.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpState-class.html#handle">TftpState.handle</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,249 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpStateExpectDAT</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpStateExpectDAT
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpStateExpectDAT-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpStateExpectDAT</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateExpectDAT">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a> --+
|
<strong class="uidshort">TftpStateExpectDAT</strong>
</pre>
<hr />
<p>Just sent an ACK packet. Waiting for DAT.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpStateExpectDAT-class.html#handle" class="summary-sig-name">handle</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">pkt</span>,
<span class="summary-sig-arg">raddress</span>,
<span class="summary-sig-arg">rport</span>)</span><br />
Handle the packet in response to an ACK, which should be a DAT.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateExpectDAT.handle">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpState-class.html">TftpState</a></code></b>:
<code><a href="tftpy.TftpStates.TftpState-class.html#__init__">__init__</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleDat">handleDat</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleOACK">handleOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#returnSupportedOptions">returnSupportedOptions</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendACK">sendACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendDAT">sendDAT</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendError">sendError</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendOACK">sendOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#serverInitial">serverInitial</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="handle"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">handle</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">pkt</span>,
<span class="sig-arg">raddress</span>,
<span class="sig-arg">rport</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateExpectDAT.handle">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Handle the packet in response to an ACK, which should be a DAT.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpState-class.html#handle">TftpState.handle</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,249 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpStateSentRRQ</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpStateSentRRQ
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpStateSentRRQ-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpStateSentRRQ</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateSentRRQ">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a> --+
|
<strong class="uidshort">TftpStateSentRRQ</strong>
</pre>
<hr />
<p>Just sent an RRQ packet.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpStateSentRRQ-class.html#handle" class="summary-sig-name">handle</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">pkt</span>,
<span class="summary-sig-arg">raddress</span>,
<span class="summary-sig-arg">rport</span>)</span><br />
Handle the packet in response to an RRQ to the server.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateSentRRQ.handle">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpState-class.html">TftpState</a></code></b>:
<code><a href="tftpy.TftpStates.TftpState-class.html#__init__">__init__</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleDat">handleDat</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleOACK">handleOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#returnSupportedOptions">returnSupportedOptions</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendACK">sendACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendDAT">sendDAT</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendError">sendError</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendOACK">sendOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#serverInitial">serverInitial</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="handle"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">handle</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">pkt</span>,
<span class="sig-arg">raddress</span>,
<span class="sig-arg">rport</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateSentRRQ.handle">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Handle the packet in response to an RRQ to the server.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpState-class.html#handle">TftpState.handle</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,249 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpStateSentWRQ</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpStateSentWRQ
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpStateSentWRQ-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpStateSentWRQ</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateSentWRQ">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a> --+
|
<strong class="uidshort">TftpStateSentWRQ</strong>
</pre>
<hr />
<p>Just sent an WRQ packet for an upload.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpStateSentWRQ-class.html#handle" class="summary-sig-name">handle</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">pkt</span>,
<span class="summary-sig-arg">raddress</span>,
<span class="summary-sig-arg">rport</span>)</span><br />
Handle a packet we just received.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateSentWRQ.handle">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpState-class.html">TftpState</a></code></b>:
<code><a href="tftpy.TftpStates.TftpState-class.html#__init__">__init__</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleDat">handleDat</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleOACK">handleOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#returnSupportedOptions">returnSupportedOptions</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendACK">sendACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendDAT">sendDAT</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendError">sendError</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendOACK">sendOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#serverInitial">serverInitial</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="handle"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">handle</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">pkt</span>,
<span class="sig-arg">raddress</span>,
<span class="sig-arg">rport</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateSentWRQ.handle">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Handle a packet we just received.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpState-class.html#handle">TftpState.handle</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,250 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpStateServerRecvRRQ</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpStateServerRecvRRQ
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpStateServerRecvRRQ-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpStateServerRecvRRQ</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateServerRecvRRQ">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a> --+
|
<strong class="uidshort">TftpStateServerRecvRRQ</strong>
</pre>
<hr />
<p>This class represents the state of the TFTP server when it has just
received an RRQ packet.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpStateServerRecvRRQ-class.html#handle" class="summary-sig-name">handle</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">pkt</span>,
<span class="summary-sig-arg">raddress</span>,
<span class="summary-sig-arg">rport</span>)</span><br />
Handle an initial RRQ packet as a server.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateServerRecvRRQ.handle">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpState-class.html">TftpState</a></code></b>:
<code><a href="tftpy.TftpStates.TftpState-class.html#__init__">__init__</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleDat">handleDat</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleOACK">handleOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#returnSupportedOptions">returnSupportedOptions</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendACK">sendACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendDAT">sendDAT</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendError">sendError</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendOACK">sendOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#serverInitial">serverInitial</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="handle"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">handle</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">pkt</span>,
<span class="sig-arg">raddress</span>,
<span class="sig-arg">rport</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateServerRecvRRQ.handle">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Handle an initial RRQ packet as a server.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpState-class.html#handle">TftpState.handle</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,250 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpStateServerRecvWRQ</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpStateServerRecvWRQ
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpStateServerRecvWRQ-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpStateServerRecvWRQ</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateServerRecvWRQ">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a> --+
|
<strong class="uidshort">TftpStateServerRecvWRQ</strong>
</pre>
<hr />
<p>This class represents the state of the TFTP server when it has just
received a WRQ packet.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpStateServerRecvWRQ-class.html#handle" class="summary-sig-name">handle</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">pkt</span>,
<span class="summary-sig-arg">raddress</span>,
<span class="summary-sig-arg">rport</span>)</span><br />
Handle an initial WRQ packet as a server.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateServerRecvWRQ.handle">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpState-class.html">TftpState</a></code></b>:
<code><a href="tftpy.TftpStates.TftpState-class.html#__init__">__init__</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleDat">handleDat</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleOACK">handleOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#returnSupportedOptions">returnSupportedOptions</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendACK">sendACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendDAT">sendDAT</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendError">sendError</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendOACK">sendOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#serverInitial">serverInitial</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="handle"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">handle</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">pkt</span>,
<span class="sig-arg">raddress</span>,
<span class="sig-arg">rport</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateServerRecvWRQ.handle">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Handle an initial WRQ packet as a server.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpState-class.html#handle">TftpState.handle</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,249 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy.TftpStates.TftpStateServerStart</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="tftpy-module.html">Package&nbsp;tftpy</a> ::
<a href="tftpy.TftpStates-module.html">Module&nbsp;TftpStates</a> ::
Class&nbsp;TftpStateServerStart
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="tftpy.TftpStates.TftpStateServerStart-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class TftpStateServerStart</h1><p class="nomargin-top"><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateServerStart">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="tftpy.TftpStates.TftpState-class.html">TftpState</a> --+
|
<strong class="uidshort">TftpStateServerStart</strong>
</pre>
<hr />
<p>The start state for the server.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="tftpy.TftpStates.TftpStateServerStart-class.html#handle" class="summary-sig-name">handle</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">pkt</span>,
<span class="summary-sig-arg">raddress</span>,
<span class="summary-sig-arg">rport</span>)</span><br />
Handle a packet we just received.</td>
<td align="right" valign="top">
<span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateServerStart.handle">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="tftpy.TftpStates.TftpState-class.html">TftpState</a></code></b>:
<code><a href="tftpy.TftpStates.TftpState-class.html#__init__">__init__</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleDat">handleDat</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#handleOACK">handleOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#returnSupportedOptions">returnSupportedOptions</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendACK">sendACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendDAT">sendDAT</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendError">sendError</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#sendOACK">sendOACK</a></code>,
<code><a href="tftpy.TftpStates.TftpState-class.html#serverInitial">serverInitial</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="handle"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">handle</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">pkt</span>,
<span class="sig-arg">raddress</span>,
<span class="sig-arg">rport</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="tftpy.TftpStates-pysrc.html#TftpStateServerStart.handle">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Handle a packet we just received.</p>
<dl class="fields">
<dt>Overrides:
<a href="tftpy.TftpStates.TftpState-class.html#handle">TftpState.handle</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="tftpy-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat Oct 24 00:10:21 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,99 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Everything</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<h1 class="toc">Everything</h1>
<hr />
<h2 class="toc">All Classes</h2>
<a target="mainFrame" href="tftpy.TftpClient%27.TftpClient-class.html"
>tftpy.TftpClient'.TftpClient</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html"
>tftpy.TftpPacketFactory'.TftpPacketFactory</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacket-class.html"
>tftpy.TftpPacketTypes.TftpPacket</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketACK-class.html"
>tftpy.TftpPacketTypes.TftpPacketACK</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html"
>tftpy.TftpPacketTypes.TftpPacketDAT</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketERR-class.html"
>tftpy.TftpPacketTypes.TftpPacketERR</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html"
>tftpy.TftpPacketTypes.TftpPacketInitial</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html"
>tftpy.TftpPacketTypes.TftpPacketOACK</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html"
>tftpy.TftpPacketTypes.TftpPacketRRQ</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html"
>tftpy.TftpPacketTypes.TftpPacketWRQ</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html"
>tftpy.TftpPacketTypes.TftpPacketWithOptions</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpSession-class.html"
>tftpy.TftpPacketTypes.TftpSession</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27.TftpServer-class.html"
>tftpy.TftpServer'.TftpServer</a><br /> <a target="mainFrame" href="tftpy.TftpShared.TftpErrors-class.html"
>tftpy.TftpShared.TftpErrors</a><br /> <a target="mainFrame" href="tftpy.TftpShared.TftpException-class.html"
>tftpy.TftpShared.TftpException</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpContext-class.html"
>tftpy.TftpStates.TftpContext</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpContextClientDownload-class.html"
>tftpy.TftpStates.TftpContextClientDownload</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpContextClientUpload-class.html"
>tftpy.TftpStates.TftpContextClientUpload</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpContextServer-class.html"
>tftpy.TftpStates.TftpContextServer</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpMetrics-class.html"
>tftpy.TftpStates.TftpMetrics</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpState-class.html"
>tftpy.TftpStates.TftpState</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateExpectACK-class.html"
>tftpy.TftpStates.TftpStateExpectACK</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateExpectDAT-class.html"
>tftpy.TftpStates.TftpStateExpectDAT</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateSentRRQ-class.html"
>tftpy.TftpStates.TftpStateSentRRQ</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateSentWRQ-class.html"
>tftpy.TftpStates.TftpStateSentWRQ</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateServerRecvRRQ-class.html"
>tftpy.TftpStates.TftpStateServerRecvRRQ</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateServerRecvWRQ-class.html"
>tftpy.TftpStates.TftpStateServerRecvWRQ</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateServerStart-class.html"
>tftpy.TftpStates.TftpStateServerStart</a><br /> <h2 class="toc">All Functions</h2>
<a target="mainFrame" href="tftpy.TftpShared-module.html#setLogLevel"
>tftpy.TftpShared.setLogLevel</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#tftpassert"
>tftpy.TftpShared.tftpassert</a><br /> <h2 class="toc">All Variables</h2>
<a target="mainFrame" href="tftpy.TftpClient%27-module.html#DEF_BLKSIZE"
>tftpy.TftpClient'.DEF_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#DEF_TFTP_PORT"
>tftpy.TftpClient'.DEF_TFTP_PORT</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#LOG_LEVEL"
>tftpy.TftpClient'.LOG_LEVEL</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#MAX_BLKSIZE"
>tftpy.TftpClient'.MAX_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#MAX_DUPS"
>tftpy.TftpClient'.MAX_DUPS</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#MIN_BLKSIZE"
>tftpy.TftpClient'.MIN_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#SOCK_TIMEOUT"
>tftpy.TftpClient'.SOCK_TIMEOUT</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#TIMEOUT_RETRIES"
>tftpy.TftpClient'.TIMEOUT_RETRIES</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#log"
>tftpy.TftpClient'.log</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#DEF_BLKSIZE"
>tftpy.TftpPacketFactory'.DEF_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#DEF_TFTP_PORT"
>tftpy.TftpPacketFactory'.DEF_TFTP_PORT</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#LOG_LEVEL"
>tftpy.TftpPacketFactory'.LOG_LEVEL</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#MAX_BLKSIZE"
>tftpy.TftpPacketFactory'.MAX_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#MAX_DUPS"
>tftpy.TftpPacketFactory'.MAX_DUPS</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#MIN_BLKSIZE"
>tftpy.TftpPacketFactory'.MIN_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#SOCK_TIMEOUT"
>tftpy.TftpPacketFactory'.SOCK_TIMEOUT</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#TIMEOUT_RETRIES"
>tftpy.TftpPacketFactory'.TIMEOUT_RETRIES</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#log"
>tftpy.TftpPacketFactory'.log</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#DEF_BLKSIZE"
>tftpy.TftpServer'.DEF_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#DEF_TFTP_PORT"
>tftpy.TftpServer'.DEF_TFTP_PORT</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#LOG_LEVEL"
>tftpy.TftpServer'.LOG_LEVEL</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#MAX_BLKSIZE"
>tftpy.TftpServer'.MAX_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#MAX_DUPS"
>tftpy.TftpServer'.MAX_DUPS</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#MIN_BLKSIZE"
>tftpy.TftpServer'.MIN_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#SOCK_TIMEOUT"
>tftpy.TftpServer'.SOCK_TIMEOUT</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#TIMEOUT_RETRIES"
>tftpy.TftpServer'.TIMEOUT_RETRIES</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#log"
>tftpy.TftpServer'.log</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#DEF_BLKSIZE"
>tftpy.TftpShared.DEF_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#DEF_TFTP_PORT"
>tftpy.TftpShared.DEF_TFTP_PORT</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#LOG_LEVEL"
>tftpy.TftpShared.LOG_LEVEL</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#MAX_BLKSIZE"
>tftpy.TftpShared.MAX_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#MAX_DUPS"
>tftpy.TftpShared.MAX_DUPS</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#MIN_BLKSIZE"
>tftpy.TftpShared.MIN_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#SOCK_TIMEOUT"
>tftpy.TftpShared.SOCK_TIMEOUT</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#TIMEOUT_RETRIES"
>tftpy.TftpShared.TIMEOUT_RETRIES</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#log"
>tftpy.TftpShared.log</a><br /> <a target="mainFrame" href="tftpy-module.html#verlist"
>tftpy.verlist</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tftpy</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<h1 class="toc">Module tftpy</h1>
<hr />
<h2 class="toc">Variables</h2>
<a target="mainFrame" href="tftpy-module.html#verlist"
>verlist</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>TftpClient'</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<h1 class="toc">Module TftpClient'</h1>
<hr />
<h2 class="toc">Classes</h2>
<a target="mainFrame" href="tftpy.TftpClient%27.TftpClient-class.html"
>TftpClient</a><br /> <h2 class="toc">Variables</h2>
<a target="mainFrame" href="tftpy.TftpClient%27-module.html#DEF_BLKSIZE"
>DEF_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#DEF_TFTP_PORT"
>DEF_TFTP_PORT</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#LOG_LEVEL"
>LOG_LEVEL</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#MAX_BLKSIZE"
>MAX_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#MAX_DUPS"
>MAX_DUPS</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#MIN_BLKSIZE"
>MIN_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#SOCK_TIMEOUT"
>SOCK_TIMEOUT</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#TIMEOUT_RETRIES"
>TIMEOUT_RETRIES</a><br /> <a target="mainFrame" href="tftpy.TftpClient%27-module.html#log"
>log</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>TftpPacketFactory'</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<h1 class="toc">Module TftpPacketFactory'</h1>
<hr />
<h2 class="toc">Classes</h2>
<a target="mainFrame" href="tftpy.TftpPacketFactory%27.TftpPacketFactory-class.html"
>TftpPacketFactory</a><br /> <h2 class="toc">Variables</h2>
<a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#DEF_BLKSIZE"
>DEF_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#DEF_TFTP_PORT"
>DEF_TFTP_PORT</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#LOG_LEVEL"
>LOG_LEVEL</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#MAX_BLKSIZE"
>MAX_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#MAX_DUPS"
>MAX_DUPS</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#MIN_BLKSIZE"
>MIN_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#SOCK_TIMEOUT"
>SOCK_TIMEOUT</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#TIMEOUT_RETRIES"
>TIMEOUT_RETRIES</a><br /> <a target="mainFrame" href="tftpy.TftpPacketFactory%27-module.html#log"
>log</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>TftpPacketTypes</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<h1 class="toc">Module TftpPacketTypes</h1>
<hr />
<h2 class="toc">Classes</h2>
<a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacket-class.html"
>TftpPacket</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketACK-class.html"
>TftpPacketACK</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketDAT-class.html"
>TftpPacketDAT</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketERR-class.html"
>TftpPacketERR</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketInitial-class.html"
>TftpPacketInitial</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketOACK-class.html"
>TftpPacketOACK</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketRRQ-class.html"
>TftpPacketRRQ</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketWRQ-class.html"
>TftpPacketWRQ</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpPacketWithOptions-class.html"
>TftpPacketWithOptions</a><br /> <a target="mainFrame" href="tftpy.TftpPacketTypes.TftpSession-class.html"
>TftpSession</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>TftpServer'</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<h1 class="toc">Module TftpServer'</h1>
<hr />
<h2 class="toc">Classes</h2>
<a target="mainFrame" href="tftpy.TftpServer%27.TftpServer-class.html"
>TftpServer</a><br /> <h2 class="toc">Variables</h2>
<a target="mainFrame" href="tftpy.TftpServer%27-module.html#DEF_BLKSIZE"
>DEF_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#DEF_TFTP_PORT"
>DEF_TFTP_PORT</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#LOG_LEVEL"
>LOG_LEVEL</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#MAX_BLKSIZE"
>MAX_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#MAX_DUPS"
>MAX_DUPS</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#MIN_BLKSIZE"
>MIN_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#SOCK_TIMEOUT"
>SOCK_TIMEOUT</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#TIMEOUT_RETRIES"
>TIMEOUT_RETRIES</a><br /> <a target="mainFrame" href="tftpy.TftpServer%27-module.html#log"
>log</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>TftpShared</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<h1 class="toc">Module TftpShared</h1>
<hr />
<h2 class="toc">Classes</h2>
<a target="mainFrame" href="tftpy.TftpShared.TftpErrors-class.html"
>TftpErrors</a><br /> <a target="mainFrame" href="tftpy.TftpShared.TftpException-class.html"
>TftpException</a><br /> <h2 class="toc">Functions</h2>
<a target="mainFrame" href="tftpy.TftpShared-module.html#setLogLevel"
>setLogLevel</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#tftpassert"
>tftpassert</a><br /> <h2 class="toc">Variables</h2>
<a target="mainFrame" href="tftpy.TftpShared-module.html#DEF_BLKSIZE"
>DEF_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#DEF_TFTP_PORT"
>DEF_TFTP_PORT</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#LOG_LEVEL"
>LOG_LEVEL</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#MAX_BLKSIZE"
>MAX_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#MAX_DUPS"
>MAX_DUPS</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#MIN_BLKSIZE"
>MIN_BLKSIZE</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#SOCK_TIMEOUT"
>SOCK_TIMEOUT</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#TIMEOUT_RETRIES"
>TIMEOUT_RETRIES</a><br /> <a target="mainFrame" href="tftpy.TftpShared-module.html#log"
>log</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>TftpStates</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<h1 class="toc">Module TftpStates</h1>
<hr />
<h2 class="toc">Classes</h2>
<a target="mainFrame" href="tftpy.TftpStates.TftpContext-class.html"
>TftpContext</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpContextClientDownload-class.html"
>TftpContextClientDownload</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpContextClientUpload-class.html"
>TftpContextClientUpload</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpContextServer-class.html"
>TftpContextServer</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpMetrics-class.html"
>TftpMetrics</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpState-class.html"
>TftpState</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateExpectACK-class.html"
>TftpStateExpectACK</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateExpectDAT-class.html"
>TftpStateExpectDAT</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateSentRRQ-class.html"
>TftpStateSentRRQ</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateSentWRQ-class.html"
>TftpStateSentWRQ</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateServerRecvRRQ-class.html"
>TftpStateServerRecvRRQ</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateServerRecvWRQ-class.html"
>TftpStateServerRecvWRQ</a><br /> <a target="mainFrame" href="tftpy.TftpStates.TftpStateServerStart-class.html"
>TftpStateServerStart</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>

View File

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Table of Contents</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<h1 class="toc">Table&nbsp;of&nbsp;Contents</h1>
<hr />
<a target="moduleFrame" href="toc-everything.html">Everything</a>
<br />
<h2 class="toc">Modules</h2>
<a target="moduleFrame" href="toc-tftpy-module.html"
onclick="setFrame('toc-tftpy-module.html','tftpy-module.html');" >tftpy</a><br /> <a target="moduleFrame" href="toc-tftpy.TftpClient%27-module.html"
onclick="setFrame('toc-tftpy.TftpClient%27-module.html','tftpy.TftpClient%27-module.html');" >tftpy.TftpClient'</a><br /> <a target="moduleFrame" href="toc-tftpy.TftpPacketFactory%27-module.html"
onclick="setFrame('toc-tftpy.TftpPacketFactory%27-module.html','tftpy.TftpPacketFactory%27-module.html');" >tftpy.TftpPacketFactory'</a><br /> <a target="moduleFrame" href="toc-tftpy.TftpPacketTypes-module.html"
onclick="setFrame('toc-tftpy.TftpPacketTypes-module.html','tftpy.TftpPacketTypes-module.html');" >tftpy.TftpPacketTypes</a><br /> <a target="moduleFrame" href="toc-tftpy.TftpServer%27-module.html"
onclick="setFrame('toc-tftpy.TftpServer%27-module.html','tftpy.TftpServer%27-module.html');" >tftpy.TftpServer'</a><br /> <a target="moduleFrame" href="toc-tftpy.TftpShared-module.html"
onclick="setFrame('toc-tftpy.TftpShared-module.html','tftpy.TftpShared-module.html');" >tftpy.TftpShared</a><br /> <a target="moduleFrame" href="toc-tftpy.TftpStates-module.html"
onclick="setFrame('toc-tftpy.TftpStates-module.html','tftpy.TftpStates-module.html');" >tftpy.TftpStates</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>