com.mindbright.ssh
Class SSHChannelController
java.lang.Object
com.mindbright.ssh.SSH
com.mindbright.ssh.SSHChannelController
- All Implemented Interfaces:
- NQueueCallback, SSHChannelListener
public final class SSHChannelController
- extends SSH
- implements SSHChannelListener, NQueueCallback
Fields inherited from class com.mindbright.ssh.SSH |
AUTH_CRYPTOCARD, AUTH_DEFAULT, AUTH_GSSAPI, AUTH_HOSTBASED, AUTH_KBDINTERACT, AUTH_KERBEROS, AUTH_NOTSUPPORTED, AUTH_PASSWORD, AUTH_PUBLICKEY, AUTH_RHOSTS, AUTH_RHOSTS_RSA, AUTH_SDI, AUTH_TIS, authTypeDesc, CIPHER_3DES, CIPHER_ANY, CIPHER_BLOWFISH, CIPHER_DEFAULT, CIPHER_DES, CIPHER_IDEA, CIPHER_INVALID, CIPHER_NONE, CIPHER_NOTSUPPORTED, CIPHER_RC4, CIPHER_RESERVED, CIPHER_TSS, cipherClasses, cipherType, CMSG_ACM_ACCESS_DENIED, CMSG_ACM_NEW_PIN, CMSG_ACM_NEW_PIN_ACCEPTED, CMSG_ACM_NEW_PIN_REJECTED, CMSG_ACM_NEW_PIN_REQUIRED, CMSG_ACM_NEXT_CODE, CMSG_ACM_NEXT_CODE_REQUIRED, CMSG_ACM_OK, CMSG_AGENT_REQUEST_FORWARDING, CMSG_AUTH_PASSWORD, CMSG_AUTH_RHOSTS, CMSG_AUTH_RHOSTS_RSA, CMSG_AUTH_RSA, CMSG_AUTH_RSA_RESPONSE, CMSG_AUTH_SDI, CMSG_AUTH_TIS, CMSG_AUTH_TIS_RESPONSE, CMSG_EOF, CMSG_EXEC_CMD, CMSG_EXEC_SHELL, CMSG_EXIT_CONFIRMATION, CMSG_MAX_PACKET_SIZE, CMSG_PORT_FORWARD_REQUEST, CMSG_REQUEST_COMPRESSION, CMSG_REQUEST_PTY, CMSG_SESSION_KEY, CMSG_STDIN_DATA, CMSG_USER, CMSG_WINDOW_SIZE, CMSG_X11_REQUEST_FORWARDING, CONNECT_CHAN_NUM, DEBUG, DEBUGMORE, DEBUGPKG, DEFAULTPORT, HOST_KEY_LENGTH, IDX_CIPHER_CLASS, IDX_CIPHER_NAME, isAnSSHClient, KNOWN_HOSTS_FILE, LISTEN_CHAN_NUM, MAIN_CHAN_NUM, MSG_ANY, MSG_CHANNEL_CLOSE, MSG_CHANNEL_CLOSE_CONFIRMATION, MSG_CHANNEL_DATA, MSG_CHANNEL_INPUT_EOF, MSG_CHANNEL_OPEN_CONFIRMATION, MSG_CHANNEL_OPEN_FAILURE, MSG_CHANNEL_OUTPUT_CLOSED, MSG_DEBUG, MSG_DISCONNECT, MSG_IGNORE, MSG_NONE, MSG_PORT_OPEN, PASS_KERBEROS_TGT, protocolFlags, PROTOFLAG_HOST_IN_FWD_OPEN, PROTOFLAG_SCREEN_NUMBER, PROXY_HTTP, PROXY_NONE, PROXY_NOTSUPPORTED, PROXY_SOCKS4, PROXY_SOCKS5_DNS, PROXY_SOCKS5_IP, randomSeed, rcvCipher, rcvComp, secureRandom, SERVER_KEY_LENGTH, SESSION_KEY_LENGTH, sessionId, sessionKey, SMSG_AGENT_OPEN, SMSG_AUTH_RSA_CHALLENGE, SMSG_AUTH_TIS_CHALLENGE, SMSG_EXITSTATUS, SMSG_FAILURE, SMSG_PUBLIC_KEY, SMSG_STDERR_DATA, SMSG_STDOUT_DATA, SMSG_SUCCESS, SMSG_X11_OPEN, sndCipher, sndComp, SRV_HOSTKEY_CHANGED, SRV_HOSTKEY_KNOWN, SRV_HOSTKEY_NEW, srvCookie, srvHostKey, srvServerKey, SSH_VER_MAJOR, SSH_VER_MINOR, supportedAuthTypes, supportedCiphers, TTY_OP_END, TTY_OP_ISPEED, TTY_OP_OSPEED, UNKNOWN_CHAN_NUM, VER_MINDTERM, VER_MINDTUNL |
Methods inherited from class com.mindbright.ssh.SSH |
getAltAuthName, getAuthName, getAuthType, getAuthTypes, getCipherName, getCipherType, getProxyType, getProxyTypes, getSupportedCipher, getVersionId, haveSecureRandom, initCipher, initClientCipher, initSeedGenerator, initServerCipher, isAuthTypeSupported, isProtocolFlagSet, log, logDebug, logExtra, logIgnore, msgTypeString, randomSeed, secureRandom |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cnChan
protected SSHConnectChannel cnChan
txQueue
protected NQueue txQueue
cnQueue
protected Queue cnQueue
totalTunnels
protected int totalTunnels
nextEmptyChan
protected int nextEmptyChan
tunnels
protected java.lang.Object[] tunnels
listenChannels
protected java.util.Vector<SSHListenChannel> listenChannels
sshHook
protected SSH sshHook
console
protected SSHConsole console
sendCipher
protected SSHCipher sendCipher
sendComp
protected SSHCompressor sendComp
SSHChannelController
public SSHChannelController(SSH sshHook,
Switchboard switchboard,
NonBlockingOutput sshOut,
SSHCipher sendCipher,
SSHCompressor sendComp,
SSHConsole console,
boolean haveCnxWatch)
start
public void start()
exit
public void exit()
waitForExit
public void waitForExit()
waitForExit
public void waitForExit(long msWait)
killAll
public void killAll()
newChannelId
public int newChannelId()
listTunnels
public java.lang.String[] listTunnels()
closeTunnelFromList
public void closeTunnelFromList(int listIdx)
killAllTunnels
public void killAllTunnels()
addTunnel
public void addTunnel(SSHTunnel tunnel)
delTunnel
public SSHTunnel delTunnel(int channelId)
haveHostInFwdOpen
public boolean haveHostInFwdOpen()
newListenChannel
public SSHListenChannel newListenChannel(java.lang.String localHost,
int localPort,
java.lang.String remoteHost,
int remotePort,
java.lang.String plugin)
throws java.io.IOException
- Throws:
java.io.IOException
killListenChannel
public void killListenChannel(java.lang.String localHost,
int listenPort)
killListenChannels
public void killListenChannels()
prepare
public SSHPdu prepare(SSHPdu pdu)
- Specified by:
prepare
in interface SSHChannelListener
transmit
public void transmit(SSHPdu pdu)
- Specified by:
transmit
in interface SSHChannelListener
receive
public void receive(SSHPdu pdu)
- Specified by:
receive
in interface SSHChannelListener
close
public void close(SSHChannel chan)
- Specified by:
close
in interface SSHChannelListener
disconnect
public void disconnect(java.lang.String reason)
sendDisconnect
public void sendDisconnect(java.lang.String reason)
alert
public void alert(java.lang.String msg)
sshAsClient
protected SSHClient sshAsClient()
getCnQueue
public Queue getCnQueue()
addHostMapTemporary
public void addHostMapTemporary(java.lang.String fromHost,
java.lang.String toHost,
int toPort)
addHostMapPermanent
public void addHostMapPermanent(java.lang.String fromHost,
java.lang.String toHost,
int toPort)
delHostMap
public void delHostMap(java.lang.String fromHost)
getHostMap
public java.util.Vector<java.lang.Object> getHostMap(java.lang.String fromHost)
handleQueue
public void handleQueue(java.lang.Object obj)
- Description copied from interface:
NQueueCallback
- Called once the queue has a packet ready for consumption
- Specified by:
handleQueue
in interface NQueueCallback
- Parameters:
obj
- the object to handle