summaryrefslogtreecommitdiff
path: root/src/libs/ssh/sshoutgoingpacket.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2012-06-19 13:03:48 +0200
committerChristian Kandeler <christian.kandeler@nokia.com>2012-08-28 15:12:04 +0200
commitedcf76613b82d4b04ad9d0797515dc42d983eb68 (patch)
tree5229324612e8489ebe70e304641ea0781893dfdd /src/libs/ssh/sshoutgoingpacket.cpp
parenta57b4cf93efcb3fe30623566115b29e925367f7f (diff)
downloadqt-creator-edcf76613b82d4b04ad9d0797515dc42d983eb68.tar.gz
SSH: Implement tunneling.
This is the "direct-tcpip" port forwarding specified in RFC 4254. Change-Id: I1ffa2e923b4479c7211b1b4304e66895b565fb64 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Diffstat (limited to 'src/libs/ssh/sshoutgoingpacket.cpp')
-rw-r--r--src/libs/ssh/sshoutgoingpacket.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libs/ssh/sshoutgoingpacket.cpp b/src/libs/ssh/sshoutgoingpacket.cpp
index 97b199beed..1be0aa4934 100644
--- a/src/libs/ssh/sshoutgoingpacket.cpp
+++ b/src/libs/ssh/sshoutgoingpacket.cpp
@@ -143,7 +143,16 @@ void SshOutgoingPacket::generateSessionPacket(quint32 channelId,
quint32 windowSize, quint32 maxPacketSize)
{
init(SSH_MSG_CHANNEL_OPEN).appendString("session").appendInt(channelId)
- .appendInt(windowSize).appendInt(maxPacketSize).finalize();
+ .appendInt(windowSize).appendInt(maxPacketSize).finalize();
+}
+
+void SshOutgoingPacket::generateDirectTcpIpPacket(quint32 channelId, quint32 windowSize,
+ quint32 maxPacketSize, const QByteArray &remoteHost, quint32 remotePort,
+ const QByteArray &localIpAddress, quint32 localPort)
+{
+ init(SSH_MSG_CHANNEL_OPEN).appendString("direct-tcpip").appendInt(channelId)
+ .appendInt(windowSize).appendInt(maxPacketSize).appendString(remoteHost)
+ .appendInt(remotePort).appendString(localIpAddress).appendInt(localPort).finalize();
}
void SshOutgoingPacket::generateEnvPacket(quint32 remoteChannel,