Updated epydoc output for website.

master
Michael P. Soulier 2009-10-24 00:13:23 -04:00
parent a80639c7e2
commit badf18f2a4
64 changed files with 16319 additions and 6 deletions

View File

@ -1,7 +1,7 @@
PY=/usr/bin/env python
PYTHONPATH=.
all: test sdist tftpy-doc.tar.gz
all: test sdist
sdist:
PYTHONPATH=$(PYTHONPATH) $(PY) setup.py sdist
@ -9,14 +9,13 @@ sdist:
test:
PYTHONPATH=$(PYTHONPATH) $(PY) t/test.py
doc: apidocs
apidocs: tftpy-doc
tftpy-doc:
PYTHONPATH=$(PYTHONPATH) epydoc --html -o tftpy-doc tftpy
tftpy-doc.tar.gz: tftpy-doc
-mkdir dist
tar -zcvf dist/tftpy-doc.tar.gz tftpy-doc
rm -rf html/tftpy-doc
PYTHONPATH=$(PYTHONPATH) epydoc --html -o html/tftpy-doc tftpy
clean:
rm -rf dist src tftpy-doc* MANIFEST

View File

@ -19,6 +19,7 @@
<li><a href="#plans">Future Plans</a></li>
<li><a href="#code">The Code</a></li>
<li><a href="#support">Support</a></li>
<li><a href="#doc">Documentation</a></li>
</ul>
</div>
<div class="content">
@ -116,6 +117,12 @@
me</a> with any questions, or contact me through github. I'm also
"msoulier" in <a href="http://identi.ca">identi.ca</a>.</p>
<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.</p>
<hr />
<p>Last updated: April 8, 2009.</p>

View File

@ -0,0 +1,272 @@
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

@ -0,0 +1,245 @@
<?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>

BIN
html/tftpy-doc/crarr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

322
html/tftpy-doc/epydoc.css Normal file
View File

@ -0,0 +1,322 @@
/* 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; }

293
html/tftpy-doc/epydoc.js Normal file
View File

@ -0,0 +1,293 @@
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

@ -0,0 +1,17 @@
<?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>

268
html/tftpy-doc/help.html Normal file
View File

@ -0,0 +1,268 @@
<?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

@ -0,0 +1,711 @@
<?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>

17
html/tftpy-doc/index.html Normal file
View File

@ -0,0 +1,17 @@
<?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

@ -0,0 +1,117 @@
<?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

@ -0,0 +1,38 @@
<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

@ -0,0 +1,165 @@
<?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

@ -0,0 +1,128 @@
<?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

@ -0,0 +1,211 @@
<?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

@ -0,0 +1,297 @@
<?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

@ -0,0 +1,314 @@
<?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

@ -0,0 +1,211 @@
<?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

@ -0,0 +1,159 @@
<?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

@ -0,0 +1,295 @@
<?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

@ -0,0 +1,210 @@
<?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

@ -0,0 +1,833 @@
<?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

@ -0,0 +1,325 @@
<?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

@ -0,0 +1,375 @@
<?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

@ -0,0 +1,363 @@
<?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

@ -0,0 +1,376 @@
<?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

@ -0,0 +1,340 @@
<?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

@ -0,0 +1,424 @@
<?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

@ -0,0 +1,301 @@
<?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

@ -0,0 +1,301 @@
<?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

@ -0,0 +1,359 @@
<?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

@ -0,0 +1,180 @@
<?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

@ -0,0 +1,211 @@
<?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

@ -0,0 +1,377 @@
<?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

@ -0,0 +1,284 @@
<?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

@ -0,0 +1,339 @@
<?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

@ -0,0 +1,197 @@
<?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

@ -0,0 +1,255 @@
<?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

@ -0,0 +1,189 @@
<?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

@ -0,0 +1,229 @@
<?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

@ -0,0 +1,455 @@
<?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

@ -0,0 +1,339 @@
<?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

@ -0,0 +1,338 @@
<?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

@ -0,0 +1,339 @@
<?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

@ -0,0 +1,267 @@
<?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

@ -0,0 +1,508 @@
<?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

@ -0,0 +1,252 @@
<?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

@ -0,0 +1,249 @@
<?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

@ -0,0 +1,249 @@
<?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

@ -0,0 +1,249 @@
<?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

@ -0,0 +1,250 @@
<?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

@ -0,0 +1,250 @@
<?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

@ -0,0 +1,249 @@
<?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

@ -0,0 +1,99 @@
<?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

@ -0,0 +1,31 @@
<?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

@ -0,0 +1,41 @@
<?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

@ -0,0 +1,41 @@
<?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

@ -0,0 +1,40 @@
<?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

@ -0,0 +1,41 @@
<?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

@ -0,0 +1,45 @@
<?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

@ -0,0 +1,43 @@
<?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>

39
html/tftpy-doc/toc.html Normal file
View File

@ -0,0 +1,39 @@
<?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>