Trees | Index | Help |
|
---|
Package DataCollector :: Module TelnetClient :: Class TelnetClientProtocol |
|
BaseProtocol
--+ |Protocol
--+ |Telnet
--+ | TelnetClientProtocol
Method Summary | |
---|---|
Called with application-level data. | |
cancelTimeout(self)
| |
Called when a connection is made. | |
curCommand(self)
| |
Called whenever data is received. | |
defaultTimeout(self)
| |
iac_DO(self,
feature)
| |
iac_DONT(self,
feature)
| |
iac_WILL(self,
feature)
| |
iac_WONT(self,
feature)
| |
loginTimeout(self,
loginTries)
| |
processChunk(self,
chunk)
| |
I call a method that looks like 'telnet_*' where '*' is filled in by the current mode. | |
startTimeout(self,
timeout,
timeoutfunc)
| |
telnet_ClearPromptData(self,
data)
| |
process the data from a sent command if there are no more commands move to final state | |
change to enable mode on cisco | |
Called after login to figure out the command prompt | |
Called when login prompt is received | |
Called when the password prompt is received | |
Get a command of the command stack and send it | |
save the last bit of data that we wrote | |
_iac_responce(self,
action,
feature)
| |
Inherited from Telnet :
__init__ ,
commandReceived ,
connectionLost ,
disableLocal ,
disableRemote ,
do ,
do_no_false ,
do_no_true ,
do_yes_false ,
do_yes_true ,
dont ,
dont_no_false ,
dont_no_true ,
dont_yes_false ,
dont_yes_true ,
enableLocal ,
enableRemote ,
getOptionState ,
negotiate ,
requestNegotiation ,
telnet_DO ,
telnet_DONT ,
telnet_WILL ,
telnet_WONT ,
unhandledCommand ,
unhandledSubnegotiation ,
will ,
will_no_false ,
will_no_true ,
will_yes_false ,
will_yes_true ,
wont ,
wont_no_false ,
wont_no_true ,
wont_yes_false ,
wont_yes_true ,
_do ,
_dont ,
_will ,
_wont ,
_write
Inherited from BaseProtocol :
makeConnection
|
Instance Variable Summary | |
---|---|
Inherited from Telnet :
commandMap ,
negotiationMap ,
options ,
state ,
transport
|
Class Variable Summary | |
---|---|
str |
buffer = ''
|
str |
bytes = ''
|
str |
command = ''
|
str |
commandPrompt = ''
|
int |
enabled = -1 |
str |
lastwrite = ''
|
str |
mode = 'Login'
|
str |
p1 = ''
|
str |
p2 = ''
|
str |
result = ''
|
NoneType |
scCallLater = None |
int |
timeout = 0 |
NoneType |
timeoutID = None |
Inherited from Telnet :
doMap ,
dontMap ,
willMap ,
wontMap
Inherited from Protocol :
__implemented__ ,
__provides__
Inherited from BaseProtocol :
__providedBy__ ,
connected
|
Method Details |
---|
applicationDataReceived(self, bytes)Called with application-level data.
|
connectionMade(self)Called when a connection is made. This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.
|
dataReceived(self, data)Called whenever data is received. Use this method to translate to a higher-level message. Usually, some callback will be made upon the receipt of each complete protocol message.
|
processLine(self, line)I call a method that looks like 'telnet_*' where '*' is filled in by the current mode. telnet_* methods should return a string which will become the new mode. |
telnet_Command(self, data)process the data from a sent command if there are no more commands move to final state |
telnet_Enable(self, data)change to enable mode on cisco |
telnet_FindPrompt(self, data)Called after login to figure out the command prompt |
telnet_Login(self, data)Called when login prompt is received |
telnet_Password(self, data)Called when the password prompt is received |
telnet_SendCommand(self, data)Get a command of the command stack and send it |
write(self, data)save the last bit of data that we wrote |
Class Variable Details |
---|
buffer
|
bytes
|
command
|
commandPrompt
|
enabled
|
lastwrite
|
mode
|
p1
|
p2
|
result
|
scCallLater
|
timeout
|
timeoutID
|
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Aug 16 09:55:12 2007 | http://epydoc.sf.net |