Public Types | |
using | registers_type = ioctl::registers_type |
using | arg_type = std::string |
using | arg_list_type = std::vector< arg_type > |
using | filename_type = file::filename_type |
using | cpuid_type = ioctl::cpuid_type |
using | vcpuid_type = ioctl::vcpuid_type |
using | command_type = command_line_parser_command::type |
Public Member Functions | |
command_line_parser () | |
virtual | ~command_line_parser ()=default |
virtual void | parse (const arg_list_type &args) |
virtual command_type | cmd () const noexcept |
virtual const filename_type & | modules () const noexcept |
virtual cpuid_type | cpuid () const noexcept |
virtual vcpuid_type | vcpuid () const noexcept |
virtual const registers_type & | registers () const noexcept |
virtual const filename_type & | ifile () const noexcept |
virtual const filename_type & | ofile () const noexcept |
Command Line Parser
The command line parser is responsible for taking the command line arguments that are given to main(), and parse them for the bareflank manager. All of the commands that are accepted, should be contained in this class. Other classes can use the information that this class gathers to decide how to operate.
Definition at line 54 of file command_line_parser.h.
Definition at line 58 of file command_line_parser.h.
using command_line_parser::arg_type = std::string |
Definition at line 59 of file command_line_parser.h.
using command_line_parser::arg_list_type = std::vector<arg_type> |
Definition at line 60 of file command_line_parser.h.
Definition at line 61 of file command_line_parser.h.
Definition at line 62 of file command_line_parser.h.
Definition at line 63 of file command_line_parser.h.
Definition at line 64 of file command_line_parser.h.
command_line_parser::command_line_parser | ( | ) |
Command Line Parser Constructor
Definition at line 33 of file command_line_parser.cpp.
|
virtualdefault |
Command Line Parser Destructor
|
virtual |
Parse Command Line
Parses the command line. Upon successful completion, resets the internal state to resemble the provided arguments. On failure, this function throws an exception, and resets it's internal state. If an empty list is provided, this function resets the internal state to that of the default constructor
args | the arguments to parse |
Definition at line 37 of file command_line_parser.cpp.
|
virtualnoexcept |
Command
Definition at line 98 of file command_line_parser.cpp.
|
virtualnoexcept |
Modules
If the command provided by the arguments is "load", a list of modules must be provided for the arguments to make sense. This function returns the filename of the module file that was provided
Definition at line 102 of file command_line_parser.cpp.
|
virtualnoexcept |
CPU ID
Definition at line 106 of file command_line_parser.cpp.
|
virtualnoexcept |
vCPU ID
Definition at line 110 of file command_line_parser.cpp.
|
virtualnoexcept |
VMCall Registers
When a VMCall command is provided, this struct is filled in which is then sent to the driver to be delivered to the hypervisor for processing.
Definition at line 114 of file command_line_parser.cpp.
|
virtualnoexcept |
Input File
Definition at line 118 of file command_line_parser.cpp.
|
virtualnoexcept |
Output File
Definition at line 122 of file command_line_parser.cpp.