Copyright (C) 2002  Internet Software Consortium.

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

$Id: epp-parser.txt,v 1.14 2002/12/24 19:32:42 lidl Exp $

ID values:

	Domains:
		local D1234
		global D1234-WHATEVER
	Contacts:
		local C1234
		global C1234-WHATEVER
	

$req->{command}

  one of:
  "hello", "login", "logout",

  "contact_check", "contact_info", "contact_transfer", "contact_add"
  "contact_mod"

  "domain_check", "domain_add", "domain_del", "domain_info",
  "domain_renew", "domain_transfer, "domain_mod",

  "host_check", "host_add", "host_del", "host_info", "host_mod".

  Always present, for a valid request.

$req->{clTRID}

  the transaction id specified by the client. Always provided, and
  returned to the client in the corresponding response.  This is
  managed through the frontend process.  Backend processes do not
  get passed the client transaction identifier.

authInfo encoding:
	$authinfo = { type = "pw", roid => "id name",
		      _val = "password-here" };

"roid" is optional and will default to the current object (for
instance, if changing contact info, it will be the contact, or
domain info, it will be the domain, should the domain have a password
associated with it.)

status encoding:

        $status = [ "status_name", "free text explanation" ];

The following is a summary of other keys present in the hash,
according to the command type.

hello

  None.

login

  $req->{id}            username specified by client. Always present.
  $req->{password}      password specified by client, Always present.
  $req->{new_password}  new password specified by client. If not present,
                        no password change requested.

logout

  None.

contact_check

  $req->{ids}           list of one or more contact ids to check.

contact_info

  $req->{id}            contact id to get info on.

contact_transfer

  $req->{transfer_op}   value of the "op" attribute
  $req->{id}            contact id.

contact_add

  $req->{id}            requested contact id
  $req->{postal}        postal addresses, encoded as follows:

  $req->{postal} = { "type" => { "name" => "name of person",
                                 "org" => "organisation name",
                                 "street" => [ "street1", "street2", ... ],
                                 "city" => "name of city",
                                 "sp" => "state/province",
                                 "pc" => "postal code",
                                 "cc" => "iso-3166 country code" } };

  where "type" can be "loc" or "int" for localised and international
  addresses, respectively.

  $req->{voice}         voice telephone number
  $req->{voice_ext}     voice telephone extension
  $req->{fax}           fax telephone number
  $req->{email}         e-mail address

contact_del

  $req->{id}            contact id to delete

contact_mod

  $req->{id}            id of contact to modify
  $req->{status_add}    list of status values to add
  $req->{status_del}    list of status values to remove
  $req->{postal_add}    hash of postal address data to add
  $req->{postal_del}    hash of postal address data to delete
  $req->{postal_chg}    hash of postal address data to change/update
                        postal_xxx data is encoded in same manner
                        as contact_add
  $req->{voice}         voice telephone number
  $req->{fax}           fax telephone number
  $req->{email}         e-mail address

domain_check

  $req->{names}         list of one or more domains to check

domain_add

  $req->{name}          domain name
  $req->{period}        optional initial registration period
  $req->{period_unit}   "y" for years, "m" for months.
  $req->{ns}            list of nameservers (may be empty, or not present)
  $req->{registrant}    if present, contact handle for registrant
  $req->{contact}       if present, a list of contacts for the domain.
			Each item in the list is an array of
				[ "type", contact_id ]
  $req->{authinfo}      contents of authinfo element, if specified

domain_del

  $req->{name}          domain name

domain_info

  $req->{name}          name of domain
  $req->{hosts}         if present, the value of the specified "hosts"
                          attribute (see draft-ietf-provreg-epp-domain-05,
                          section 3.1.2).
  $req->{authinfo}      contents of authinfo element, if specified

domain_renew

  $req->{name}          domain name
  $req->{current_date}  current expiry date, in YYYY-MM-DD format
  $req->{period}        optional number of units to be added to
                          registration date of domain name
  $req->{period_unit}   if present, value of "unit" attribute

domain_transfer

  $req->{transfer_op}   if present, the value of the specified "ops"
                          attribute on the <transfer> element.
  $req->{name}          domain name
  $req->{authinfo}      contents of authinfo element, if specified
  $req->{period}        for transfer commands (not requests), if
                          present, the number of units to be added to
                          the registration date at transfer time
  $req->{period_unit}   if present, value of "unit" attribute

domain_mod

  $req->{nameservers_add}
                        if present, a list of nameservers to add
  $req->{nameservers_del}}
                        if present, a list of nameservers to remove
  $req->{status_add}} if present, a list of status attributes to add
  $req->{status_del}} if present, a list of status attributes to remove
  $req->{contact_add}
                          if present, a list of contacts to add to the
                          domain.  Each element is a list of
			  [ type, id ]
  $req->{contact_del}
                        if present, a hash of contacts to remove
  $req->{registrant}    if present, a new registrant contact handle
  $req->{authinfo}      contents of authinfo element, if specified

host_check

  $req->{names}         list of one or more nameservers to check

Reply: same as domain_check

host_add

  $req->{name}          name of nameserver
  $req->{addrs}         if present, list of address:
			[ [ 4, '1.2.3.4' ], [ 6, '1::2' ] ]

host_del

  $req->{name}          name of nameserver

host_info

  $req->{name}          name of nameserver

host_mod

  $req->{name}          name of nameserver
  $req->{rename}        new name of nameserver, if present
  $req->{addr_add}      list of addresses to add [ [ 4, '1.2.3.4' ], ... ]
  $req->{addr_del}      list of addresses to del [ [ 4, '1.2.3.4' ], ... ]
  $req->{status_add}    list of status attributes to add to nameserver
  @req->{status_del}    list of status attributes to remove


