libepp_nicbr
|
EPP command-line shell client command functions include file. More...
#include <fstream>
#include <unistd.h>
#include <termios.h>
#include <iostream>
#include "SheppGlobal.H"
#include "SheppStrUtil.H"
#include "SheppObjSet.H"
#include "SheppPrint.H"
#include "IoException.H"
#include "TransportException.H"
#include "EppException.H"
#include "XmlException.H"
#include "Login.H"
#include "Logout.H"
Go to the source code of this file.
Functions | |
int | cmd_source (vector< string > &) |
int | cmd_login (vector< string > &args) |
Send an EPP Login. More... | |
int | cmd_logout (vector< string > &args) |
Send an EPP Logout. More... | |
int | cmd_hello (vector< string > &args) |
Send an EPP HELLO. More... | |
int | cmd_poll (vector< string > &) |
main poll command More... | |
int | cmd_domain (vector< string > &) |
main domain command More... | |
int | cmd_contact (vector< string > &) |
main contact command More... | |
int | cmd_def_reg (vector< string > &) |
main defensive registration command More... | |
int | cmd_xmlcmd (vector< string > &args) |
Shows last XML command. More... | |
int | cmd_xmlrsp (vector< string > &args) |
Shows last XML response. More... | |
int | cmd_runxml (vector< string > &args) |
Run XML input command. More... | |
int | cmd_server (vector< string > &args) |
Sets server address [and port] based on input command-line. More... | |
int | cmd_port (vector< string > &args) |
Sets server port based on input command-line. More... | |
int | cmd_client_pem (vector< string > &args) |
Sets client.pem certificate file location. More... | |
int | cmd_root_pem (vector< string > &args) |
Sets root.pem certificate file location. More... | |
int | cmd_pass (vector< string > &args) |
Sets SSL certificate passphrase based on input command-line. More... | |
int | cmd_user (vector< string > &args) |
Sets login user based on input command-line. More... | |
int | cmd_login_pw (vector< string > &args) |
Sets EPP login password based on input command-line. More... | |
int | cmd_login_new_pw (vector< string > &args) |
Sets new EPP login password based on input command-line. More... | |
int | cmd_lang (vector< string > &args) |
Sets text language based on input command-line. More... | |
int | cmd_connect (vector< string > &args) |
Connects to previously specified server and port. More... | |
int | cmd_disconnect (vector< string > &args) |
Closes connection. More... | |
int | cmd_cltrid (vector< string > &args) |
Sets the client transaction id for the next commands. More... | |
int | cmd_help (vector< string > &args) |
Prints help. More... | |
int | cmd_about (vector< string > &args) |
Prints version information. More... | |
int | cmd_quit (vector< string > &args) |
Leaves shepp. More... | |
int | cmd_beauty (vector< string > &args) |
Turns XML beautifier ON and OFF. More... | |
int | cmd_debug (vector< string > &args) |
Turns debug messages ON and OFF. More... | |
int | cmd_autorsp (vector< string > &args) |
Turns auto-show response ON and OFF. More... | |
int | cmd_keepalive (vector< string > &args) |
Turns keep-alive ON and OFF. More... | |
int | cmd_peer_crt_check (vector< string > &args) |
Turn peer's certificate check ON and OFF. More... | |
string | getpasswd (string prompt) |
Function to read from stdin without echoing. More... | |
void | init_commands () |
Populates set of available commands. | |
const SheppCommand * | find_command (string name) |
Given a word check if it's a valid SheppCommand. More... | |
int | executeInputFile (const string &file) |
void | print_cmd_sent_ok () |
Prints "command sent ok" message. | |
int | process_action (Action &act) |
Send and EPP Action. More... | |
EPP command-line shell client command functions include file.
int cmd_about | ( | vector< string > & | args | ) |
Prints version information.
args | input command-line |
References about().
Referenced by init_commands().
int cmd_autorsp | ( | vector< string > & | args | ) |
Turns auto-show response ON and OFF.
args | input command-line |
Referenced by init_commands().
int cmd_beauty | ( | vector< string > & | args | ) |
Turns XML beautifier ON and OFF.
args | input command-line |
Referenced by init_commands().
int cmd_client_pem | ( | vector< string > & | args | ) |
Sets client.pem certificate file location.
args | input command-line |
Referenced by init_commands().
int cmd_cltrid | ( | vector< string > & | args | ) |
Sets the client transaction id for the next commands.
args | input command-line |
References _session.
Referenced by init_commands().
int cmd_connect | ( | vector< string > & | args | ) |
Connects to previously specified server and port.
args | input command-line |
References _server, _session, cmd_server(), cmd_xmlrsp(), GeneralException::get_code(), GeneralException::get_low_level_msg(), and GeneralException::get_msg().
Referenced by init_commands().
int cmd_contact | ( | vector< string > & | args | ) |
main contact command
arg | command-line input arguments |
References cmd_contact_check(), cmd_contact_create(), cmd_contact_delete(), cmd_contact_help(), cmd_contact_info(), cmd_contact_renew(), cmd_contact_transfer(), and cmd_contact_update().
Referenced by init_commands().
int cmd_debug | ( | vector< string > & | args | ) |
Turns debug messages ON and OFF.
args | input command-line |
Referenced by init_commands().
int cmd_def_reg | ( | vector< string > & | args | ) |
main defensive registration command
arg | command-line input arguments |
References cmd_def_reg_check(), cmd_def_reg_create(), cmd_def_reg_delete(), cmd_def_reg_help(), cmd_def_reg_info(), cmd_def_reg_renew(), cmd_def_reg_transfer(), and cmd_def_reg_update().
Referenced by init_commands().
int cmd_disconnect | ( | vector< string > & | args | ) |
Closes connection.
args | input command-line |
References _server, _session, GeneralException::get_code(), GeneralException::get_low_level_msg(), and GeneralException::get_msg().
Referenced by init_commands().
int cmd_domain | ( | vector< string > & | args | ) |
main domain command
arg | command-line input arguments |
References cmd_domain_check(), cmd_domain_create(), cmd_domain_delete(), cmd_domain_help(), cmd_domain_info(), cmd_domain_renew(), cmd_domain_transfer(), and cmd_domain_update().
Referenced by init_commands().
int cmd_hello | ( | vector< string > & | args | ) |
Send an EPP HELLO.
args | input command-line |
References _session, GeneralException::get_code(), GeneralException::get_low_level_msg(), GeneralException::get_msg(), and print_cmd_sent_ok().
Referenced by init_commands().
int cmd_help | ( | vector< string > & | args | ) |
Prints help.
args | input command-line |
References _commands.
Referenced by init_commands().
int cmd_keepalive | ( | vector< string > & | args | ) |
Turns keep-alive ON and OFF.
args | input command-line |
Referenced by init_commands().
int cmd_lang | ( | vector< string > & | args | ) |
Sets text language based on input command-line.
args | input command-line |
Referenced by init_commands().
int cmd_login | ( | vector< string > & | args | ) |
Send an EPP Login.
args | input command-line |
References LoginCmd::add_extURI(), Login::get_command(), process_action(), LoginCmd::set_clID(), LoginCmd::set_lang(), LoginCmd::set_new_pw(), and LoginCmd::set_pw().
Referenced by init_commands().
int cmd_login_new_pw | ( | vector< string > & | args | ) |
Sets new EPP login password based on input command-line.
args | input command-line |
References getpasswd().
Referenced by init_commands().
int cmd_login_pw | ( | vector< string > & | args | ) |
Sets EPP login password based on input command-line.
args | input command-line |
References getpasswd().
Referenced by init_commands().
int cmd_logout | ( | vector< string > & | args | ) |
Send an EPP Logout.
args | input command-line |
References process_action().
Referenced by init_commands().
int cmd_pass | ( | vector< string > & | args | ) |
Sets SSL certificate passphrase based on input command-line.
args | input command-line |
References getpasswd().
Referenced by init_commands().
int cmd_peer_crt_check | ( | vector< string > & | args | ) |
Turn peer's certificate check ON and OFF.
args | input command-line |
Referenced by init_commands().
int cmd_poll | ( | vector< string > & | args | ) |
main poll command
arg | command-line input arguments |
References cmd_poll_help(), Poll::get_command(), PollCmd::get_msgID(), PollCmd::get_op(), process_action(), PollCmd::set_msgID(), and PollCmd::set_op().
Referenced by init_commands().
int cmd_port | ( | vector< string > & | args | ) |
Sets server port based on input command-line.
args | input command-line |
Referenced by init_commands().
int cmd_quit | ( | vector< string > & | args | ) |
Leaves shepp.
args | input command-line |
References _session.
Referenced by init_commands(), and main().
int cmd_root_pem | ( | vector< string > & | args | ) |
Sets root.pem certificate file location.
args | input command-line |
Referenced by init_commands().
int cmd_runxml | ( | vector< string > & | args | ) |
Run XML input command.
References _session, GeneralException::get_code(), GeneralException::get_low_level_msg(), GeneralException::get_msg(), and print_cmd_sent_ok().
Referenced by init_commands().
int cmd_server | ( | vector< string > & | args | ) |
Sets server address [and port] based on input command-line.
args | input command-line |
References _server, and SheppStrUtil::split().
Referenced by cmd_connect(), init_commands(), and main().
int cmd_source | ( | vector< string > & | args | ) |
Given a input file, read and execute all shepp commands in this file
args | input command-line |
References executeInputFile().
Referenced by init_commands().
int cmd_user | ( | vector< string > & | args | ) |
Sets login user based on input command-line.
args | input command-line |
Referenced by init_commands().
int cmd_xmlcmd | ( | vector< string > & | args | ) |
Shows last XML command.
args | input command-line |
References _session, GeneralException::get_code(), GeneralException::get_msg(), StrUtil::iso88591_to_utf8(), and StrUtil::xml_beautifier().
Referenced by init_commands().
int cmd_xmlrsp | ( | vector< string > & | args | ) |
Shows last XML response.
args | input command-line |
References GeneralException::get_code(), GeneralException::get_msg(), and StrUtil::xml_beautifier().
Referenced by cmd_connect(), init_commands(), and print_cmd_sent_ok().
int executeInputFile | ( | const string & | file | ) |
Given a input file, read and execute all shepp commands in this file
inputFile | input file with shepp commands |
References find_command(), SheppCommand::function, init_commands(), SheppStrUtil::parse_line(), and SheppStrUtil::trim().
Referenced by cmd_source(), and main().
const SheppCommand* find_command | ( | string | name | ) |
Given a word check if it's a valid SheppCommand.
name | of command check validity |
References _commands.
Referenced by execute(), and executeInputFile().
string getpasswd | ( | string | prompt | ) |
Function to read from stdin without echoing.
prompt | prompt to be echoed |
Referenced by cmd_login_new_pw(), cmd_login_pw(), and cmd_pass().
int process_action | ( | Action & | act | ) |
Send and EPP Action.
References _session, GeneralException::get_code(), GeneralException::get_low_level_msg(), GeneralException::get_msg(), and print_cmd_sent_ok().
Referenced by cmd_asn_check(), cmd_asn_create(), cmd_asn_delete(), cmd_asn_info(), cmd_asn_renew(), cmd_asn_reserve_create(), cmd_asn_reserve_delete(), cmd_asn_transfer(), cmd_asn_update(), cmd_brorg_check(), cmd_brorg_create(), cmd_brorg_delete(), cmd_brorg_info(), cmd_brorg_update(), cmd_contact_check(), cmd_contact_create(), cmd_contact_delete(), cmd_contact_info(), cmd_contact_transfer(), cmd_contact_update(), cmd_def_reg_check(), cmd_def_reg_create(), cmd_def_reg_delete(), cmd_def_reg_info(), cmd_def_reg_renew(), cmd_def_reg_transfer(), cmd_def_reg_update(), cmd_domain_check(), cmd_domain_create(), cmd_domain_delete(), cmd_domain_info(), cmd_domain_renew(), cmd_domain_transfer(), cmd_domain_update(), cmd_ipnetwork_check(), cmd_ipnetwork_create(), cmd_ipnetwork_delete(), cmd_ipnetwork_info(), cmd_ipnetwork_renew(), cmd_ipnetwork_transfer(), cmd_ipnetwork_update(), cmd_login(), cmd_logout(), and cmd_poll().