fred-mod-eppd-2.20.0
|
Interface definition of corba module. More...
Go to the source code of this file.
Macros | |
#define | MAX_RETRIES 3 |
Maximum number of retries when connection failure occurs before the failure is announced to a caller. | |
#define | RETR_SLEEP 100000 |
Number of microseconds between retries when connection failure occurs. More... | |
#define | raised_exception(ev) ((ev)->_major != CORBA_NO_EXCEPTION) |
Quick test if corba exception was raised. More... | |
#define | DB_FIELD_SIZE 2000 |
Maximal size of property value in database. | |
#define | IS_NOT_COMM_FAILURE_EXCEPTION(_ev) (strcmp((_ev)->_id, "IDL:omg.org/CORBA/COMM_FAILURE:1.0")) |
True if exception is COMM_FAILURE, which is used in retry loop. More... | |
#define | IS_EPP_ERROR(_ev) (!strcmp((_ev)->_id, "IDL:ccReg/EPP/EppError:1.0")) |
True if exception is EPP_ERROR. More... | |
#define | IS_NO_MESSAGES(_ev) (!strcmp((_ev)->_id, "IDL:ccReg/EPP/NoMessages:1.0")) |
True if exception is NO_MESSAGES. More... | |
#define | MAX_ERROR_MSG_LEN 100 |
Typedefs | |
typedef void * | service_EPP |
Reference to EPP CORBA service. | |
typedef void * | service_Logger |
Reference to fred-logd CORBA service. | |
Enumerations | |
enum | corba_status { CORBA_OK, CORBA_ERROR, CORBA_INT_ERROR, CORBA_REMOTE_ERROR } |
Possible return values of functions from corba module. More... | |
Functions | |
char * | wrap_str (const char *str) |
Function wraps strings passed from XML parser into strings accepted by CORBA. More... | |
int | epp_call_hello (epp_context *epp_ctx, service_EPP service, char **version, char **curdate) |
Purpose of this function is to get version string of ccReg from corba server, which is used as part of server's name in <greeting> frame. More... | |
corba_status | epp_call_login (epp_context *epp_ctx, service_EPP service, unsigned long long *loginid, const ccReg_TID request_id, epp_lang *lang, const char *fingerprint, epp_command_data *cdata) |
Call corba login function, which sets up a session variables. More... | |
corba_status | epp_call_logout (epp_context *epp_ctx, service_EPP service, unsigned long long *loginid, const ccReg_TID request_id, epp_command_data *cdata) |
Call corba logout function. More... | |
corba_status | epp_call_cmd (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
Call generic command corba handler which decides what to do on the basis of cdata content. More... | |
void | epp_call_save_output_xml (epp_context *epp_ctx, service_EPP service, epp_command_data *cdata, const char *xml) |
This function calls corba function which saves generated XML in database. More... | |
void | epp_call_CloseSession (epp_context *epp_ctx, service_EPP service, unsigned long long loginid) |
Let the CR know that client has closed tcp session. More... | |
Interface definition of corba module.
#define IS_EPP_ERROR | ( | _ev | ) | (!strcmp((_ev)->_id, "IDL:ccReg/EPP/EppError:1.0")) |
True if exception is EPP_ERROR.
Referenced by handle_exception().
#define IS_NO_MESSAGES | ( | _ev | ) | (!strcmp((_ev)->_id, "IDL:ccReg/EPP/NoMessages:1.0")) |
True if exception is NO_MESSAGES.
Referenced by handle_exception().
#define IS_NOT_COMM_FAILURE_EXCEPTION | ( | _ev | ) | (strcmp((_ev)->_id, "IDL:omg.org/CORBA/COMM_FAILURE:1.0")) |
True if exception is COMM_FAILURE, which is used in retry loop.
Referenced by epp_call_check(), epp_call_CloseSession(), epp_call_create_contact(), epp_call_create_domain(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_creditinfo(), epp_call_delete(), epp_call_dummy(), epp_call_getInfoResults(), epp_call_hello(), epp_call_info(), epp_call_info_contact(), epp_call_info_domain(), epp_call_info_keyset(), epp_call_info_nsset(), epp_call_list(), epp_call_login(), epp_call_logout(), epp_call_poll_ack(), epp_call_poll_req(), epp_call_renew_domain(), epp_call_sendauthinfo(), epp_call_test_nsset(), epp_call_transfer(), epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), and epp_call_update_nsset().
#define raised_exception | ( | ev | ) | ((ev)->_major != CORBA_NO_EXCEPTION) |
Quick test if corba exception was raised.
Referenced by epp_call_check(), epp_call_CloseSession(), epp_call_create_contact(), epp_call_create_domain(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_creditinfo(), epp_call_delete(), epp_call_dummy(), epp_call_getInfoResults(), epp_call_hello(), epp_call_info(), epp_call_info_contact(), epp_call_info_domain(), epp_call_info_keyset(), epp_call_info_nsset(), epp_call_list(), epp_call_login(), epp_call_logout(), epp_call_poll_ack(), epp_call_poll_req(), epp_call_renew_domain(), epp_call_sendauthinfo(), epp_call_test_nsset(), epp_call_transfer(), epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), and epp_call_update_nsset().
#define RETR_SLEEP 100000 |
Number of microseconds between retries when connection failure occurs.
Referenced by epp_call_check(), epp_call_CloseSession(), epp_call_create_contact(), epp_call_create_domain(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_creditinfo(), epp_call_delete(), epp_call_dummy(), epp_call_getInfoResults(), epp_call_hello(), epp_call_info(), epp_call_info_contact(), epp_call_info_domain(), epp_call_info_keyset(), epp_call_info_nsset(), epp_call_list(), epp_call_login(), epp_call_logout(), epp_call_poll_ack(), epp_call_poll_req(), epp_call_renew_domain(), epp_call_sendauthinfo(), epp_call_test_nsset(), epp_call_transfer(), epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), and epp_call_update_nsset().
enum corba_status |
void epp_call_CloseSession | ( | epp_context * | epp_ctx, |
service_EPP | service, | ||
unsigned long long | loginid | ||
) |
Let the CR know that client has closed tcp session.
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
loginid | Login ID of client. |
References EPP_ERROR, epplog(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, and RETR_SLEEP.
Referenced by call_corba(), and epp_process_connection().
corba_status epp_call_cmd | ( | epp_context * | epp_ctx, |
service_EPP | service, | ||
unsigned long long | loginid, | ||
const ccReg_TID | request_id, | ||
epp_command_data * | cdata | ||
) |
Call generic command corba handler which decides what to do on the basis of cdata content.
login, logout commands are not handled by this function. They are rather handled by dedicated functions epp_call_login() and epp_call_logout(). For all other commands use this function.
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
loginid | Session identifier |
request_id | fred-logd request ID |
cdata | Data from parsed xml command. |
References CORBA_INT_ERROR, epp_call_check(), epp_call_create_contact(), epp_call_create_domain(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_creditinfo(), epp_call_delete(), epp_call_dummy(), epp_call_getInfoResults(), epp_call_info(), epp_call_info_contact(), epp_call_info_domain(), epp_call_info_keyset(), epp_call_info_nsset(), epp_call_list(), epp_call_poll_ack(), epp_call_poll_req(), epp_call_renew_domain(), epp_call_sendauthinfo(), epp_call_test_nsset(), epp_call_transfer(), epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), epp_call_update_nsset(), EPP_DEBUG, epplog(), epp_command_data::noresdata, and epp_command_data::type.
Referenced by call_corba().
int epp_call_hello | ( | epp_context * | epp_ctx, |
service_EPP | service, | ||
char ** | version, | ||
char ** | curdate | ||
) |
Purpose of this function is to get version string of ccReg from corba server, which is used as part of server's name in <greeting> frame.
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
version | Output parameter version string. |
curdate | Output parameter current date. |
References CLEAR_CERRNO, CORBA_ERROR, CORBA_INT_ERROR, CORBA_OK, EPP_DEBUG, EPP_ERROR, epplog(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_context::pool, raised_exception, RETR_SLEEP, and unwrap_str().
Referenced by epp_process_connection(), and epp_request_loop().
corba_status epp_call_login | ( | epp_context * | epp_ctx, |
service_EPP | service, | ||
unsigned long long * | loginid, | ||
const ccReg_TID | request_id, | ||
epp_lang * | lang, | ||
const char * | fingerprint, | ||
epp_command_data * | cdata | ||
) |
Call corba login function, which sets up a session variables.
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
loginid | If successfully logged in, the session identifier assigned by server will be stored in this parameter. |
request_id | fred-logd request ID |
lang | If successfully logged in, the selected language will be stored in this parameter. |
fingerprint | Fingerprint of client's certificate. |
cdata | Data from parsed xml command. |
References epps_login::clID, epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), EPP_DEBUG, epplog(), handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, epps_login::lang, MAX_RETRIES, epps_login::newPW, epp_command_data::noresdata, epps_login::pw, raised_exception, RETR_SLEEP, wrap_str(), and epp_command_data::xml_in.
Referenced by call_login().
corba_status epp_call_logout | ( | epp_context * | epp_ctx, |
service_EPP | service, | ||
unsigned long long * | loginid, | ||
const ccReg_TID | request_id, | ||
epp_command_data * | cdata | ||
) |
Call corba logout function.
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
loginid | Session identifier (may change inside). |
request_id | fred-logd request ID |
cdata | Data from parsed xml command. |
References epp_command_data::clTRID, CORBA_INT_ERROR, epilog_success(), EPP_DEBUG, epplog(), handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_command_data::noresdata, raised_exception, RETR_SLEEP, and epp_command_data::xml_in.
Referenced by call_corba().
void epp_call_save_output_xml | ( | epp_context * | epp_ctx, |
service_EPP | service, | ||
epp_command_data * | cdata, | ||
const char * | xml | ||
) |
This function calls corba function which saves generated XML in database.
From architectural view THIS IS UGLY HACK! And until serving of EPP request will become complex operation composed from several function calls, it will remain so.
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
cdata | Used to get svTRID. |
xml | Output XML. |
char* wrap_str | ( | const char * | str | ) |
Function wraps strings passed from XML parser into strings accepted by CORBA.
Null strings are transformed to empty strings. The resulting string must be freed with CORBA_free().
str | Input string. |
Referenced by epp_call_check(), epp_call_create_contact(), epp_call_create_domain(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_dummy(), epp_call_info(), epp_call_login(), epp_call_renew_domain(), epp_call_sendauthinfo(), epp_call_test_nsset(), epp_call_transfer(), epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), epp_call_update_nsset(), and unwrap_str_req().