A Channel created when a forwarded port at the remote side is connected. More...
Public Member Functions | |
void | run () |
Not for external use - the channel transfer loop. | |
int | getRemotePort () |
retrieves the local port at the remote side where this TCP connection came in. | |
void | connect () throws JSchException |
Opens the channel without any timeout. | |
Protected Attributes | |
byte[] | type = Util.str2byte("foo") |
Package Functions | |
ChannelForwardedTCPIP () | |
void | getData (Buffer buf) |
void | setSocketFactory (SocketFactory factory) |
synchronized void | setRecipient (int foo) |
int | getRecipient () |
void | init () throws JSchException |
Static Package Functions | |
static Object[] | getPort (Session session, int rport) |
static String[] | getPortForwarding (Session session) |
static String | normalize (String address) |
static void | addPort (Session session, String _address_to_bind, int port, String target, int lport, SocketFactory factory) throws JSchException |
static void | addPort (Session session, String _address_to_bind, int port, String daemon, Object[] arg) throws JSchException |
static void | delPort (ChannelForwardedTCPIP c) |
static void | delPort (Session session, int rport) |
static void | delPort (Session session, String address_to_bind, int rport) |
static void | delPort (Session session) |
static Channel | getChannel (String type) |
Creates a new Channel of specified type. | |
static Channel | getChannel (int id, Session session) |
Retrieves a channel from the channel pool. | |
static void | del (Channel c) |
Removes a channel from the channel pool. | |
Package Attributes | |
SocketFactory | factory = null |
String | target |
int | lport |
int | rport |
int | id |
volatile int | recipient = -1 |
volatile int | lwsize_max = 0x100000 |
volatile int | lwsize = lwsize_max |
volatile int | lmpsize = 0x4000 |
volatile long | rwsize = 0 |
volatile int | rmpsize = 0 |
IO | io = null |
Thread | thread = null |
volatile boolean | eof_local = false |
volatile boolean | eof_remote = false |
volatile boolean | close = false |
volatile boolean | connected = false |
volatile boolean | open_confirmation = false |
volatile int | exitstatus = -1 |
volatile int | reply = 0 |
volatile int | connectTimeout = 0 |
int | notifyme = 0 |
Static Package Attributes | |
static java.util.Vector | pool = new java.util.Vector() |
static final int | SSH_MSG_CHANNEL_OPEN_CONFIRMATION = 91 |
static final int | SSH_MSG_CHANNEL_OPEN_FAILURE = 92 |
static final int | SSH_MSG_CHANNEL_WINDOW_ADJUST = 93 |
static final int | SSH_OPEN_ADMINISTRATIVELY_PROHIBITED = 1 |
static final int | SSH_OPEN_CONNECT_FAILED = 2 |
static final int | SSH_OPEN_UNKNOWN_CHANNEL_TYPE = 3 |
static final int | SSH_OPEN_RESOURCE_SHORTAGE = 4 |
static int | index = 0 |
Private Attributes | |
Socket | socket = null |
ForwardedTCPIPDaemon | daemon = null |
Static Private Attributes | |
static final int | LOCAL_WINDOW_SIZE_MAX = 0x20000 |
static final int | LOCAL_MAXIMUM_PACKET_SIZE = 0x4000 |
static final int | TIMEOUT = 10*1000 |
A Channel created when a forwarded port at the remote side is connected.
This is used internally to forward remote ports to servers at the local side or to ForwardedTCPIPDaemon local daemons}.
Definition at line 46 of file ChannelForwardedTCPIP.java.
com.jcraft.jsch.ChannelForwardedTCPIP.ChannelForwardedTCPIP | ( | ) | [package] |
static void com.jcraft.jsch.ChannelForwardedTCPIP.addPort | ( | Session | session, | |
String | _address_to_bind, | |||
int | port, | |||
String | daemon, | |||
Object[] | arg | |||
) | throws JSchException [static, package] |
static void com.jcraft.jsch.ChannelForwardedTCPIP.addPort | ( | Session | session, | |
String | _address_to_bind, | |||
int | port, | |||
String | target, | |||
int | lport, | |||
SocketFactory | factory | |||
) | throws JSchException [static, package] |
Definition at line 222 of file ChannelForwardedTCPIP.java.
References com.jcraft.jsch.ChannelForwardedTCPIP.factory, com.jcraft.jsch.ChannelForwardedTCPIP.getPort(), com.jcraft.jsch.ChannelForwardedTCPIP.lport, com.jcraft.jsch.ChannelForwardedTCPIP.normalize(), com.jcraft.jsch.ChannelForwardedTCPIP.pool, com.jcraft.jsch.Channel.session, and com.jcraft.jsch.ChannelForwardedTCPIP.target.
void com.jcraft.jsch.Channel.connect | ( | ) | throws JSchException [inherited] |
Opens the channel without any timeout.
This is equivalent to connect(0) if not overridden in subclasses.
Reimplemented in com.jcraft.jsch.ChannelDirectTCPIP.
Definition at line 174 of file Channel.java.
Referenced by edu.rice.cs.hpc.remote.tunnel.SSHManager.sendCommand().
static void com.jcraft.jsch.Channel.del | ( | Channel | c | ) | [static, package, inherited] |
Removes a channel from the channel pool.
Definition at line 116 of file Channel.java.
References com.jcraft.jsch.Channel.pool.
static void com.jcraft.jsch.ChannelForwardedTCPIP.delPort | ( | Session | session | ) | [static, package] |
Definition at line 304 of file ChannelForwardedTCPIP.java.
References com.jcraft.jsch.ChannelForwardedTCPIP.delPort(), com.jcraft.jsch.ChannelForwardedTCPIP.pool, and com.jcraft.jsch.ChannelForwardedTCPIP.rport.
static void com.jcraft.jsch.ChannelForwardedTCPIP.delPort | ( | Session | session, | |
String | address_to_bind, | |||
int | rport | |||
) | [static, package] |
Definition at line 263 of file ChannelForwardedTCPIP.java.
References com.jcraft.jsch.ChannelForwardedTCPIP.pool, com.jcraft.jsch.Buffer.putByte(), and com.jcraft.jsch.Packet.reset().
static void com.jcraft.jsch.ChannelForwardedTCPIP.delPort | ( | Session | session, | |
int | rport | |||
) | [static, package] |
Definition at line 260 of file ChannelForwardedTCPIP.java.
References com.jcraft.jsch.ChannelForwardedTCPIP.delPort().
static void com.jcraft.jsch.ChannelForwardedTCPIP.delPort | ( | ChannelForwardedTCPIP | c | ) | [static, package] |
Definition at line 249 of file ChannelForwardedTCPIP.java.
References com.jcraft.jsch.ChannelForwardedTCPIP.rport.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.delPort().
static Channel com.jcraft.jsch.Channel.getChannel | ( | int | id, | |
Session | session | |||
) | [static, package, inherited] |
Retrieves a channel from the channel pool.
id | the session-specific identifier of the channel | |
session | the session with which the channel is associated. |
Definition at line 103 of file Channel.java.
References com.jcraft.jsch.Channel.id, com.jcraft.jsch.Channel.pool, and com.jcraft.jsch.Channel.session.
static Channel com.jcraft.jsch.Channel.getChannel | ( | String | type | ) | [static, package, inherited] |
Creates a new Channel of specified type.
This factory method is used by Session#openChannel to create channels.
Definition at line 67 of file Channel.java.
void com.jcraft.jsch.ChannelForwardedTCPIP.getData | ( | Buffer | buf | ) | [package] |
Definition at line 143 of file ChannelForwardedTCPIP.java.
References com.jcraft.jsch.ChannelForwardedTCPIP.factory, com.jcraft.jsch.ChannelForwardedTCPIP.lport, com.jcraft.jsch.ChannelForwardedTCPIP.pool, com.jcraft.jsch.ChannelForwardedTCPIP.rport, com.jcraft.jsch.Channel.setRecipient(), and com.jcraft.jsch.ChannelForwardedTCPIP.target.
static Object [] com.jcraft.jsch.ChannelForwardedTCPIP.getPort | ( | Session | session, | |
int | rport | |||
) | [static, package] |
Definition at line 187 of file ChannelForwardedTCPIP.java.
References com.jcraft.jsch.ChannelForwardedTCPIP.pool.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.addPort(), and com.jcraft.jsch.ChannelForwardedTCPIP.run().
static String [] com.jcraft.jsch.ChannelForwardedTCPIP.getPortForwarding | ( | Session | session | ) | [static, package] |
Definition at line 199 of file ChannelForwardedTCPIP.java.
References com.jcraft.jsch.ChannelForwardedTCPIP.pool.
int com.jcraft.jsch.Channel.getRecipient | ( | ) | [package, inherited] |
Definition at line 162 of file Channel.java.
References com.jcraft.jsch.Channel.recipient.
Referenced by com.jcraft.jsch.ChannelDirectTCPIP.connect(), com.jcraft.jsch.RequestX11.request(), com.jcraft.jsch.RequestWindowChange.request(), com.jcraft.jsch.RequestSubsystem.request(), com.jcraft.jsch.RequestSignal.request(), com.jcraft.jsch.RequestShell.request(), com.jcraft.jsch.RequestSftp.request(), com.jcraft.jsch.RequestPtyReq.request(), com.jcraft.jsch.RequestExec.request(), com.jcraft.jsch.RequestEnv.request(), and com.jcraft.jsch.RequestAgentForwarding.request().
int com.jcraft.jsch.ChannelForwardedTCPIP.getRemotePort | ( | ) |
retrieves the local port at the remote side where this TCP connection came in.
Definition at line 325 of file ChannelForwardedTCPIP.java.
References com.jcraft.jsch.ChannelForwardedTCPIP.rport.
void com.jcraft.jsch.Channel.init | ( | ) | throws JSchException [package, inherited] |
Reimplemented in com.jcraft.jsch.ChannelDirectTCPIP, com.jcraft.jsch.ChannelExec, com.jcraft.jsch.ChannelShell, and com.jcraft.jsch.ChannelSubsystem.
Definition at line 166 of file Channel.java.
Referenced by com.jcraft.jsch.ChannelX11.write().
static String com.jcraft.jsch.ChannelForwardedTCPIP.normalize | ( | String | address | ) | [static, package] |
Definition at line 216 of file ChannelForwardedTCPIP.java.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.addPort().
void com.jcraft.jsch.ChannelForwardedTCPIP.run | ( | ) |
Not for external use - the channel transfer loop.
Definition at line 75 of file ChannelForwardedTCPIP.java.
References com.jcraft.jsch.Buffer.buffer, com.jcraft.jsch.Channel.close, com.jcraft.jsch.SocketFactory.createSocket(), com.jcraft.jsch.ChannelForwardedTCPIP.daemon, com.jcraft.jsch.ChannelForwardedTCPIP.factory, com.jcraft.jsch.ChannelForwardedTCPIP.getPort(), com.jcraft.jsch.IO.in, com.jcraft.jsch.Channel.io, com.jcraft.jsch.ChannelForwardedTCPIP.lport, com.jcraft.jsch.Buffer.putByte(), com.jcraft.jsch.Channel.recipient, com.jcraft.jsch.Packet.reset(), com.jcraft.jsch.Channel.rmpsize, com.jcraft.jsch.ChannelForwardedTCPIP.rport, com.jcraft.jsch.ForwardedTCPIPDaemon.setArg(), com.jcraft.jsch.ForwardedTCPIPDaemon.setChannel(), com.jcraft.jsch.IO.setInputStream(), com.jcraft.jsch.IO.setOutputStream(), com.jcraft.jsch.ChannelForwardedTCPIP.socket, com.jcraft.jsch.Channel.SSH_OPEN_ADMINISTRATIVELY_PROHIBITED, com.jcraft.jsch.ChannelForwardedTCPIP.target, com.jcraft.jsch.Channel.thread, and com.jcraft.jsch.ChannelForwardedTCPIP.TIMEOUT.
synchronized void com.jcraft.jsch.Channel.setRecipient | ( | int | foo | ) | [package, inherited] |
Definition at line 157 of file Channel.java.
References com.jcraft.jsch.Channel.notifyme, and com.jcraft.jsch.Channel.recipient.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.getData().
void com.jcraft.jsch.ChannelForwardedTCPIP.setSocketFactory | ( | SocketFactory | factory | ) | [package] |
Definition at line 326 of file ChannelForwardedTCPIP.java.
volatile boolean com.jcraft.jsch.Channel.close = false [package, inherited] |
Definition at line 138 of file Channel.java.
Referenced by com.jcraft.jsch.ChannelX11.run(), com.jcraft.jsch.ChannelSession.run(), com.jcraft.jsch.ChannelForwardedTCPIP.run(), com.jcraft.jsch.ChannelDirectTCPIP.run(), and com.jcraft.jsch.ChannelAgentForwarding.run().
volatile boolean com.jcraft.jsch.Channel.connected = false [package, inherited] |
volatile int com.jcraft.jsch.Channel.connectTimeout = 0 [package, inherited] |
Definition at line 145 of file Channel.java.
Referenced by com.jcraft.jsch.ChannelDirectTCPIP.connect(), com.jcraft.jsch.Request.request(), and com.jcraft.jsch.Request.write().
ForwardedTCPIPDaemon com.jcraft.jsch.ChannelForwardedTCPIP.daemon = null [private] |
Definition at line 58 of file ChannelForwardedTCPIP.java.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.addPort(), and com.jcraft.jsch.ChannelForwardedTCPIP.run().
volatile boolean com.jcraft.jsch.Channel.eof_local = false [package, inherited] |
Definition at line 135 of file Channel.java.
volatile boolean com.jcraft.jsch.Channel.eof_remote = false [package, inherited] |
Definition at line 136 of file Channel.java.
volatile int com.jcraft.jsch.Channel.exitstatus = -1 [package, inherited] |
Definition at line 142 of file Channel.java.
Referenced by com.jcraft.jsch.PortWatcher.run().
SocketFactory com.jcraft.jsch.ChannelForwardedTCPIP.factory = null [package] |
Definition at line 56 of file ChannelForwardedTCPIP.java.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.addPort(), com.jcraft.jsch.ChannelForwardedTCPIP.getData(), and com.jcraft.jsch.ChannelForwardedTCPIP.run().
int com.jcraft.jsch.Channel.id [package, inherited] |
Definition at line 122 of file Channel.java.
Referenced by com.jcraft.jsch.Channel.getChannel().
int com.jcraft.jsch.Channel.index = 0 [static, package, inherited] |
Definition at line 60 of file Channel.java.
Referenced by com.jcraft.jsch.Channel.Channel().
IO com.jcraft.jsch.Channel.io = null [package, inherited] |
Definition at line 132 of file Channel.java.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.ChannelForwardedTCPIP(), com.jcraft.jsch.ChannelSession.ChannelSession(), com.jcraft.jsch.ChannelDirectTCPIP.connect(), com.jcraft.jsch.ChannelSubsystem.init(), com.jcraft.jsch.ChannelShell.init(), com.jcraft.jsch.ChannelExec.init(), com.jcraft.jsch.ChannelDirectTCPIP.init(), com.jcraft.jsch.ChannelX11.run(), com.jcraft.jsch.ChannelSession.run(), com.jcraft.jsch.ChannelForwardedTCPIP.run(), com.jcraft.jsch.ChannelDirectTCPIP.run(), com.jcraft.jsch.ChannelDirectTCPIP.setInputStream(), com.jcraft.jsch.ChannelDirectTCPIP.setOutputStream(), com.jcraft.jsch.ChannelSubsystem.start(), com.jcraft.jsch.ChannelShell.start(), com.jcraft.jsch.ChannelExec.start(), and com.jcraft.jsch.ChannelX11.write().
volatile int com.jcraft.jsch.Channel.lmpsize = 0x4000 [package, inherited] |
Definition at line 127 of file Channel.java.
Referenced by com.jcraft.jsch.ChannelDirectTCPIP.connect().
final int com.jcraft.jsch.ChannelForwardedTCPIP.LOCAL_MAXIMUM_PACKET_SIZE = 0x4000 [static, private] |
Definition at line 52 of file ChannelForwardedTCPIP.java.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.ChannelForwardedTCPIP().
final int com.jcraft.jsch.ChannelForwardedTCPIP.LOCAL_WINDOW_SIZE_MAX = 0x20000 [static, private] |
Definition at line 50 of file ChannelForwardedTCPIP.java.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.ChannelForwardedTCPIP().
int com.jcraft.jsch.ChannelForwardedTCPIP.lport [package] |
Definition at line 60 of file ChannelForwardedTCPIP.java.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.addPort(), com.jcraft.jsch.ChannelForwardedTCPIP.getData(), and com.jcraft.jsch.ChannelForwardedTCPIP.run().
volatile int com.jcraft.jsch.Channel.lwsize = lwsize_max [package, inherited] |
Definition at line 126 of file Channel.java.
Referenced by com.jcraft.jsch.ChannelDirectTCPIP.connect().
volatile int com.jcraft.jsch.Channel.lwsize_max = 0x100000 [package, inherited] |
Definition at line 125 of file Channel.java.
int com.jcraft.jsch.Channel.notifyme = 0 [package, inherited] |
Definition at line 149 of file Channel.java.
Referenced by com.jcraft.jsch.ChannelDirectTCPIP.connect(), and com.jcraft.jsch.Channel.setRecipient().
volatile boolean com.jcraft.jsch.Channel.open_confirmation = false [package, inherited] |
Definition at line 140 of file Channel.java.
Referenced by com.jcraft.jsch.ChannelDirectTCPIP.connect().
java.util.Vector com.jcraft.jsch.ChannelForwardedTCPIP.pool = new java.util.Vector() [static, package] |
Reimplemented from com.jcraft.jsch.Channel.
Definition at line 48 of file ChannelForwardedTCPIP.java.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.addPort(), com.jcraft.jsch.ChannelForwardedTCPIP.delPort(), com.jcraft.jsch.ChannelForwardedTCPIP.getData(), com.jcraft.jsch.ChannelForwardedTCPIP.getPort(), and com.jcraft.jsch.ChannelForwardedTCPIP.getPortForwarding().
volatile int com.jcraft.jsch.Channel.recipient = -1 [package, inherited] |
Definition at line 123 of file Channel.java.
Referenced by com.jcraft.jsch.Channel.getRecipient(), com.jcraft.jsch.ChannelX11.run(), com.jcraft.jsch.ChannelSession.run(), com.jcraft.jsch.ChannelForwardedTCPIP.run(), com.jcraft.jsch.ChannelDirectTCPIP.run(), com.jcraft.jsch.ChannelAgentForwarding.send(), and com.jcraft.jsch.Channel.setRecipient().
volatile int com.jcraft.jsch.Channel.reply = 0 [package, inherited] |
Definition at line 144 of file Channel.java.
Referenced by com.jcraft.jsch.Request.write().
volatile int com.jcraft.jsch.Channel.rmpsize = 0 [package, inherited] |
Definition at line 130 of file Channel.java.
Referenced by com.jcraft.jsch.ChannelX11.run(), com.jcraft.jsch.ChannelSession.run(), com.jcraft.jsch.ChannelForwardedTCPIP.run(), com.jcraft.jsch.ChannelDirectTCPIP.run(), and com.jcraft.jsch.ChannelAgentForwarding.write().
int com.jcraft.jsch.ChannelForwardedTCPIP.rport [package] |
Definition at line 61 of file ChannelForwardedTCPIP.java.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.delPort(), com.jcraft.jsch.ChannelForwardedTCPIP.getData(), com.jcraft.jsch.ChannelForwardedTCPIP.getRemotePort(), and com.jcraft.jsch.ChannelForwardedTCPIP.run().
volatile long com.jcraft.jsch.Channel.rwsize = 0 [package, inherited] |
Definition at line 129 of file Channel.java.
Socket com.jcraft.jsch.ChannelForwardedTCPIP.socket = null [private] |
Definition at line 57 of file ChannelForwardedTCPIP.java.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.run().
final int com.jcraft.jsch.Channel.SSH_MSG_CHANNEL_OPEN_CONFIRMATION = 91 [static, package, inherited] |
Definition at line 51 of file Channel.java.
final int com.jcraft.jsch.Channel.SSH_MSG_CHANNEL_OPEN_FAILURE = 92 [static, package, inherited] |
Definition at line 52 of file Channel.java.
final int com.jcraft.jsch.Channel.SSH_MSG_CHANNEL_WINDOW_ADJUST = 93 [static, package, inherited] |
Definition at line 53 of file Channel.java.
final int com.jcraft.jsch.Channel.SSH_OPEN_ADMINISTRATIVELY_PROHIBITED = 1 [static, package, inherited] |
Definition at line 55 of file Channel.java.
Referenced by com.jcraft.jsch.ChannelX11.run(), and com.jcraft.jsch.ChannelForwardedTCPIP.run().
final int com.jcraft.jsch.Channel.SSH_OPEN_CONNECT_FAILED = 2 [static, package, inherited] |
Definition at line 56 of file Channel.java.
final int com.jcraft.jsch.Channel.SSH_OPEN_RESOURCE_SHORTAGE = 4 [static, package, inherited] |
Definition at line 58 of file Channel.java.
final int com.jcraft.jsch.Channel.SSH_OPEN_UNKNOWN_CHANNEL_TYPE = 3 [static, package, inherited] |
Definition at line 57 of file Channel.java.
String com.jcraft.jsch.ChannelForwardedTCPIP.target [package] |
Definition at line 59 of file ChannelForwardedTCPIP.java.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.addPort(), com.jcraft.jsch.ChannelForwardedTCPIP.getData(), and com.jcraft.jsch.ChannelForwardedTCPIP.run().
Thread com.jcraft.jsch.Channel.thread = null [package, inherited] |
Definition at line 133 of file Channel.java.
Referenced by com.jcraft.jsch.ChannelDirectTCPIP.connect(), com.jcraft.jsch.ChannelX11.run(), com.jcraft.jsch.ChannelSession.run(), com.jcraft.jsch.ChannelForwardedTCPIP.run(), com.jcraft.jsch.ChannelDirectTCPIP.run(), com.jcraft.jsch.ChannelSubsystem.start(), com.jcraft.jsch.ChannelShell.start(), com.jcraft.jsch.ChannelExec.start(), and com.jcraft.jsch.ChannelX11.write().
final int com.jcraft.jsch.ChannelForwardedTCPIP.TIMEOUT = 10*1000 [static, private] |
Definition at line 54 of file ChannelForwardedTCPIP.java.
Referenced by com.jcraft.jsch.ChannelForwardedTCPIP.run().
byte [] com.jcraft.jsch.Channel.type = Util.str2byte("foo") [protected, inherited] |
Definition at line 124 of file Channel.java.
Referenced by com.jcraft.jsch.ChannelAgentForwarding.ChannelAgentForwarding(), com.jcraft.jsch.ChannelSession.ChannelSession(), and com.jcraft.jsch.ChannelX11.ChannelX11().