fred-mod-eppd-2.14.1
Defines | Functions | Variables
epp-client.c File Reference

Corba component is used for communication between apache module and central repository. More...

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <orbit/orbit.h>
#include <ORBitservices/CosNaming.h>
#include "epp_common.h"
#include "epp-client.h"

Defines

#define CLEAR_CERRNO(_cerrno)   (_cerrno = 0)
 Clear errno variable to non-error state.

Functions

static ccReg_Disclose convDiscl (char flag)
 Function for conversion of our disclose flag to IDL's disclose flag.
static char convDisclBack (ccReg_Disclose discl)
static int err_idl2epp (int idlcode)
 Translate error code from IDL code to mod_eppd's code.
static int err_epp2idl (int eppcode)
 Translate error code from mod_eppd's code to IDL code.
char * wrap_str (const char *str)
 Function wraps strings passed from XML parser into strings accepted by CORBA.
static char * wrap_str_upd (const char *str)
 Function works the same way as wrap_str(), but empty strings are substituted by IDL-defined string with special meaning.
static char * unwrap_str (void *pool, const char *str, int *cerrno)
 Function unwraps strings passed through CORBA - empty strings are transformed to NULL strings.
static char * unwrap_str_req (epp_context *epp_ctx, const char *str, int *cerrno, const char *id)
 Does the same thing as unwrap_str() but in addition input string is required not to be empty.
ccReg_EppParams * init_epp_params (const ccReg_TID login_id, const ccReg_TID request_id, const char *xml_in, const char *clTRID)
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.
static corba_status create_dummy_answer (epp_context *epp_ctx, epp_command_data *cdata)
 This function creates answer even though it has not enough data for that from CORBA server.
static corba_status epilog_success (epp_context *epp_ctx, epp_command_data *cdata, ccReg_Response *response)
 This is common routine for all corba function calls (except hello call) executed at the end of command.
static int epilog_failure (epp_context *epp_ctx, epp_command_data *cdata, ccReg_EPP_EppError *exc)
 This function is called in case of invalid parameter which is signalled to module by throwing InvalidParam exception.
static corba_status handle_exception (epp_context *epp_ctx, epp_command_data *cdata, CORBA_Environment *ev)
 Common code for handling exceptions from corba calls.
static corba_status epp_call_dummy (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 "dummy" call is dummy because it only retrieves unique svTRID and error message from central repository and by this way informs repository about the error.
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 *certID, epp_command_data *cdata)
 Call corba login function, which sets up a session variables.
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.
static corba_status epp_call_check (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata, epp_object_type obj)
 EPP check for domain, nsset and contact is so similar that it is worth of having the code in one function and pass object type as parameter.
static corba_status epp_call_info_contact (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP info contact.
int info_domain_data_copy (epp_context *epp_ctx, epps_info_domain *info_domain, ccReg_Domain *c_domain, CORBA_Environment *ev)
 Helper function for copy domain data from corba to internal structure.
static corba_status epp_call_info_domain (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP info domain.
int info_nsset_data_copy (epp_context *epp_ctx, epps_info_nsset *info_nsset, ccReg_NSSet *c_nsset, CORBA_Environment *ev)
 Helper function for copy nsset data from corba to internal structure.
static corba_status epp_call_info_nsset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP info nsset.
int info_keyset_data_copy (epp_context *epp_ctx, epps_info_keyset *info_keyset, ccReg_KeySet *c_keyset, CORBA_Environment *ev)
 Helper function for copy keyset data from corba to internal structure.
static corba_status epp_call_info_keyset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP info keyset.
static corba_status epp_call_poll_req (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP poll request.
static corba_status epp_call_poll_ack (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP poll acknowledge.
static corba_status epp_call_create_domain (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP create domain.
static ccReg_identtyp convIdentType (epp_identType our_ident)
 Convert our SSN enum to IDL's SSNtyp enum.
static corba_status epp_call_create_contact (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP create contact.
static corba_status epp_call_create_nsset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP create nsset.
static corba_status epp_call_create_keyset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP create keyset.
static corba_status epp_call_delete (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata, epp_object_type obj)
 EPP delete for domain, nsset and contact is so similar that it is worth of having the code in one function and pass object type as parameter.
static corba_status epp_call_renew_domain (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP renew domain.
static corba_status epp_call_update_domain (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP update domain.
static corba_status epp_call_update_contact (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP update contact.
static corba_status epp_call_update_nsset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP update nsset.
static corba_status epp_call_update_keyset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 EPP update keyset.
static corba_status epp_call_transfer (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata, epp_object_type obj)
 EPP transfer for domain, contact, nsset and keyset is so similar that it is worth of having the code in one function and pass object type as parameter.
static corba_status epp_call_list (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata, epp_object_type obj)
 List command for domain, contact and nsset is so similar that it is worth of having the code in one function and pass object type as parameter.
static corba_status epp_call_sendauthinfo (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata, epp_object_type obj)
 SendAuthInfo command.
static corba_status epp_call_creditinfo (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 Retrieve information about available credit of registrar.
static corba_status epp_call_test_nsset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 Issue technical test on nsset.
static corba_status epp_call_info (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata, ccReg_InfoType c_infotype)
 Info functions handler.
static corba_status epp_call_getInfoResults (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
 Get results of info search.
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.
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.

Variables

static int error_translator [][2]
 Error code translation table.

Detailed Description

Corba component is used for communication between apache module and central repository.

Input are self-descriptive data stored in structure ussually called cdata. Output data are returned via the same structure. Purpose of this module is to hide the complexity of communication behind simple API defined in epp-client.h. The function names are analogical to names defined in EPP protocol standard.


Define Documentation

#define CLEAR_CERRNO (   _cerrno)    (_cerrno = 0)

Function Documentation

static ccReg_Disclose convDiscl ( char  flag) [static]

Function for conversion of our disclose flag to IDL's disclose flag.

Parameters:
flagDisclose flag to be converted.
Returns:
Disclose flag of type defined in IDL.

Referenced by epp_call_create_contact(), epp_call_create_domain(), epp_call_renew_domain(), epp_call_update_contact(), and epp_call_update_domain().

static ccReg_identtyp convIdentType ( epp_identType  our_ident) [static]

Convert our SSN enum to IDL's SSNtyp enum.

Parameters:
our_identOur ssn's type.
Returns:
SSN type as defined in IDL.

References ident_BIRTHDAY, ident_ICO, ident_MPSV, ident_OP, and ident_PASSPORT.

Referenced by epp_call_create_contact(), and epp_call_update_contact().

static corba_status create_dummy_answer ( epp_context epp_ctx,
epp_command_data cdata 
) [static]

This function creates answer even though it has not enough data for that from CORBA server.

This behaviour is in conflict with EPP standard, but it was enforced by users and administrators.

Parameters:
epp_ctxEpp context.
cdataEpp data.
Returns:
Corba status.

References qhead::body, CORBA_ERROR, CORBA_INT_ERROR, qhead::count, qhead::cur, epp_strdup(), epp_command_data::errors, epp_command_data::msg, epp_command_data::noresdata, epp_context::pool, epp_command_data::rc, epp_command_data::svTRID, and epp_command_data::type.

Referenced by epp_call_check(), epp_call_dummy(), and handle_exception().

static int epilog_failure ( epp_context epp_ctx,
epp_command_data cdata,
ccReg_EPP_EppError *  exc 
) [static]

This function is called in case of invalid parameter which is signalled to module by throwing InvalidParam exception.

Parameters:
epp_ctxEpp context.
cdataEPP data.
excData of thrown exception.
Returns:
0 if successful, 1 if required parameter is missing, 2 if malloc failed.

References CLEAR_CERRNO, epp_malloc(), err_idl2epp(), epp_command_data::errors, epp_command_data::msg, epp_command_data::noresdata, epp_context::pool, epp_error::position, q_add(), epp_command_data::rc, epp_error::reason, epp_error::spec, epp_command_data::svTRID, and unwrap_str_req().

Referenced by handle_exception().

static corba_status epilog_success ( epp_context epp_ctx,
epp_command_data cdata,
ccReg_Response *  response 
) [static]
static corba_status epp_call_check ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata,
epp_object_type  obj 
) [static]

EPP check for domain, nsset and contact is so similar that it is worth of having the code in one function and pass object type as parameter.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request_id
cdataData from xml request.
objObject type (see epp_object_type)
Returns:
Status.

References epp_avail::avail, epps_check::avails, CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, create_dummy_answer(), epp_command_data::data, epilog_success(), EPP_ERROR, epp_malloc(), epplog(), handle_exception(), epps_check::ids, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_context::pool, q_add(), q_content, q_foreach, q_length, raised_exception, epp_avail::reason, RETR_SLEEP, unwrap_str(), wrap_str(), and epp_command_data::xml_in.

Referenced by epp_call_cmd().

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.

Parameters:
epp_ctxEpp context (pool, connection and session id).
serviceEPP service.
loginidLogin 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.

Parameters:
epp_ctxEpp context (pool, connection and session id).
serviceEPP service.
loginidSession identifier
request_idfred-logd request ID
cdataData from parsed xml command.
Returns:
Status.

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().

static corba_status epp_call_create_contact ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]
static corba_status epp_call_create_domain ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]
static corba_status epp_call_create_keyset ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]
static corba_status epp_call_create_nsset ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]
static corba_status epp_call_creditinfo ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]

Retrieve information about available credit of registrar.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
Returns:
Status.

References CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, epp_zonecredit::credit, epp_command_data::data, epilog_success(), epp_malloc(), handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_context::pool, q_add(), raised_exception, RETR_SLEEP, unwrap_str(), epp_command_data::xml_in, epp_zonecredit::zone, and epps_creditInfo::zonecredits.

Referenced by epp_call_cmd().

static corba_status epp_call_delete ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata,
epp_object_type  obj 
) [static]

EPP delete for domain, nsset and contact is so similar that it is worth of having the code in one function and pass object type as parameter.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
objObject type (see epp_object_type)
Returns:
Status.

References epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, RETR_SLEEP, and epp_command_data::xml_in.

Referenced by epp_call_cmd().

static corba_status epp_call_dummy ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]

"dummy" call is dummy because it only retrieves unique svTRID and error message from central repository and by this way informs repository about the error.

This call is used for failures detected already on side of mod_eppd.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
Returns:
Status.

References CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, create_dummy_answer(), epilog_success(), EPP_ERROR, epp_strcat(), epplog(), err_epp2idl(), epp_command_data::errors, handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_command_data::noresdata, epp_context::pool, q_content, q_foreach, q_length, raised_exception, epp_command_data::rc, epp_error::reason, RETR_SLEEP, epp_error::spec, unwrap_str(), and wrap_str().

Referenced by epp_call_cmd().

static corba_status epp_call_getInfoResults ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]

Get results of info search.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
Returns:
Status.

References CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_list::handles, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_context::pool, q_add(), raised_exception, RETR_SLEEP, unwrap_str(), and epp_command_data::xml_in.

Referenced by epp_call_cmd().

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.

Parameters:
epp_ctxEpp context (pool, connection and session id).
serviceEPP service.
versionOutput parameter version string.
curdateOutput parameter current date.
Returns:
If successfull 1 and 0 if corba function call failed.

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().

static corba_status epp_call_info ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata,
ccReg_InfoType  c_infotype 
) [static]

Info functions handler.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
c_infotypeType of info query.
Returns:
Status.

References epp_command_data::clTRID, CORBA_INT_ERROR, epps_info::count, epp_command_data::data, epilog_success(), epps_info::handle, handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, RETR_SLEEP, wrap_str(), and epp_command_data::xml_in.

Referenced by epp_call_cmd().

static corba_status epp_call_info_contact ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]
static corba_status epp_call_info_domain ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]

EPP info domain.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
Returns:
Status.

References epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), info_domain_data_copy(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epps_info_domain::name, raised_exception, RETR_SLEEP, and epp_command_data::xml_in.

Referenced by epp_call_cmd().

static corba_status epp_call_info_keyset ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]

EPP info keyset.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
Returns:
Status.

References epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_info_keyset::id, info_keyset_data_copy(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, RETR_SLEEP, and epp_command_data::xml_in.

Referenced by epp_call_cmd().

static corba_status epp_call_info_nsset ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]

EPP info nsset.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
Returns:
Status.

References epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_info_nsset::id, info_nsset_data_copy(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, RETR_SLEEP, and epp_command_data::xml_in.

Referenced by epp_call_cmd().

static corba_status epp_call_list ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata,
epp_object_type  obj 
) [static]

List command for domain, contact and nsset is so similar that it is worth of having the code in one function and pass object type as parameter.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
objObject type (see epp_object_type).
Returns:
Status.

References CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_list::handles, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_context::pool, q_add(), raised_exception, RETR_SLEEP, unwrap_str(), and epp_command_data::xml_in.

Referenced by epp_call_cmd().

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.

Parameters:
epp_ctxEpp context (pool, connection and session id).
serviceEPP service.
loginidIf successfully logged in, the session identifier assigned by server will be stored in this parameter.
request_idfred-logd request ID
langIf successfully logged in, the selected language will be stored in this parameter.
fingerprintFingerprint of client's certificate.
cdataData from parsed xml command.
Returns:
Status.

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.

Parameters:
epp_ctxEpp context (pool, connection and session id).
serviceEPP service.
loginidSession identifier (may change inside).
request_idfred-logd request ID
cdataData from parsed xml command.
Returns:
Status.

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().

static corba_status epp_call_poll_ack ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]

EPP poll acknowledge.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
Returns:
Status.

References CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, epps_poll_ack::count, epp_command_data::data, epilog_success(), handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epps_poll_ack::msgid, epps_poll_ack::newmsgid, epp_context::pool, raised_exception, RETR_SLEEP, unwrap_str(), and epp_command_data::xml_in.

Referenced by epp_call_cmd().

static corba_status epp_call_poll_req ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]
static corba_status epp_call_renew_domain ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]
static corba_status epp_call_sendauthinfo ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata,
epp_object_type  obj 
) [static]

SendAuthInfo command.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
objObject type (see epp_object_type).
Returns:
Status.

References epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_sendAuthInfo::id, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, RETR_SLEEP, wrap_str(), and epp_command_data::xml_in.

Referenced by epp_call_cmd().

static corba_status epp_call_test_nsset ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]

Issue technical test on nsset.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
Returns:
Status.

References epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_test::id, IS_NOT_COMM_FAILURE_EXCEPTION, epps_test::level, MAX_RETRIES, epps_test::names, q_content, q_foreach, q_length, raised_exception, RETR_SLEEP, wrap_str(), and epp_command_data::xml_in.

Referenced by epp_call_cmd().

static corba_status epp_call_transfer ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata,
epp_object_type  obj 
) [static]

EPP transfer for domain, contact, nsset and keyset is so similar that it is worth of having the code in one function and pass object type as parameter.

Parameters:
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
cdataData from xml request.
objObject type (see epp_object_type).
Returns:
Status.

References epps_transfer::authInfo, epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_transfer::id, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, RETR_SLEEP, wrap_str(), and epp_command_data::xml_in.

Referenced by epp_call_cmd().

static corba_status epp_call_update_contact ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]
static corba_status epp_call_update_domain ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]
static corba_status epp_call_update_keyset ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]
static corba_status epp_call_update_nsset ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
const ccReg_TID  request_id,
epp_command_data cdata 
) [static]
static int err_epp2idl ( int  eppcode) [static]

Translate error code from mod_eppd's code to IDL code.

Parameters:
eppcodemod_eppd's code.
Returns:
IDL code.

References error_translator.

Referenced by epp_call_dummy().

static int err_idl2epp ( int  idlcode) [static]

Translate error code from IDL code to mod_eppd's code.

Parameters:
idlcodeIDL code.
Returns:
mod_eppd's code.

References error_translator.

Referenced by epilog_failure().

static corba_status handle_exception ( epp_context epp_ctx,
epp_command_data cdata,
CORBA_Environment *  ev 
) [static]
int info_domain_data_copy ( epp_context epp_ctx,
epps_info_domain info_domain,
ccReg_Domain *  c_domain,
CORBA_Environment *  ev 
)
int info_keyset_data_copy ( epp_context epp_ctx,
epps_info_keyset info_keyset,
ccReg_KeySet *  c_keyset,
CORBA_Environment *  ev 
)
int info_nsset_data_copy ( epp_context epp_ctx,
epps_info_nsset info_nsset,
ccReg_NSSet *  c_nsset,
CORBA_Environment *  ev 
)
static char* unwrap_str ( void *  pool,
const char *  str,
int *  cerrno 
) [static]

Function unwraps strings passed through CORBA - empty strings are transformed to NULL strings.

Parameters:
poolMemory pool to allocate memory from.
strInput string.
cerrnoSet to 1 if malloc failed.
Returns:
Output string.

References epp_strdup().

Referenced by epp_call_check(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_creditinfo(), epp_call_dummy(), epp_call_getInfoResults(), epp_call_hello(), epp_call_info_contact(), epp_call_list(), epp_call_poll_ack(), epp_call_poll_req(), info_domain_data_copy(), info_keyset_data_copy(), and info_nsset_data_copy().

static char* unwrap_str_req ( epp_context epp_ctx,
const char *  str,
int *  cerrno,
const char *  id 
) [static]

Does the same thing as unwrap_str() but in addition input string is required not to be empty.

If it is empty, an error message is logged.

Parameters:
epp_ctxEpp context used for logging and memory allocation.
strInput string.
cerrnoSet to 1 if malloc failed.
idIdentifier of string used in error message.
Returns:
Output string.

References EPP_ERROR, epp_strdup(), epplog(), and epp_context::pool.

Referenced by epilog_failure(), epilog_success(), epp_call_create_contact(), epp_call_create_domain(), epp_call_info_contact(), epp_call_renew_domain(), handle_exception(), info_domain_data_copy(), info_keyset_data_copy(), and info_nsset_data_copy().

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().

Parameters:
strInput string.
Returns:
Output 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(), and epp_call_update_nsset().

static char* wrap_str_upd ( const char *  str) [static]

Function works the same way as wrap_str(), but empty strings are substituted by IDL-defined string with special meaning.

In update functions we need to distinguish between empty string and NULL.

Parameters:
strInput string.
Returns:
Output string.

Referenced by epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), and epp_call_update_nsset().