Commit e47be476 authored by Sam Rushing's avatar Sam Rushing

SSH_Transport.send(): helper for sending packets

parent 0d471126
...@@ -117,6 +117,9 @@ class SSH_Transport: ...@@ -117,6 +117,9 @@ class SSH_Transport:
else: else:
self.s2c = server_transport self.s2c = server_transport
self.supported_key_storages = [OpenSSH_Key_Storage()] self.supported_key_storages = [OpenSSH_Key_Storage()]
# XXX who/what sets self.is_server? can we use self.is_server
# to decide which callbacks to register? Or should that be done
# by the subclass?
self.register_callbacks('__base__', self.register_callbacks('__base__',
{SSH_MSG_IGNORE: self.msg_ignore, {SSH_MSG_IGNORE: self.msg_ignore,
SSH_MSG_DEBUG: self.msg_debug, SSH_MSG_DEBUG: self.msg_debug,
...@@ -192,6 +195,9 @@ class SSH_Transport: ...@@ -192,6 +195,9 @@ class SSH_Transport:
self.disconnect() self.disconnect()
raise SSH_Protocol_Error, (reason_code, description) raise SSH_Protocol_Error, (reason_code, description)
def send (self, format, values):
self.send_packet (ssh_packet.pack_payload (format, values))
def send_packet(self, data): def send_packet(self, data):
"""send_packet(self, data) -> None """send_packet(self, data) -> None
Sends the given packet data. Sends the given packet data.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment