fred-mod-eppd
|
Go to the source code of this file.
Macros | |
#define | MAX_RETRIES 3 |
#define | RETR_SLEEP 100000 |
#define | raised_exception(ev) ((ev)->_major != CORBA_NO_EXCEPTION) |
#define | DB_FIELD_SIZE 2000 |
#define | IS_NOT_COMM_FAILURE_EXCEPTION(_ev) (strcmp((_ev)->_id, "IDL:omg.org/CORBA/COMM_FAILURE:1.0")) |
#define | IS_EPP_ERROR(_ev) (!strcmp((_ev)->_id, "IDL:ccReg/EPP/EppError:1.0")) |
#define | IS_NO_MESSAGES(_ev) (!strcmp((_ev)->_id, "IDL:ccReg/EPP/NoMessages:1.0")) |
#define | MAX_ERROR_MSG_LEN 100 |
Typedefs | |
typedef void * | service_EPP |
typedef void * | service_Logger |
Enumerations | |
enum | corba_status { CORBA_OK, CORBA_ERROR, CORBA_INT_ERROR, CORBA_REMOTE_ERROR } |
Functions | |
char * | wrap_str (const char *str) |
int | epp_call_hello (epp_context *epp_ctx, service_EPP service, char **version, char **curdate) |
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) |
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) |
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) |
void | epp_call_save_output_xml (epp_context *epp_ctx, service_EPP service, epp_command_data *cdata, const char *xml) |
void | epp_call_CloseSession (epp_context *epp_ctx, service_EPP service, unsigned long long loginid) |
Interface definition of corba module.
#define DB_FIELD_SIZE 2000 |
Maximal size of property value in database
#define IS_EPP_ERROR | ( | _ev | ) | (!strcmp((_ev)->_id, "IDL:ccReg/EPP/EppError:1.0")) |
True if exception is EPP_ERROR.
#define IS_NO_MESSAGES | ( | _ev | ) | (!strcmp((_ev)->_id, "IDL:ccReg/EPP/NoMessages:1.0")) |
True if exception is NO_MESSAGES.
#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.
#define MAX_RETRIES 3 |
Maximum number of retries when connection failure occurs before the failure is announced to a caller.
#define raised_exception | ( | ev | ) | ((ev)->_major != CORBA_NO_EXCEPTION) |
Quick test if corba exception was raised.
#define RETR_SLEEP 100000 |
Number of microseconds between retries when connection failure occurs.
typedef void* service_EPP |
Reference to EPP CORBA service
typedef void* service_Logger |
Reference to fred-logd CORBA service
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. |
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. |
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. |
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. |
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. |
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. |