diff options
author | Christian Kandeler <[email protected]> | 2012-06-19 13:03:48 +0200 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2012-08-28 15:12:04 +0200 |
commit | edcf76613b82d4b04ad9d0797515dc42d983eb68 (patch) | |
tree | 5229324612e8489ebe70e304641ea0781893dfdd /src/libs/ssh/sshoutgoingpacket.cpp | |
parent | a57b4cf93efcb3fe30623566115b29e925367f7f (diff) |
SSH: Implement tunneling.
This is the "direct-tcpip" port forwarding
specified in RFC 4254.
Change-Id: I1ffa2e923b4479c7211b1b4304e66895b565fb64
Reviewed-by: hjk <[email protected]>
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/libs/ssh/sshoutgoingpacket.cpp')
-rw-r--r-- | src/libs/ssh/sshoutgoingpacket.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libs/ssh/sshoutgoingpacket.cpp b/src/libs/ssh/sshoutgoingpacket.cpp index 97b199beed0..1be0aa49343 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, |