fred-mod-eppd
|
Go to the source code of this file.
Enumerations | |
enum | parser_status { PARSER_CMD_LOGIN, PARSER_CMD_LOGOUT, PARSER_CMD_OTHER, PARSER_NOT_VALID, PARSER_HELLO, PARSER_NOT_COMMAND, PARSER_NOT_XML, PARSER_ESCHEMA, PARSER_EINTERNAL } |
enum | epp_red_command_type { EPP_RED_UNKNOWN_CMD, EPP_RED_LOGIN, EPP_RED_LOGOUT, EPP_RED_CHECK, EPP_RED_INFO, EPP_RED_POLL, EPP_RED_TRANSFER, EPP_RED_CREATE, EPP_RED_DELETE, EPP_RED_RENEW, EPP_RED_UPDATE, EPP_RED_EXTCMD, EPP_RED_HELLO } |
Functions | |
void * | epp_parser_init (const char *url_schema) |
void | epp_parser_init_cleanup (void *schema) |
parser_status | epp_parse_command (epp_context *epp_ctx, int loggedin, void *schema, const char *request, unsigned bytes, epp_command_data **cdata, const eppd_server_xml_conf *xml_schema, epp_red_command_type *cmd_type) |
void | epp_parser_request_cleanup (void *cdata_arg) |
Interface to component which parses xml documents and returns document's content in form of a structure.
enum epp_red_command_type |
Enumeration of all implemented EPP commands as defined in rfc. It is REDuced form - without object suffix. And is used as hash value in command hash table for fast recognition of commands.
enum parser_status |
EPP parser status values.
The ordering of items in enumeration is important, because relation greater, smaller is used for resolution between cases when connection should be closed and when it shouldn't.
parser_status epp_parse_command | ( | epp_context * | epp_ctx, |
int | loggedin, | ||
void * | schema, | ||
const char * | request, | ||
unsigned | bytes, | ||
epp_command_data ** | cdata, | ||
const eppd_server_xml_conf * | xml_schema, | ||
epp_red_command_type * | cmd_type | ||
) |
This is the main workhorse of parser component. It's task is to parse request and get data saved in structure.
epp_ctx | Epp context (pool, connection and session id). |
loggedin | True if client is logged in. |
schema | Parsed xml schema used for validation. |
request | Request to be processed. |
bytes | Length of the request. |
cdata | Output of parsing stage (xml data converted to structure). |
cmd_type | Output of commnad type (used also by logging) |
void* epp_parser_init | ( | const char * | url_schema | ) |
This routine initializes libxml's parser, hash table for command recognition and parses xml schema, which is returned.
url_schema | XML schema location. |
void epp_parser_init_cleanup | ( | void * | schema | ) |
This will cleanup command hash table, libxml's parser and release parsed xml schema.
schema | Parsed xml schema. |
void epp_parser_request_cleanup | ( | void * | cdata_arg | ) |
This will cleanup xpath context and parsed document tree.
cdata_arg | cdata structure containing items to be cleaned up. |