Go to the documentation of this file.
109 epp_context *epp_ctx,
int loggedin,
void *schema,
const char *request,
unsigned bytes,
static void parse_login(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP login command.
Definition: epp_parser.c:637
Poll request parameters.
Definition: epp_common.h:650
char * name
fqdn of nameserver.
Definition: epp_common.h:422
char * id
Id of transfered object.
Definition: epp_common.h:859
int period
Registration period in months.
Definition: epp_common.h:755
#define NS_EXTRAADDR
Our custom namespace used for extra contact address extension.
Definition: epp_xmlcommon.h:47
#define XERR_LIBXML
Error in function from libxml library.
Definition: epp_parser.c:71
static void parse_renew(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP renew command.
Definition: epp_parser.c:1621
int parse_boolean(char *str)
Parse a boolean value entered either as a number or as a string (true/false)
Definition: epp_parser.c:384
Definition: epp_common.h:500
char * id
Id of wanted keyset (input).
Definition: epp_common.h:777
Parameters of obsolete command 'list' and getResults command.
Definition: epp_common.h:884
qhead extensions
List of domain extensions.
Definition: epp_common.h:830
char * sp
State or province.
Definition: epp_common.h:364
parser_status
EPP parser status values.
Definition: epp_parser.h:33
void epp_parser_request_cleanup(void *cdata_arg)
This will cleanup xpath context and parsed document tree.
Definition: epp_parser.c:587
char * name
FQDN of wanted domain (input).
Definition: epp_common.h:592
qhead rem_admin
Admin contacts to be removed.
Definition: epp_common.h:825
qhead admin
Admin contact for domain.
Definition: epp_common.h:752
static void parse_create_keyset(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP create-keyset command.
Definition: epp_parser.c:1365
qhead ids
IDs of checked objects.
Definition: epp_common.h:559
@ ident_ICO
ICO.
Definition: epp_common.h:442
#define XERR_CONSTR
Constraints given by caller were not fulfilled.
Definition: epp_parser.c:73
static parser_status parse_extension(void *pool, epp_command_data *cdata, xmlXPathContextPtr xpathCtx)
Generic parser of EPP extension section.
Definition: epp_parser.c:3185
char * name
Name.
Definition: epp_common.h:360
static void parse_ext_extraaddr_create(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of extraaddr extension in context of create contact command.
Definition: epp_parser.c:2795
char * authInfo
Authorization information.
Definition: epp_common.h:860
Renew domain parameters.
Definition: epp_common.h:791
static void parse_delete(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP delete command.
Definition: epp_parser.c:1539
epp_red_command_type
Enumeration of all implemented EPP commands as defined in rfc.
Definition: epp_parser.h:62
#define NS_NSSET
Our custom namespace used for nsset object.
Definition: epp_xmlcommon.h:39
qhead errors
List of validation errors or errors from central repository.
Definition: epp_common.h:923
qhead extensions
List of domain extensions.
Definition: epp_common.h:797
char * id
Handle of object.
Definition: epp_common.h:866
static void parse_check(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP check command.
Definition: epp_parser.c:705
void * epp_parser_init(const char *url_schema)
This routine initializes libxml's parser, hash table for command recognition and parses xml schema,...
Definition: epp_parser.c:532
static void parse_sendAuthInfo(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of command sendAuthInfo.
Definition: epp_parser.c:2461
qhead exturi
currently not used
Definition: epp_common.h:552
void epp_parser_init_cleanup(void *schema)
This will cleanup command hash table, libxml's parser and release parsed xml schema.
Definition: epp_parser.c:580
static void parse_update_keyset(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP update-keyset command.
Definition: epp_parser.c:2021
epp_ext_mailingAddr ext_mailing_addr
Extensions for mailing contact addresses.
Definition: epp_common.h:506
Create nsset parameters.
Definition: epp_common.h:764
#define TEXT_CONTENT(_xpathObj, _i)
Get text content of an element.
Definition: epp_parser.c:101
qhead rem_tech
Technical contacts to be removed.
Definition: epp_common.h:838
#define XERR_OK
OK status.
Definition: epp_parser.c:70
static char cmd_hash_insert(const char *key, epp_command_type type)
Function inserts command in hash table.
Definition: epp_parser.c:461
static int xpath_count(xmlXPathContextPtr ctx, const char *expr, int *xerr)
Sometimes we want to know how many elements satisfying xpath expression are there or just to know if ...
Definition: epp_parser.c:191
Configuration of entities enabled in xml schemas.
Definition: epp_common.h:408
qhead rem_tmpcontact
Temporary contact used for migration.
Definition: epp_common.h:826
unsigned lang
Language.
Definition: epp_common.h:553
Nameserver has a name and possibly more than one ip address.
Definition: epp_common.h:420
Update nsset parameters.
Definition: epp_common.h:834
char * newPW
New password.
Definition: epp_common.h:550
@ VAL_EINTERNAL
Internal error (malloc failed).
Definition: epp_xmlcommon.h:74
char * reason
Human readable reason of error.
Definition: epp_common.h:221
static void parse_ext_extraaddr_update(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of extraaddr extension in context of update contact command.
Definition: epp_parser.c:2870
char * keyset
Keyset of domain.
Definition: epp_common.h:828
char * epp_strdup(void *pool, const char *str)
Duplicate string from argument, the memory will be allocated from memory pool.
Definition: mod_eppd.c:404
char * registrant
Registrant of domain.
Definition: epp_common.h:751
char * msgid
ID of acknoledged message.
Definition: epp_common.h:724
char * curExDate
Current expiration date.
Definition: epp_common.h:794
@ PARSER_CMD_LOGOUT
Logout command.
Definition: epp_parser.h:35
char * clID
Client ID.
Definition: epp_common.h:548
char * City
city
Definition: epp_common.h:474
@ ident_BIRTHDAY
Date of birth.
Definition: epp_common.h:443
int read_epp_dnskey(void *pool, xmlXPathContextPtr xpathCtx, epp_dnskey *key)
Read DNSKEY information from xml into epp_dnskey structure.
Definition: epp_parser.c:1440
@ ident_UNKNOWN
Unknown value can also mean undefined.
Definition: epp_common.h:438
char * keyset
Keyset for domain.
Definition: epp_common.h:754
All Info functions, which accept single key on input and count on output (domainsByNsset,...
Definition: epp_common.h:894
char * pw
Password.
Definition: epp_common.h:549
static char * get_attr(xmlNodePtr node, const char *name)
This function returns specified attribute value of given node.
Definition: epp_parser.c:119
char * org
Organization.
Definition: epp_common.h:361
static void parse_update_domain(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP update-domain command.
Definition: epp_parser.c:1680
char * name
Name of renewed domain.
Definition: epp_common.h:793
static void parse_create_domain(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP create-domain command.
Definition: epp_parser.c:986
char * name
FQDN of wanted domain (input).
Definition: epp_common.h:750
char * id
Id of wanted keyset (input).
Definition: epp_common.h:848
char * nsset
Nsset of domain.
Definition: epp_common.h:827
static void parse_info(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP info command + list command.
Definition: epp_parser.c:787
@ PARSER_CMD_LOGIN
Login command.
Definition: epp_parser.h:34
qhead add_tech
Technical contacts to be added.
Definition: epp_common.h:849
void * epp_parser_init(const char *url_schema)
This routine initializes libxml's parser, hash table for command recognition and parses xml schema,...
Definition: epp_parser.c:532
qhead objuri
currently not used
Definition: epp_common.h:551
static void parse_update_contact(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP update-contact command.
Definition: epp_parser.c:1758
static void parse_ext_enumval_update(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of enumval extension in context of update domain command.
Definition: epp_parser.c:2690
qhead tech
List of technical contacts for nsset.
Definition: epp_common.h:769
qhead add_ns
Nameservers to be added.
Definition: epp_common.h:839
char * id
Id of wanted nsset (input).
Definition: epp_common.h:615
EPP context is a group of variables used often together.
Definition: epp_common.h:45
char * public_key
base64 encoded public key
Definition: epp_common.h:432
void * epp_calloc(void *pool, unsigned size)
Allocate memory from memory pool and prezero it.
Definition: mod_eppd.c:386
qhead add_tech
Technical contacts to be added.
Definition: epp_common.h:837
static void parse_create(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP create command.
Definition: epp_parser.c:1475
#define NS_DOMAIN
Our custom namespace used for domain object.
Definition: epp_xmlcommon.h:37
#define NS_KEYSET
Our custom namespace used for keyset object.
Definition: epp_xmlcommon.h:41
unsigned char alg
algorithm type
Definition: epp_common.h:431
Test parameters.
Definition: epp_common.h:876
@ PARSER_NOT_COMMAND
Request is not a command nor hello frame.
Definition: epp_parser.h:46
static void parse_update_nsset(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP update-nsset command.
Definition: epp_parser.c:2173
eppd_server_xml_conf xml_schema
Entities enabled in xml schemas.
Definition: epp_common.h:930
char * clTRID
client's TRID
Definition: epp_common.h:911
void * data
Command data (Input + output parameters for all possible epp commands).
Definition: epp_common.h:935
static char * xpath_get1(void *pool, xmlXPathContextPtr ctx, const char *expr, int req, int *xerr)
A content of element described by xpath expression is returned.
Definition: epp_parser.c:224
void epp_parser_request_cleanup(void *cdata_arg)
This will cleanup xpath context and parsed document tree.
Definition: epp_parser.c:587
epp_ext_type extType
Identifier of extension.
Definition: epp_common.h:502
static void parse_create_contact(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP create-contact command.
Definition: epp_parser.c:1081
epp_errorspec
In case that central repository finds out that some parameter is bad, there has to be way how to prop...
Definition: epp_common.h:157
Create domain parameters.
Definition: epp_common.h:748
char * registrant
Registrant of domain.
Definition: epp_common.h:823
unsigned short flags
key properties.
Definition: epp_common.h:429
char * key
Hash key (command name).
Definition: epp_parser.c:417
#define NS_ENUMVAL
Our custom namespace used for enum validation extension.
Definition: epp_xmlcommon.h:45
char * Street2
street - line #2
Definition: epp_common.h:472
static unsigned char get_cmd_hash(const char *key)
Function for hashing of command name.
Definition: epp_parser.c:441
epp_command_type
Enumeration of codes of all EPP commands this module is able to handle.
Definition: epp_common.h:62
@ VAL_NOT_VALID
Document does not validate.
Definition: epp_xmlcommon.h:72
qhead rem_tech
Technical contacts to be removed.
Definition: epp_common.h:850
Login parameters.
Definition: epp_common.h:546
static void parse_create_nsset(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP create-nsset command.
Definition: epp_parser.c:1292
int level
Report level.
Definition: epp_common.h:771
int level
Report level.
Definition: epp_common.h:842
char * authInfo
Authorization information.
Definition: epp_common.h:757
@ PARSER_HELLO
Request is not command but <hello> frame this indicates that greeting should be generated.
Definition: epp_parser.h:42
Poll acknoledge parameters.
Definition: epp_common.h:722
qhead rem_dnskey
DNSKEYs to be removed.
Definition: epp_common.h:852
char * id
Id of wanted nsset (input).
Definition: epp_common.h:836
Update keyset parameters.
Definition: epp_common.h:846
qhead keys
List of DNS Key records.
Definition: epp_common.h:779
qhead ns
List of nameservers.
Definition: epp_common.h:768
epp_identType
Type of identification number used in contact object.
Definition: epp_common.h:436
Info domain parameters.
Definition: epp_common.h:590
char * Street1
street - line #1
Definition: epp_common.h:471
valid_status
Enumaration of statuses returned by validator.
Definition: epp_xmlcommon.h:70
qhead names
Fqdns of domains to be tested with nsset.
Definition: epp_common.h:879
epp_command_type val
Hash value (command type).
Definition: epp_parser.c:418
epp_errorspec spec
Specification of surrounding XML tags.
Definition: epp_common.h:212
Update domain parameters.
Definition: epp_common.h:820
#define XERR_ALLOC
Memory allocation failed.
Definition: epp_parser.c:72
qhead extensions
List of domain extensions.
Definition: epp_common.h:758
void * pool
Pool for allocations.
Definition: epp_common.h:47
#define HASH_SIZE_CMD
Size of hash table used for hashing command names.
Definition: epp_parser.c:57
char * StateOrProvince
state or province
Definition: epp_common.h:475
Definition: epp_common.h:392
char * handle
Search key.
Definition: epp_common.h:896
@ ident_PASSPORT
Number of passport.
Definition: epp_common.h:440
static void parse_ext_enumval_create(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of enumval extension in context of create domain command.
Definition: epp_parser.c:2637
char * id
Id of wanted nsset (input).
Definition: epp_common.h:766
void epp_parser_init_cleanup(void *schema)
This will cleanup command hash table, libxml's parser and release parsed xml schema.
Definition: epp_parser.c:580
epp_timeunit unit
Registration period's unit.
Definition: epp_common.h:796
Delete parameters.
Definition: epp_common.h:785
char * name
FQDN of wanted domain (input).
Definition: epp_common.h:822
epp_timeunit unit
Registration period's unit.
Definition: epp_common.h:756
char * id
Id of wanted keyset (input).
Definition: epp_common.h:634
int period
Renew period.
Definition: epp_common.h:795
char * id
ID of tested nsset.
Definition: epp_common.h:878
qhead add_admin
Admin contacts to be added.
Definition: epp_common.h:824
static char * xpath_get_attr(void *pool, xmlXPathContextPtr ctx, const char *expr, const char *attr, int req, int *xerr)
A value of attribute of node described by xpath expression is returned.
Definition: epp_parser.c:335
Item of command hash table used for fast command recognition.
Definition: epp_parser.c:414
static epp_command_type cmd_hash_lookup(const char *key)
This routine does traditional lookup on hash table containing commands.
Definition: epp_parser.c:493
Create keyset parameters.
Definition: epp_common.h:775
qhead rem_ns
Nameservers to be removed.
Definition: epp_common.h:840
DNS Key record - http://rfc-ref.org/RFC-TEXTS/4034/chapter2.html.
Definition: epp_common.h:427
char * authInfo
Authorization information.
Definition: epp_common.h:841
parser_status epp_parse_command(epp_context *epp_ctx, int loggedin, void *schema, const char *request, unsigned bytes, epp_command_data **cdata_arg, const eppd_server_xml_conf *xml_schema, epp_red_command_type *cmd_type)
This is the main workhorse of parser component.
Definition: epp_parser.c:3378
char * pc
Postal code.
Definition: epp_common.h:365
char * city
City.
Definition: epp_common.h:363
static cmd_hash_item * hash_cmd[HASH_SIZE_CMD]
Hash table of epp commands used for fast command lookup.
Definition: epp_parser.c:427
SendAuthInfo parameters.
Definition: epp_common.h:864
char * authInfo
Authorization information.
Definition: epp_common.h:778
@ PARSER_ESCHEMA
Error when parsing xml schema.
Definition: epp_parser.h:48
qhead addr
List of ip addresses.
Definition: epp_common.h:423
int level
Level of tests (-1 if not overriden).
Definition: epp_common.h:880
@ VAL_ESCHEMA
Error when loading or parsing schema.
Definition: epp_xmlcommon.h:73
qhead add_dnskey
DNSKEYs to be added.
Definition: epp_common.h:851
cmd_hash_item * next
Next item in hash table.
Definition: epp_parser.c:416
void * epp_malloc(void *pool, unsigned size)
Allocate memory from memory pool.
char * Street3
street - line #3
Definition: epp_common.h:473
@ ident_OP
Number of ID card.
Definition: epp_common.h:439
@ PARSER_CMD_OTHER
A command other than login and logout.
Definition: epp_parser.h:36
Info keyset parameters.
Definition: epp_common.h:632
char * cc
Country code.
Definition: epp_common.h:366
qhead tech
List of technical contacts for keyset.
Definition: epp_common.h:780
char * value
Client provided input which caused the error.
Definition: epp_common.h:206
char * authInfo
Authorization information.
Definition: epp_common.h:853
Queue structure used on countless places throughout the program.
Definition: epp_common.h:309
int rc
EPP return code defined in standard.
Definition: epp_common.h:913
#define NS_CONTACT
Our custom namespace used for contact object.
Definition: epp_xmlcommon.h:35
epp_ext_enum ext_enum
Extensions for ENUM.
Definition: epp_common.h:505
static void parse_poll(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP poll command.
Definition: epp_parser.c:925
The struct represents one epp error in ExtValue element.
Definition: epp_common.h:203
char * xml_in
XML as it is received from client.
Definition: epp_common.h:915
@ ident_MPSV
Number assigned by "ministry of work and ...".
Definition: epp_common.h:441
static parser_status parse_command(void *pool, int loggedin, epp_command_data *cdata, epp_red_command_type *cmd, xmlXPathContextPtr xpathCtx)
Generic parser of EPP command section.
Definition: epp_parser.c:2991
@ PARSER_EINTERNAL
Internal parser error (e.g.
Definition: epp_parser.h:54
#define NS_EPP
Standard EPP xml namespace.
Definition: epp_xmlcommon.h:33
static void parse_ext_enumval_renew(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of enumval extension in context of renew domain command.
Definition: epp_parser.c:2743
Check contact, domain and nsset parameters.
Definition: epp_common.h:557
valid_status validate_doc(void *pool, xmlSchemaPtr schema, xmlDocPtr doc, qhead *err_list)
Function for validating xml document.
Definition: epp_xmlcommon.c:136
void * parsed_doc
Parsed XML document tree.
Definition: epp_common.h:918
char * nsset
Nsset of domain.
Definition: epp_common.h:753
#define CHK_XERR(_var, _label)
Macro checks given variable for an error, if the variable has error status, a flow of a program is re...
Definition: epp_parser.c:79
CreditInfo parameters.
Definition: epp_common.h:870
int publish
Flag determining if this domain can be published in the ENUM dictionary.
Definition: epp_common.h:465
char * authInfo
Authorization information.
Definition: epp_common.h:767
#define RESET_XERR(_var)
Macro checks given variable for an error, if the variable has error status, a flow of a program is re...
Definition: epp_parser.c:87
char * CountryCode
country code - 2 char ISO country code
Definition: epp_common.h:477
static void xpath_getn(void *pool, qhead *list, xmlXPathContextPtr ctx, const char *expr, int *xerr)
List is filled by content of elements described by xpath expression (There may be more elements match...
Definition: epp_parser.c:278
static xmlNodePtr xpath_chroot(xmlXPathContextPtr ctx, const char *expr, int index, int *xerr)
Function changes relative root of xpath context to node described by xpath expression.
Definition: epp_parser.c:156
static void parse_transfer(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP transfer command.
Definition: epp_parser.c:2348
static void cmd_hash_clean(void)
Function releases all items in command hash table.
Definition: epp_parser.c:513
@ PARSER_NOT_VALID
Request does not validate.
Definition: epp_parser.h:37
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.
Definition: epp_parser.c:3378
This structure is central to the concept of the whole module.
Definition: epp_common.h:909
qhead streets
3x street.
Definition: epp_common.h:362
static int new_error_item(void *pool, qhead *errors, epp_errorspec errspec)
Create and enqueue new error item of specified type.
Definition: epp_parser.c:613
char * ext_enumval
Domain validation.
Definition: epp_common.h:464
#define NS_FRED
Our custom namespace used for extensions definition.
Definition: epp_xmlcommon.h:43
static void parse_infoKey(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata, const char *key)
Parametrized parser of commands domainsByNsset, domainsByContact, nssetsByContact and nssetsByNs.
Definition: epp_parser.c:2551
static void parse_update(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of EPP update command.
Definition: epp_parser.c:2279
#define XML_IN_ENC
Encoding for input xml in epp_command_data structure.
Definition: epp_parser.c:63
Info nsset parameters.
Definition: epp_common.h:613
static void parse_test(void *pool, xmlXPathContextPtr xpathCtx, epp_command_data *cdata)
Parser of command test.
Definition: epp_parser.c:2582
epp_command_type type
Identification of epp command.
Definition: epp_common.h:929
static epp_identType string2identtype(const char *str)
Routine converts string to ident type.
Definition: epp_parser.c:1048
Transfer parameters.
Definition: epp_common.h:857
@ PARSER_NOT_XML
Request is not xml.
Definition: epp_parser.h:47
unsigned char protocol
= 3
Definition: epp_common.h:430
void * xpath_ctx
XPath context.
Definition: epp_common.h:919
int q_add(void *pool, qhead *head, void *data)
Add new item to a queue (the item will be enqueued at the end of queue).
Definition: epp_common.c:31
union epp_ext_item::@1 ext
Extension.
char * authInfo
Authorization information.
Definition: epp_common.h:829
char * PostalCode
postal code
Definition: epp_common.h:476