fred-mod-eppd
Macros | Functions
/build/mod-eppd-2.21.1/epp-client.c File Reference
#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)
 

Functions

char * wrap_str (const char *str)
 
ccReg_EppParamsinit_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)
 
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)
 
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)
 
int info_domain_data_copy (epp_context *epp_ctx, epps_info_domain *info_domain, ccReg_Domain *c_domain, CORBA_Environment *ev)
 
int info_nsset_data_copy (epp_context *epp_ctx, epps_info_nsset *info_nsset, ccReg_NSSet *c_nsset)
 
int info_keyset_data_copy (epp_context *epp_ctx, epps_info_keyset *info_keyset, ccReg_KeySet *c_keyset)
 
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_CloseSession (epp_context *epp_ctx, service_EPP service, unsigned long long loginid)
 

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)

Clear errno variable to non-error state.

Function Documentation

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

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

Helper function for copy domain data from corba to internal structure

Parameters
epp_ctxEpp context
info_domainDestination domain data structure
c_domainSource domain data structure
evCorba exception

◆ info_keyset_data_copy()

int info_keyset_data_copy ( epp_context epp_ctx,
epps_info_keyset info_keyset,
ccReg_KeySet c_keyset 
)

Helper function for copy keyset data from corba to internal structure

Parameters
epp_ctxEpp context
info_keysetDestination keyset data structure
c_keysetSource keyset data structure

◆ info_nsset_data_copy()

int info_nsset_data_copy ( epp_context epp_ctx,
epps_info_nsset info_nsset,
ccReg_NSSet c_nsset 
)

Helper function for copy nsset data from corba to internal structure

Parameters
epp_ctxEpp context
info_nssetDestination nsset data structure
c_nssetSource nsset data structure

◆ 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.