fred-mod-eppd
|
#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"
Macros | |
#define | CLEAR_CERRNO(_cerrno) (_cerrno = 0) |
Functions | |
char * | wrap_str (const char *str) |
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) |
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) |
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 CLEAR_CERRNO | ( | _cerrno | ) | (_cerrno = 0) |
Clear errno variable to non-error state.
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. |
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
epp_ctx | Epp context |
info_domain | Destination domain data structure |
c_domain | Source domain data structure |
ev | Corba exception |
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
epp_ctx | Epp context |
info_keyset | Destination keyset data structure |
c_keyset | Source keyset data structure |
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
epp_ctx | Epp context |
info_nsset | Destination nsset data structure |
c_nsset | Source nsset data structure |
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. |