# ne7ssh_session Class Reference

`#include <ne7ssh_session.h>`

Collaboration diagram for ne7ssh_session:

[legend]

List of all members.

## Public Member Functions
| ne7ssh_session ()
| ~ne7ssh_session ()
void | setLocalVersion (Botan::SecureVector< Botan::byte > &version)
Botan::SecureVector < Botan::byte > & | getLocalVersion ()
void | setRemoteVersion (Botan::SecureVector< Botan::byte > &version)
Botan::SecureVector < Botan::byte > & | getRemoteVersion ()
void | setSessionID (Botan::SecureVector< Botan::byte > &session)
Botan::SecureVector < Botan::byte > & | getSessionID ()
void | setSendChannel (uint32 channel)
uint32 | getSendChannel () const
void | setReceiveChannel (uint32 channel)
uint32 | getReceiveChannel ()
void | setMaxPacket (uint32 size)
uint32 | getMaxPacket ()
void | setSshChannel (int32 channel)
int32 | getSshChannel ()
## Public Attributes
ne7ssh_transport * | transport
ne7ssh_crypt * | crypto
## Private Attributes
Botan::SecureVector< Botan::byte > | localVersion
Botan::SecureVector< Botan::byte > | remoteVersion
Botan::SecureVector< Botan::byte > | sessionID
uint32 | sendChannel
uint32 | receiveChannel
uint32 | maxPacket
int32 | channelID

## Detailed Description

Author:
  Andrew Useckas

## Constructor & Destructor Documentation

ne7ssh_session::ne7ssh_session | ( |  | ) |

ne7ssh_session class constructor.

ne7ssh_session::~ne7ssh_session | ( |  | ) |

ne7ssh_session class desctructor.

## Member Function Documentation

Botan::SecureVector<Botan::byte>& ne7ssh_session::getLocalVersion | ( |  | ) | `[inline]`

Returns local SSH version.

Returns:
  Reference to a vector containing the version string.

Referenced by ne7ssh_kex::makeH().

uint32 ne7ssh_session::getMaxPacket | ( |  | ) | `[inline]`

Returns maximum send packet size.

Returns:
  Maximum packet size.

Referenced by ne7ssh_channel::sendAdjustWindow(), and ne7ssh_channel::write().

uint32 ne7ssh_session::getReceiveChannel | ( |  | ) | `[inline]`

Returns the receive channel ID.

Returns:
  Channel ID.

Botan::SecureVector<Botan::byte>& ne7ssh_session::getRemoteVersion | ( |  | ) | `[inline]`

Returns remote SSH version.

Returns:
  Reference to a vector containing the version string.

Referenced by ne7ssh_kex::makeH().

uint32 ne7ssh_session::getSendChannel | ( |  | ) | const`[inline]`

Returns the send channel ID.

Returns:
  Channel ID.

Referenced by Ne7sshSftp::cd(), Ne7sshSftp::chmod(), Ne7sshSftp::chown(), Ne7sshSftp::closeFile(), ne7ssh_channel::execCmd(), Ne7sshSftp::getFileStats(), Ne7sshSftp::getFStat(), ne7ssh_channel::getShell(), Ne7sshSftp::init(), Ne7sshSftp::ls(), Ne7sshSftp::mkdir(), Ne7sshSftp::mv(), Ne7sshSftp::openDir(), Ne7sshSftp::openFile(), Ne7sshSftp::readFile(), Ne7sshSftp::rm(), Ne7sshSftp::rmdir(), ne7ssh_channel::sendAdjustWindow(), ne7ssh_channel::sendAll(), ne7ssh_channel::sendClose(), ne7ssh_channel::sendEof(), and Ne7sshSftp::writeFile().

Botan::SecureVector<Botan::byte>& ne7ssh_session::getSessionID | ( |  | ) | `[inline]`

Returns the current SSH session ID.

Returns:
  Reference to a vector containing the session ID.

Referenced by ne7ssh_connection::authWithKey(), and ne7ssh_crypt::compute_key().

int32 ne7ssh_session::getSshChannel | ( |  | ) | `[inline]`

REtrieves current ne7ssh channel.

Returns:
  ne7ssh channel or -1 if the session hasn't succesfully opened the channel yet.

Referenced by ne7ssh_connection::authWithKey(), Ne7sshSftp::cd(), ne7ssh_connection::checkRemoteVersion(), Ne7sshSftp::chmod(), Ne7sshSftp::chown(), Ne7sshSftp::closeFile(), ne7ssh_crypt::compute_key(), ne7ssh_crypt::computeH(), ne7ssh_channel::execCmd(), Ne7sshSftp::get(), ne7ssh_crypt::getCryptAlgo(), Ne7sshSftp::getFileAttrs(), Ne7sshSftp::getFileHandle(), Ne7sshSftp::getFileSize(), Ne7sshSftp::getFileStats(), Ne7sshSftp::getFStat(), ne7ssh_crypt::getHashAlgo(), ne7ssh_crypt::getHmacAlgo(), ne7ssh_crypt::getKexPublic(), ne7ssh_crypt::getMacKeyLen(), Ne7sshSftp::handleData(), ne7ssh_channel::handleData(), ne7ssh_channel::handleDisconnect(), ne7ssh_channel::handleEof(), ne7ssh_channel::handleExtendedData(), ne7ssh_kex::handleInit(), ne7ssh_channel::handleReceived(), ne7ssh_channel::handleRequest(), Ne7sshSftp::handleSftpData(), Ne7sshSftp::handleStatus(), Ne7sshSftp::handleVersion(), Ne7sshSftp::isType(), Ne7sshSftp::ls(), Ne7sshSftp::mkdir(), Ne7sshSftp::mv(), ne7ssh_crypt::negotiatedCmprsC2s(), ne7ssh_crypt::negotiatedCmprsS2c(), ne7ssh_crypt::negotiatedCryptoC2s(), ne7ssh_crypt::negotiatedCryptoS2c(), ne7ssh_crypt::negotiatedHostkey(), ne7ssh_crypt::negotiatedKex(), ne7ssh_crypt::negotiatedMacC2s(), ne7ssh_crypt::negotiatedMacS2c(), Ne7sshSftp::openDir(), Ne7sshSftp::openFile(), Ne7sshSftp::put(), Ne7sshSftp::readFile(), Ne7sshSftp::receiveWindowAdjust(), ne7ssh_connection::requestService(), Ne7sshSftp::rm(), Ne7sshSftp::rmdir(), ne7ssh_kex::sendInit(), ne7ssh_kex::sendKexDHInit(), ne7ssh_kex::sendKexNewKeys(), ne7ssh_connection::startSftp(), ne7ssh_crypt::verifySig(), and Ne7sshSftp::writeFile().

void ne7ssh_session::setLocalVersion | ( | Botan::SecureVector< Botan::byte > & | version | ) | `[inline]`

Sets the local SSH version string.

Parameters:

  | version | Reference to a vector containing the version string.

Referenced by ne7ssh_connection::sendLocalVersion().

void ne7ssh_session::setMaxPacket | ( | uint32 | size | ) | `[inline]`

Sets maximum send packet size.

Parameters:

  | size | Maximum packet size.

Referenced by ne7ssh_channel::handleChannelConfirm().

void ne7ssh_session::setReceiveChannel | ( | uint32 | channel | ) | `[inline]`

After the channel is open this function sets the receive channel ID.

Parameters:

  | channel | Channel ID.

void ne7ssh_session::setRemoteVersion | ( | Botan::SecureVector< Botan::byte > & | version | ) | `[inline]`

Sets the remote SSH version string.

Parameters:

  | version | Reference to a vector containing the version string.

Referenced by ne7ssh_connection::checkRemoteVersion().

void ne7ssh_session::setSendChannel | ( | uint32 | channel | ) | `[inline]`

After the channel is open this function sets the send channel ID.

Parameters:

  | channel | Channel ID.

Referenced by ne7ssh_channel::handleChannelConfirm().

void ne7ssh_session::setSessionID | ( | Botan::SecureVector< Botan::byte > & | session | ) | `[inline]`

Sets SSH session ID, a.k.a. H from the first KEX.

Parameters:

  | session | Reference to a vector containing the session ID.

Referenced by ne7ssh_kex::handleKexDHReply().

void ne7ssh_session::setSshChannel | ( | int32 | channel | ) | `[inline]`

Stores newly created ne7ssh channel.

Parameters:

  | channel | ne7ssh channel.

Referenced by ne7ssh_connection::connectWithKey(), and ne7ssh_connection::connectWithPassword().

The documentation for this class was generated from the following files:

- ne7ssh_session.h
- ne7ssh_session.cpp