fred-mod-eppd-2.20.1
Macros | Functions | Variables
epp-client.c File Reference

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

#include <ORBitservices/CosNaming.h>
#include <assert.h>
#include <orbit/orbit.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "epp-client.h"
#include "epp_common.h"
Include dependency graph for epp-client.c:

Macros

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

Functions

static int err_idl2epp (int idlcode)
 Translate error code from IDL code to mod_eppd's code. More...
 
static int err_epp2idl (int eppcode)
 Translate error code from mod_eppd's code to IDL code. More...
 
char * wrap_str (const char *str)
 Function wraps strings passed from XML parser into strings accepted by CORBA. More...
 
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. More...
 
static char * unwrap_str (void *pool, const char *str, int *cerrno)
 Function unwraps strings passed through CORBA - empty strings are transformed to NULL strings. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static corba_status handle_exception (epp_context *epp_ctx, epp_command_data *cdata, CORBA_Environment *ev)
 Common code for handling exceptions from corba calls. More...
 
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. 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 *certID, 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...
 
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. More...
 
static epp_PrivacyPolicy compute_epp_PrivacyPolicy (ccReg_PrivacyPolicy src)
 
static ccReg_PrivacyPolicy epp_PrivacyPolicy_to_ccReg_PrivacyPolicy (epp_PrivacyPolicy src)
 
static int info_contact_data_copy (epp_context *epp_ctx, epps_info_contact *info_contact, const ccReg_Contact *c_contact, CORBA_Environment *ev)
 Helper function for copy contact data from corba to internal structure. More...
 
static ccReg_ControlledPrivacyDataMask epp_controlled_privacy_data_mask_to_ccReg_ControlledPrivacyDataMask (epp_controlled_privacy_data_mask src)
 
static corba_status epp_call_info_contact (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, ccReg_TID request_id, epp_command_data *cdata)
 EPP info contact. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static corba_status epp_call_poll_req (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, ccReg_TID request_id, epp_command_data *cdata)
 EPP poll request. More...
 
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. More...
 
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. More...
 
static ccReg_identtyp convIdentType (epp_identType our_ident)
 Convert our SSN enum to IDL's SSNtyp enum. More...
 
static corba_status epp_call_create_contact (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, ccReg_TID request_id, epp_command_data *cdata)
 EPP create contact. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. 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_CloseSession (epp_context *epp_ctx, service_EPP service, unsigned long long loginid)
 Let the CR know that client has closed tcp session. More...
 

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.

Macro Definition Documentation

◆ CLEAR_CERRNO

#define CLEAR_CERRNO (   _cerrno)    (_cerrno = 0)

Function Documentation

◆ convIdentType()

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

◆ create_dummy_answer()

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 CORBA_INT_ERROR, epp_strdup(), 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_dummy(), and handle_exception().

◆ epilog_failure()

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

◆ epilog_success()

static corba_status epilog_success ( epp_context epp_ctx,
epp_command_data cdata,
ccReg_Response *  response 
)
static

This is common routine for all corba function calls (except hello call) executed at the end of command.

Structure response is freed in any case (success or failure).

Parameters
epp_ctxEpp context.
cdataCommand input and output data.
responseResponse returned from CORBA call.
Returns
CORBA status.

References CLEAR_CERRNO, CORBA_INT_ERROR, CORBA_OK, epp_command_data::msg, epp_command_data::rc, epp_command_data::svTRID, and unwrap_str_req().

◆ epp_call_check()

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_command_data::data, and epp_command_data::xml_in.

◆ epp_call_CloseSession()

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

◆ epp_call_cmd()

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 EPP_DEBUG, epplog(), and epp_command_data::type.

◆ epp_call_create_contact()

static corba_status epp_call_create_contact ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
ccReg_TID  request_id,
epp_command_data cdata 
)
static

◆ epp_call_create_domain()

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

EPP create domain.

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

References epp_command_data::data, epps_create_domain::name, and epp_command_data::xml_in.

◆ epp_call_create_keyset()

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

EPP create keyset.

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

References epp_dnskey::alg, epps_create_keyset::authInfo, CORBA_INT_ERROR, epp_command_data::data, epp_dnskey::flags, epps_create_keyset::id, epps_create_keyset::keys, epp_dnskey::protocol, epp_dnskey::public_key, q_content, q_foreach, q_length, epps_create_keyset::tech, wrap_str(), and epp_command_data::xml_in.

◆ epp_call_create_nsset()

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

EPP create nsset.

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

References epp_ns::addr, epps_create_nsset::authInfo, CORBA_INT_ERROR, epp_command_data::data, epps_create_nsset::id, epp_ns::name, epps_create_nsset::ns, q_content, q_foreach, q_length, epps_create_nsset::tech, wrap_str(), and epp_command_data::xml_in.

◆ epp_call_creditinfo()

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 epp_command_data::data, and epp_command_data::xml_in.

◆ epp_call_delete()

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::data, and epp_command_data::xml_in.

◆ epp_call_dummy()

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(), EPP_ERROR, epplog(), err_epp2idl(), epp_command_data::errors, handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, q_content, q_foreach, q_length, raised_exception, epp_command_data::rc, RETR_SLEEP, epp_error::spec, and wrap_str().

◆ epp_call_getInfoResults()

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 epp_command_data::data, and epp_command_data::xml_in.

◆ epp_call_hello()

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

◆ epp_call_info()

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::data, and epp_command_data::xml_in.

◆ epp_call_info_contact()

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

EPP info contact.

Parameters
epp_ctxEpp context.
serviceEPP service.
loginidSession identifier.
request_idfred-logd request ID
xml_schemaentities enabled in xml schemas
cdataData from xml request.
Returns
Status.

References epp_command_data::data, epps_info_contact::id, and epp_command_data::xml_in.

◆ epp_call_info_domain()

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::data, epps_info_domain::name, and epp_command_data::xml_in.

◆ epp_call_info_keyset()

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::data, epps_info_keyset::id, and epp_command_data::xml_in.

◆ epp_call_info_nsset()

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::data, epps_info_nsset::id, and epp_command_data::xml_in.

◆ epp_call_list()

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 epp_command_data::data, and epp_command_data::xml_in.

◆ epp_call_login()

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, EPP_DEBUG, epplog(), epps_login::lang, epps_login::newPW, epp_command_data::noresdata, epps_login::pw, wrap_str(), and epp_command_data::xml_in.

Referenced by call_login().

◆ epp_call_logout()

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_DEBUG, epplog(), epp_command_data::noresdata, and epp_command_data::xml_in.

◆ epp_call_poll_ack()

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 epp_command_data::data, epps_poll_ack::msgid, and epp_command_data::xml_in.

◆ epp_call_poll_req()

static corba_status epp_call_poll_req ( epp_context epp_ctx,
service_EPP  service,
unsigned long long  loginid,
ccReg_TID  request_id,
epp_command_data cdata 
)
static

EPP poll request.

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

References epp_command_data::data, and epp_command_data::xml_in.

◆ epp_call_renew_domain()

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

EPP renew domain.

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

References epps_renew::curExDate, epp_command_data::data, epps_renew::name, epps_renew::period, epps_renew::unit, wrap_str(), and epp_command_data::xml_in.

◆ epp_call_sendauthinfo()

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::data, and epp_command_data::xml_in.

◆ epp_call_test_nsset()

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::data, and epp_command_data::xml_in.

◆ epp_call_transfer()

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, CORBA_INT_ERROR, epp_command_data::data, epps_transfer::id, wrap_str(), and epp_command_data::xml_in.

◆ epp_call_update_contact()

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

◆ epp_call_update_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 
)
static

◆ epp_call_update_keyset()

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

◆ epp_call_update_nsset()

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

EPP update nsset.

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

References epps_update_nsset::add_ns, epps_update_nsset::add_tech, epp_ns::addr, epps_update_nsset::authInfo, epp_command_data::data, epps_update_nsset::id, epp_ns::name, q_content, q_foreach, q_length, epps_update_nsset::rem_ns, epps_update_nsset::rem_tech, wrap_str(), wrap_str_upd(), and epp_command_data::xml_in.

◆ err_epp2idl()

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

◆ err_idl2epp()

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

◆ handle_exception()

static corba_status handle_exception ( epp_context epp_ctx,
epp_command_data cdata,
CORBA_Environment *  ev 
)
static

Common code for handling exceptions from corba calls.

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

References CLEAR_CERRNO, CORBA_INT_ERROR, CORBA_OK, create_dummy_answer(), epilog_failure(), EPP_ERROR, epplog(), IS_EPP_ERROR, IS_NO_MESSAGES, epp_command_data::msg, epp_command_data::rc, epp_command_data::svTRID, and unwrap_str_req().

Referenced by epp_call_dummy().

◆ info_contact_data_copy()

static int info_contact_data_copy ( epp_context epp_ctx,
epps_info_contact info_contact,
const ccReg_Contact *  c_contact,
CORBA_Environment *  ev 
)
static

◆ info_domain_data_copy()

int info_domain_data_copy ( epp_context epp_ctx,
epps_info_domain info_domain,
ccReg_Domain *  c_domain,
CORBA_Environment *  ev 
)

◆ info_keyset_data_copy()

int info_keyset_data_copy ( epp_context epp_ctx,
epps_info_keyset info_keyset,
ccReg_KeySet *  c_keyset,
CORBA_Environment *  ev 
)

◆ info_nsset_data_copy()

int info_nsset_data_copy ( epp_context epp_ctx,
epps_info_nsset info_nsset,
ccReg_NSSet *  c_nsset,
CORBA_Environment *  ev 
)

◆ unwrap_str()

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_hello(), info_contact_data_copy(), info_domain_data_copy(), info_keyset_data_copy(), and info_nsset_data_copy().

◆ unwrap_str_req()

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(), handle_exception(), info_contact_data_copy(), info_domain_data_copy(), info_keyset_data_copy(), and info_nsset_data_copy().

◆ wrap_str()

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_create_contact(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_dummy(), epp_call_login(), epp_call_renew_domain(), epp_call_transfer(), epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), and epp_call_update_nsset().

◆ wrap_str_upd()

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