# Ne7sshSftpPacket Class Reference

`#include <ne7ssh_sftp_packet.h>`

Inheritance diagram for Ne7sshSftpPacket:

[legend]
Collaboration diagram for Ne7sshSftpPacket:

[legend]

List of all members.

## Public Member Functions
| Ne7sshSftpPacket ()
| Ne7sshSftpPacket (int channel)
| Ne7sshSftpPacket (Botan::SecureVector< Botan::byte > &var, uint32 position)
| ~Ne7sshSftpPacket ()
Botan::SecureVector < Botan::byte > & | value ()
Botan::SecureVector< Botan::byte > | valueFragment (uint32 len=0)
void | addInt64 (const uint64 var)
uint64 | getInt64 ()
bool | isChannelSet ()
## Private Attributes
int | channel

## Detailed Description

Author:
  Andrew Useckas <andrew@netsieben.com>

## Constructor & Destructor Documentation

Ne7sshSftpPacket::Ne7sshSftpPacket | ( |  | ) |

Default constructor.

Ne7sshSftpPacket::Ne7sshSftpPacket | ( | int | channel | ) |

Constructor.

Parameters:

  | channel | Channel ID, returned by connect methods.

Ne7sshSftpPacket::Ne7sshSftpPacket | ( | Botan::SecureVector< Botan::byte > & | var,
|  | uint32 | position |
| ) |  |  |

Constructor. Intializes the class with packet data.

Parameters:

  | var | Reference to packet data.
  | position | Offset.

Ne7sshSftpPacket::~Ne7sshSftpPacket | ( |  | ) |

Default destructor.

## Member Function Documentation

void Ne7sshSftpPacket::addInt64 | ( | const uint64 | var | ) |

Appends 64 bit integer to the packet buffer.

Parameters:

  | var | 64 bit integer.

References ne7ssh_string::addBytes().

uint64 Ne7sshSftpPacket::getInt64 | ( |  | ) |

Retrieves a 64 bit integer from a packet buffer.

Returns:
  Unsigned 64 bit integer.

Referenced by Ne7sshSftp::handleNames(), and Ne7sshSftp::processAttrs().

bool Ne7sshSftpPacket::isChannelSet | ( |  | ) |

Checks if the channel ID is set in the instance. Channel ID is needed to construct a SFTP packet.

Returns:
  True if the channel ID is set. Otherwise false.

Botan::SecureVector< Botan::byte > & Ne7sshSftpPacket::value | ( |  | ) | `[virtual]`

Returns buffer as a vector appending the SFTP subsystem specific packet headers.

Returns:
  Reference to the buffer.

Reimplemented from ne7ssh_string.

References ne7ssh_string::addChar(), ne7ssh_string::addInt(), ne7ssh_string::addVectorField(), and ne7ssh_string::value().

Botan::SecureVector< Botan::byte > Ne7sshSftpPacket::valueFragment | ( | uint32 | len = `0` | ) |

Returns buffer as a vector appending the SFTP subsystem specific packet headers, including the length in the first packet transmitted. Used in transmissions when it's necessary to split the message into multiple packets.

Parameters:

  | len | Length to append to the first packet in the message.

Returns:
  Reference to SFTP packet or empty vector on error.

References ne7ssh_string::addChar(), ne7ssh_string::addInt(), ne7ssh_string::addVector(), ne7ssh_string::addVectorField(), and ne7ssh_string::value().

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

- ne7ssh_sftp_packet.h
- ne7ssh_sftp_packet.cpp