ROSE 0.11.145.267
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
Rose::BinaryAnalysis::VxworksTerminal Class Reference

Description

Connection to a VxWorks terminal.

Definition at line 19 of file VxworksTerminal.h.

#include <Rose/BinaryAnalysis/VxworksTerminal.h>

Collaboration diagram for Rose::BinaryAnalysis::VxworksTerminal:
Collaboration graph
[legend]

Classes

class  DataTransfer
 Handle data transfers to/from the VxWorks terminal. More...
 
class  Settings
 Information about connecting to a VxWorks terminal. More...
 

Public Types

using Ptr = VxworksTerminalPtr
 Shared-ownership pointer.
 

Public Member Functions

Sawyer::Optional< std::string > open ()
 Open a connection to the terminal.
 
bool isOpen () const
 Test whether the connection is open.
 
const Settingssettings () const
 Property: Configuration settings.
 
Settingssettings ()
 Property: Configuration settings.
 
Sawyer::PartialResult< std::vector< uint8_t >, std::string > download ()
 Download memory from an open connection.
 
Sawyer::PartialResult< std::vector< uint8_t >, std::string > download (const AddressInterval &)
 Download memory from an open connection.
 
Sawyer::PartialResult< AddressInterval, std::string > download (const MemoryMapPtr &destination, const std::string &name)
 Download memory from an open connection into a map.
 
Sawyer::PartialResult< AddressInterval, std::string > download (const MemoryMapPtr &destination, const AddressInterval &, const std::string &name)
 Download memory from an open connection into a map.
 

Static Public Member Functions

static void initDiagnostics ()
 Initialize diagnostic streams.
 
static std::string locatorStringDocumentation (const Settings &)
 Generate locator string documentation.
 
static Sawyer::Result< Settings, MemoryMap::LocatorErrorparseLocatorString (const std::string &, const Settings &dflt)
 Parse a VxWorks terminal locator string.
 
static Ptr instance ()
 Allocating constructor.
 
static Ptr instance (const Settings &)
 Allocating constructor.
 

Static Public Attributes

static Diagnostics::Facility mlog
 

Protected Member Functions

 VxworksTerminal (const Settings &)
 
 VxworksTerminal (const VxworksTerminal &)=delete
 
VxworksTerminaloperator= (const VxworksTerminal &)=delete
 

Member Typedef Documentation

◆ Ptr

Shared-ownership pointer.

Definition at line 22 of file VxworksTerminal.h.

Member Function Documentation

◆ instance() [1/2]

static Ptr Rose::BinaryAnalysis::VxworksTerminal::instance ( )
static

Allocating constructor.

The object is created, but no attempt is made to connect to the remote server. The settings are either the defaults or the specified settings.

◆ instance() [2/2]

static Ptr Rose::BinaryAnalysis::VxworksTerminal::instance ( const Settings )
static

Allocating constructor.

The object is created, but no attempt is made to connect to the remote server. The settings are either the defaults or the specified settings.

◆ initDiagnostics()

static void Rose::BinaryAnalysis::VxworksTerminal::initDiagnostics ( )
static

Initialize diagnostic streams.

This is called automatically by Rose::Diagnostics::initialize.

◆ locatorStringDocumentation()

static std::string Rose::BinaryAnalysis::VxworksTerminal::locatorStringDocumentation ( const Settings )
static

Generate locator string documentation.

Returns a documentation string that describes the locator string syntax used by the parseLocatorString function. The return value is used when generating man page documentation for most binary analysis tools. The settings argument provides the defaults referenced by the documentation.

◆ parseLocatorString()

static Sawyer::Result< Settings, MemoryMap::LocatorError > Rose::BinaryAnalysis::VxworksTerminal::parseLocatorString ( const std::string &  ,
const Settings dflt 
)
static

Parse a VxWorks terminal locator string.

The locator string is of the form ":[MEMORY_SETTINGS]:[CONNECTION_SETTINGS]:HOST". The full documentation is generated by the locatorStringDocumentation function at runtime when producing the man pages output by most ROSE binary analysis tools.

Returns the parsed settings with defaults where a setting was not specified, or an error if something couldn't be parsed.

◆ open()

Sawyer::Optional< std::string > Rose::BinaryAnalysis::VxworksTerminal::open ( )

Open a connection to the terminal.

This function attempts to connect to the telnet port.

Returns nothing if the connection was opened successfully, or an error message if the connection failed. It is an error to try to connect when a connection is already open.

◆ isOpen()

bool Rose::BinaryAnalysis::VxworksTerminal::isOpen ( ) const

Test whether the connection is open.

Returns true if this object is connected to a remote server.

◆ download() [1/4]

Sawyer::PartialResult< std::vector< uint8_t >, std::string > Rose::BinaryAnalysis::VxworksTerminal::download ( )

Download memory from an open connection.

If an address interval is supplied as an argument, then those addresses are downloaded. Otherwise the address interval is obtained from the settings.

Returns the memory data downloaded from the remote terminal, or an error string. It is an error if the entire memory region could not be downloaded, but even if an error occurs any partial data that was downloaded is also returned.

◆ download() [2/4]

Sawyer::PartialResult< std::vector< uint8_t >, std::string > Rose::BinaryAnalysis::VxworksTerminal::download ( const AddressInterval )

Download memory from an open connection.

If an address interval is supplied as an argument, then those addresses are downloaded. Otherwise the address interval is obtained from the settings.

Returns the memory data downloaded from the remote terminal, or an error string. It is an error if the entire memory region could not be downloaded, but even if an error occurs any partial data that was downloaded is also returned.

◆ download() [3/4]

Sawyer::PartialResult< AddressInterval, std::string > Rose::BinaryAnalysis::VxworksTerminal::download ( const MemoryMapPtr destination,
const std::string &  name 
)

Download memory from an open connection into a map.

If an address interval is supplied then those addresses are downloaded, otherwise the address interval is obtained from the settings. The name of the mapped segment is specified with an argument. The permissions come from the current terminal settings.

Returns the region of memory that was downloaded. If an error occurs, then an error string is also returned.

◆ download() [4/4]

Sawyer::PartialResult< AddressInterval, std::string > Rose::BinaryAnalysis::VxworksTerminal::download ( const MemoryMapPtr destination,
const AddressInterval ,
const std::string &  name 
)

Download memory from an open connection into a map.

If an address interval is supplied then those addresses are downloaded, otherwise the address interval is obtained from the settings. The name of the mapped segment is specified with an argument. The permissions come from the current terminal settings.

Returns the region of memory that was downloaded. If an error occurs, then an error string is also returned.

Member Data Documentation

◆ mlog

Diagnostics::Facility Rose::BinaryAnalysis::VxworksTerminal::mlog
static

Definition at line 73 of file VxworksTerminal.h.


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