DCHK Client Version 0.5.7 - Documentation DomainCheck

C-API IrisLWZ
[C-API Functions]

The low level API for using the IrisLWZ protocol. More...


Detailed Description

The following functions implements the Lightweight UDP Transfer Protocol for the the Internet Registry Information Service (IRIS) as described in RFC 4993.

Please see API Usage for more information on using the API.

Functions

int irislwz_AcceptDeflated (IRISLWZ_HANDLE *handle, int flag)
 Accept compressed answers.
int irislwz_CheckMinVersion (int major, int minor, int build)
 Checks for a specific version of the library.
int irislwz_CheckResponse (IRISLWZ_HANDLE *handle)
 Check response if it contains size or other information.
int irislwz_Connect (IRISLWZ_HANDLE *handle)
 Creates an UDP socket to an IRISLWZ server.
void irislwz_Debug (IRISLWZ_HANDLE *handle, int level, const char *fmt,...)
 Print to debug handler.
int irislwz_Disconnect (IRISLWZ_HANDLE *handle)
 Destroys socket to IRISLWZ server.
int irislwz_Exit (IRISLWZ_HANDLE *handle)
 Deinitialize of IRISLWZ_HANDLE object.
int irislwz_FlagOtherInfo (IRISLWZ_HANDLE *handle, int flag)
 Set OI-Flag.
int irislwz_FlagSizeInfo (IRISLWZ_HANDLE *handle, int flag)
 Set SI-Flag.
void irislwz_FreePacket (IRISLWZ_PACKET *p)
 Frees the memory used by an IRISLWZ_PACKET.
int irislwz_GetCompressedSize (const char *buffer, int size, int rfc1950)
 Calculate the zlib compressed size of a buffer.
const char * irislwz_GetCopyrightString ()
 Returns a pointer to a string containing the copyright of the library.
const char * irislwz_GetHostname (IRISLWZ_HANDLE *handle)
 Returns pointer to the hostname of a previous set server.
int irislwz_GetPort (IRISLWZ_HANDLE *handle)
 Returns port of a previous set server.
const char * irislwz_GetReleaseDate ()
 Returns a pointer to a string containing the release date of the library.
const char * irislwz_GetVersion ()
 Returns a pointer to a string containing the version of the library.
int irislwz_IgnoreInvalidXML (IRISLWZ_HANDLE *handle, int flag)
 Tell the library to ignore invalid XML.
int irislwz_Init (IRISLWZ_HANDLE *handle)
 Initialization of IRISLWZ_HANDLE object.
int irislwz_InitWSA ()
 Windows only: initialize Windows Sockets.
int irislwz_PrepareQuery (IRISLWZ_HANDLE *handle)
 Prepare IRISLWZ Header for next query.
int irislwz_Query (IRISLWZ_HANDLE *handle, const char *payload)
 Send a request to an IRISLWZ server.
int irislwz_Query2 (IRISLWZ_HANDLE *handle, const char *payload, int bytes)
 Send a request to an IRISLWZ server.
int irislwz_QueryVersion (IRISLWZ_HANDLE *handle)
 Send a version request to the server.
int irislwz_SendDeflated (IRISLWZ_HANDLE *handle, int flag)
 Send compressed requests.
int irislwz_SetAuthority (IRISLWZ_HANDLE *handle, const char *authority)
 Sets the authority for IRISLWZ requests.
int irislwz_SetAuthorityByDomain (IRISLWZ_HANDLE *handle, const char *domain)
 Sets authority for IRISLWZ requests by using the TLD of a domain.
int irislwz_SetAuthorityByDomainList (IRISLWZ_HANDLE *handle, DCHK_DOMAINLIST *list)
 Sets authority for IRISLWZ requests by using a domain list.
void irislwz_SetDebugHandler (IRISLWZ_HANDLE *handle, void(*DebugHandler)(int, const char *, void *), void *privatedata)
 Sets debug handler.
void irislwz_SetDebugLevel (IRISLWZ_HANDLE *handle, int level)
 Sets debug level.
int irislwz_SetHost (IRISLWZ_HANDLE *handle, const char *host, int port)
 Set hostname an port of an IRISLWZ server.
int irislwz_SetMaximumResponseLength (IRISLWZ_HANDLE *handle, int bytes)
 Sets the maximum acceptable packet size for answer packets.
int irislwz_SetTimeout (IRISLWZ_HANDLE *handle, int seconds, int useconds)
 Set timeout for communication with an IRISLWZ server.
int irislwz_Talk (IRISLWZ_HANDLE *handle, IRISLWZ_PACKET *request, IRISLWZ_PACKET *response)
 Talk with an IRISLWZ server.
int irislwz_TestCleanup (IRISLWZ_HANDLE *handle)
 Disable all special test options.
int irislwz_TestCorruptCompression (IRISLWZ_HANDLE *handle, int flag)
 Corrupt compressed request packets.
int irislwz_TestSetAuthorityLength (IRISLWZ_HANDLE *handle, int bytes)
 Override value for authority length.
int irislwz_TestSetHeader (IRISLWZ_HANDLE *handle, int header)
 Override header byte in LWZ header.
int irislwz_TestSetTransactionId (IRISLWZ_HANDLE *handle, int tid)
 Override random transaction id.
int irislwz_TestSetVersion (IRISLWZ_HANDLE *handle, int version)
 Override LWZ version.
int irislwz_TestTruncatePacket (IRISLWZ_HANDLE *handle, int bytes)
 Truncate the request packet.
int irislwz_UseRFC1950 (IRISLWZ_HANDLE *handle, int flag)
 Use RFC 1950 for compression.
int irislwz_Validate (IRISLWZ_HANDLE *handle, const char *xml, char **beautified)
 Do an XML validation against a text.

Function Documentation

int dchk::CIrisLWZ::CheckResponse (  )  [inherited]

This function can be used to check if a response packet contains size information or other information.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
Returns:
The function returns 1, if there is no flag indicating size or other information. Otherwise it returns 0 and an apropriate errorcode is set. It can also return 0, if the handle parameter is NULL.
Since:
Version 0.5.4
const char * dchk::CIrisLWZ::GetPayloadType ( IRISLWZ_PACKET p = NULL  )  [inherited]

This returns the name of the payload type.

Parameters:
[in] p Optional pointer to a IRISLWZ_PACKET structure. If no pointer is given, the function will use the last response packet revived with this class.
Returns:
Returns a pointer to the name or NULL, if payload type is unknown.
int irislwz_AcceptDeflated ( IRISLWZ_HANDLE handle,
int  flag 
)

Tell the client if it should accept zlib compressed answers or not

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] flag set to 1, if we accept compressed answers, set to 0 if not
Returns:
Always returns 1.
int irislwz_CheckMinVersion ( int  major,
int  minor,
int  build 
)

With this function you can check if the library has a specific version or is below or above.

Parameters:
[in] major Major version of the library
[in] minor Minor version
[in] build Build number
Returns:
The function returns one of the following three values:
  • 0: the library has exact the same version you specified
  • -1: the libraries version is below the version you specified
  • +1: the library has a higher version than the version you specified
Remarks:
If the version you want to check is "1.2.3" then "1" is the major version, "2" the minor version and "3" the build.
See also:
int irislwz_CheckResponse ( IRISLWZ_HANDLE handle  ) 

This function can be used to check if a response packet contains size information or other information.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
Returns:
The function returns 1, if there is no flag indicating size or other information. Otherwise it returns 0 and an apropriate errorcode is set. It can also return 0, if the handle parameter is NULL.
Since:
Version 0.5.4
int irislwz_Connect ( IRISLWZ_HANDLE handle  ) 

This function creates an UDP socket to an IRISLWZ server. As UDP is a connection less protocol, there is no connection made to the server, but the hostname gets resolved and the TCP stack checks, if the destination host is reachable.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
Returns:
On success, this function returns 1, on error 0.
void irislwz_Debug ( IRISLWZ_HANDLE handle,
int  level,
const char *  fmt,
  ... 
)

This function is used to print to the debug handler

Parameters:
[in] handle Pointer to the DCHK-Object
[in] level Debug level
[in] fmt Format string for an additional error text. The syntax of this string is identical to sprintf/printf.
[in] ... Optional additional parameters for the format string
int irislwz_Disconnect ( IRISLWZ_HANDLE handle  ) 

This function destroys the socket to IRISLWZ server.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
Returns:
On success, this function returns 1, on error 0.
int irislwz_Exit ( IRISLWZ_HANDLE handle  ) 

Use this function on a IRISLWZ_HANDLE object, if you don't need it any longer. The function will deinitialize the object an free all memory associated to it.

Parameters:
[in] handle pointer to an existing IRISLWZ_HANDLE object
Returns:
Returns 0, when the handle parameter points to NULL, otherwise returns 1 to indicate a successful deinitialization.
int irislwz_FlagOtherInfo ( IRISLWZ_HANDLE handle,
int  flag 
)

This function sets the OI-flag for IRISLWZ requests.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] flag Should be "1" to set the flag or "0" to unset it.
int irislwz_FlagSizeInfo ( IRISLWZ_HANDLE handle,
int  flag 
)

This function sets the SI-flag for IRISLWZ requests.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] flag Should be "1" to set the flag or "0" to unset it.
void irislwz_FreePacket ( IRISLWZ_PACKET p  ) 

This function frees the memory allocated within an IRISLWZ_PACKET object. The object itself is not freed.

Parameters:
[in] p Pointer to an IRISLWZ_PACKET
int irislwz_GetCompressedSize ( const char *  buffer,
int  size,
int  rfc1950 
)

This function compresses the given buffer with zlib and returns the required amount of Bytes. It is used internally by some functions, but can be used externally, too.

Parameters:
[in] buffer Pointer to the beginning of data, which should be compressed
[in] size Amount of bytes in the buffer
[in] rfc1950 If set to "1", this function will use RFC 1950 instead of RFC 1951 for compression.
Returns:
On success, this function returns the amount of bytes needed to compress the data, otherwise it will return 0.
const char* irislwz_GetCopyrightString (  ) 

This function returns a pointer to a string containing the copyright of the library.

Returns:
Pointer to copyright string
See also:
const char* irislwz_GetHostname ( IRISLWZ_HANDLE handle  ) 

This function returns a pointer to the previous set hostname. This could have been done by explicit calling the irislwz_SetHost function or automatically by calling dchk_SetHostByDNS.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
Returns:
Returns a pointer to the hostname or NULL, if the hostname was not set yet.
int irislwz_GetPort ( IRISLWZ_HANDLE handle  ) 

This function returns the port of a previous set IRISLWZ server. This could have been done by explicit calling the irislwz_SetHost function or automatically by calling dchk_SetHostByDNS.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
Returns:
Returns port of server or 0 if no server was set, yet.
const char* irislwz_GetReleaseDate (  ) 

This function returns a pointer to a string containing the release date of the library. The format of the date is "dd.mm.yyyy".

Returns:
Pointer to release date string
See also:
const char* irislwz_GetVersion (  ) 

This function returns a pointer to a string containing the version of the library.

Returns:
Pointer to version string
See also:
int irislwz_IgnoreInvalidXML ( IRISLWZ_HANDLE handle,
int  flag 
)

Normally the client would stop and raise a validation error if the request payload contains invalid XML. With this function you can disable this check, so it is possible to test how the server reacts to an invalid XML request.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] flag set to 1, if we want to ignore invalid XML, set to 0 if not
Returns:
Always returns 1.
int irislwz_Init ( IRISLWZ_HANDLE handle  ) 

Use this function to initialize a newly created IRISLWZ_HANDLE object. This function must be called before any other irislwz_*- or dchk_*-Function.

Parameters:
[in] handle pointer to an existing IRISLWZ_HANDLE object
Returns:
Returns 0, when the handle parameter points to NULL, otherwise returns 1 to indicate a successful initialization.
int irislwz_InitWSA (  ) 

Before you can use any Socket functions on Microsoft Windows it is necessary to initialize the windows socket API first (see Windows specific). This is done by calling the WSAStartup-function. This function will do this for you.

Returns:
On non-windows platforms this function always returns 1, on windows systems it will return 1 when the winsock API was initialized successfully, otherwise it will return 0.
Remarks:
This function is Microsoft Windows specific.
int irislwz_PrepareQuery ( IRISLWZ_HANDLE handle  ) 

This function initializes the IRISLWZ header in the request structure of the IRISLWZ_HANDLE. It uses the data and flags of the IRISLWZ_HANDLE object and sets the values and bits in the IRISLWZ_HEADER. The packet and header pointer must have been already allocated with enough space to hold the 6 byte header and the authority name.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
Returns:
On success, this function returns 1, on error 0.
int irislwz_Query ( IRISLWZ_HANDLE handle,
const char *  payload 
)

This function is used to send a request to an IRISLWZ server and wait for response.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] payload Request, which should be send to IRIS server
Returns:
On success, this function returns 1 and the response is saved in the response structure of handle. The request structure is filled, too. In case of an error, 0 will be returned.
int irislwz_Query2 ( IRISLWZ_HANDLE handle,
const char *  payload,
int  bytes 
)

This function is used to send a request to an IRISLWZ server and wait for response. In addition to irislwz_Query, this function needs a third parameter indicating the size of the payload.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] payload Request, which should be send to IRIS server
[in] bytes Size of the payload
Returns:
On success, this function returns 1 and the response is saved in the response structure of handle. The request structure is filled, too. In case of an error, 0 will be returned.
Since:
Version 0.5.4
int irislwz_QueryVersion ( IRISLWZ_HANDLE handle  ) 

This function sends a version request to the server

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
Returns:
On success, this function returns 1, on error 0.

To query the version, the Version-Bit is set in the IRISLWZ_HEADER. The server itself answers with a version information in the payload, which looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<versions xmlns="urn:ietf:params:xml:ns:iris-transport">
  <transferProtocol protocolId="iris.lwz">
    <application protocolId="urn:ietf:params:xml:ns:iris1">
      <dataModel protocolId="urn:ietf:params:xml:ns:dchk1"/>
    </application>
  </transferProtocol>
</versions>
int irislwz_SendDeflated ( IRISLWZ_HANDLE handle,
int  flag 
)

Tell the client if it should send zlib compressed requests or not

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] flag set to 1, if we want to send compressed requests, set to 0 if not
Returns:
Always returns 1.
int irislwz_SetAuthority ( IRISLWZ_HANDLE handle,
const char *  authority 
)

With this function you can define the authority which is used in IRISLWZ request packets. The default is not to use an authority.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] authority Pointer to an authority string. The string must not be longer than 255 octets.
Returns:
Returns 1 on success or 0 when an error occurred.
int irislwz_SetAuthorityByDomain ( IRISLWZ_HANDLE handle,
const char *  domain 
)

This function uses the TLD of the given domain to set the authority for further requests.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] domain pointer to a domain name
Returns:
Returns 1 on success or 0 when an error occurred.
Note:
If the TLD is set to "arpa", a special handling takes place. At the moment the library only checks if the domain ends with "9.4.e164.arpa" (german ENUM domains). If this is the case "9.4.e164.arpa" is used as authority name. Other arpa zones are not implemented.
int irislwz_SetAuthorityByDomainList ( IRISLWZ_HANDLE handle,
DCHK_DOMAINLIST list 
)

This function uses the first domain in the domain list to set an authority name for further requests.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] list pointer to a DCHK_DOMAINLIST object
Returns:
Returns 1 on success or 0 when an error occurred.
Remarks:
The function actually only picks the first domain name from the list and calls the function irislwz_SetAuthorityByDomain.
void irislwz_SetDebugHandler ( IRISLWZ_HANDLE handle,
void(*)(int, const char *, void *)  DebugHandler,
void *  privatedata 
)

If you set a debug level higher than 0, you will get debug output on STDOUT. If you want the output somewhere else, you can specify a debug handler or callback function. The function must have the following syntax:

 void debughandler(int level, const char *text, void *privatedata)
 {
    // Do something, e.g. printf("%s\n",text);
 }
Parameters:
[in] handle pointer to an existing IRISLWZ_HANDLE object
[in] DebugHandler Pointer to the function that will receive the debug output
[in] privatedata Pointer to some optional data, which is passed to the callback function
See also:
irislwz_SetDebugLevel
void irislwz_SetDebugLevel ( IRISLWZ_HANDLE handle,
int  level 
)

This functions sets the debug level for debug output. By default the library does not output any debug (level=0). The higher the level, the more output you will get. You can specify a debug handler if you want the output anywhere else than STDOUT (see irislwz_SetDebugHandler).

Parameters:
[in] handle pointer to an existing IRISLWZ_HANDLE object
[in] level debug level. 0=no debug
int irislwz_SetHost ( IRISLWZ_HANDLE handle,
const char *  host,
int  port 
)

With this function you can specify hostname or IP address and port of IRISLWZ server manually. If you don't know the hostname, you can use the function dchk_SetHostByDNS and let the DCHK library find out the server name by using DNS.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] host name or IP address of the server which should be used
[in] port port of the server (default=715)
Returns:
Returns 1 on success or 0 when an error occurred.
int irislwz_SetMaximumResponseLength ( IRISLWZ_HANDLE handle,
int  bytes 
)

By default the client accepts a maximum packet size of 1500 octets (Bytes), which is the recommend size by the Lightweight UDP Transfer Protocol RFC, when the path MTU is unknown. With this function you can set any other size.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] bytes number of bytes
Returns:
Always returns 1 (success).
Remarks:
Please keep in mind, that even if you specify a bigger packet size, the DCHK server will not exceed 4000 octets. If the answer does not fit into the answer packet, the server will send a "size information".
int irislwz_SetTimeout ( IRISLWZ_HANDLE handle,
int  seconds,
int  useconds 
)

With this function you can set a timeout for the communication with a server. After sending a request packet to the server the client has to wait for the response. As UDP is an unreliable protocol the client can not detect if the request packet reached it's destination. It is also possible, that the answer packet got lost. By default the library has a timeout of 5 seconds.

With this function you can define a shorter timeout.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] seconds Number of seconds. If you pass 0 seconds, the library uses no timeout. If no response arrives, the library blocks until the operating system issues a timeout, which could be several minutes.
[in] useconds Number of microseconds
Returns:
Always returns 1 except the pointer to the IRISLWZ_HANDLE object handle was NULL.
int irislwz_Talk ( IRISLWZ_HANDLE handle,
IRISLWZ_PACKET request,
IRISLWZ_PACKET response 
)

This function is used for communication with an IRISLWZ-server. The server must be connected previously with irislwz_Connect.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] request pointer to an IRISLWZ_PACKET object, which holds the request
[out] response pointer to an IRISLWZ_PACKET object, in which the answer is stored
Returns:
On success, this function returns 1, on error 0.
int irislwz_TestCleanup ( IRISLWZ_HANDLE handle  ) 

By calling this function all special test options get disabled.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
int irislwz_TestCorruptCompression ( IRISLWZ_HANDLE handle,
int  flag 
)

When calling this function, a compressed request packet will be corrupted by changing some values of the compressed stream with random values. It is meant for testing purposes only.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] flag 1=enable or 0=disable
int irislwz_TestSetAuthorityLength ( IRISLWZ_HANDLE handle,
int  bytes 
)

With this function you can override the value for authority length in the LWZ header, to corrupt the request. It is meant for testing purposes only.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] bytes A value between 0 and 255
int irislwz_TestSetHeader ( IRISLWZ_HANDLE handle,
int  header 
)

With this function you can completely override the header-byte in the LWZ header. It is meant for testing purposes only.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] header A value between 0 and 255
int irislwz_TestSetTransactionId ( IRISLWZ_HANDLE handle,
int  tid 
)

With this function you can override the default random transaction id in the LWZ header. It is meant for testing purposes only.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] tid A value between 0 and 65535
int irislwz_TestSetVersion ( IRISLWZ_HANDLE handle,
int  version 
)

With this function you can override the version bits in the LWZ header. It is meant for testing purposes only.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] version Should be a value between 0 and 3.
int irislwz_TestTruncatePacket ( IRISLWZ_HANDLE handle,
int  bytes 
)

With this function you can truncate the request packet at any position, to corrupt the request. It is meant for testing purposes only.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] bytes A value between 0 and 65535
int irislwz_UseRFC1950 ( IRISLWZ_HANDLE handle,
int  flag 
)

The IRIS LWZ RFC (RFC 4993) describes to use the deflate algorithm described in RFC 1951 for compression. But the first version of DENIC's DCHK server, client and also this client wrongly used RFC 1950, which is a zlib wrapper around RFC 1951. Until the bug is fixed in the server, you can use this option to keep the wrong compression.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] flag Use "0" to use RFC 1950 as it was meant to, or "1" to use the wrong compression.
Returns:
Always returns 1 except the pointer to the IRISLWZ_HANDLE object handle was NULL.
int irislwz_Validate ( IRISLWZ_HANDLE handle,
const char *  xml,
char **  beautified 
)

This function takes the given xml test an tries to validate it with the XML library (xmlReadMemory). If the XML is valid, a beautified version, which can be better read by humans, can be stored optionally.

Parameters:
[in] handle pointer to an IRISLWZ_HANDLE object
[in] xml pointer to the text which should be validated
[out] beautified optional pointer to which a beautified version of the xml is written. The Memory for this is allocated by the library, but must be freed by the client using free.
Returns:
If the XML is valid, the function returns 1, otherwise 0.
Example:
const char *xml="<iris1:request xmlns:iris1=\"urn:ietf:params:xml:ns:iris1\">"
        "<iris1:searchSet><iris1:lookupEntity registryType=\"dchk1\" "
        "entityClass=\"domain-name\" entityName=\"denic.de\"/>"
        "</iris1:searchSet></iris1:request>";
char *beautified=NULL;
if (irislwz_Validate(handle,xml,&beautified)) {
    printf ("Original XML code:\n");
    printf ("%s\n",xml);
    printf ("Beautified version:\n");
    printf ("%s\n",beautified);
}
if (beautified) free(beautified);
bool dchk::CIrisLWZ::IsDeflated ( IRISLWZ_PACKET p = NULL  )  [inherited]

This function checks, if the payload of the given packet was deflated (compressed).

Parameters:
[in] p Optional pointer to a IRISLWZ_PACKET structure. If no pointer is given, the function will use the last response packet revived with this class.
Returns:
Returns true or false.
bool dchk::CIrisLWZ::IsDeflateSupported ( IRISLWZ_PACKET p = NULL  )  [inherited]

This function checks, if the given packet indicates that deflate (compression) is supported.

Parameters:
[in] p Optional pointer to a IRISLWZ_PACKET structure. If no pointer is given, the function will use the last response packet revived with this class.
Returns:
Returns true or false.
bool dchk::CIrisLWZ::IsResponse ( IRISLWZ_PACKET p = NULL  )  [inherited]

This function checks, if the given packet is a response packet.

Parameters:
[in] p Optional pointer to a IRISLWZ_PACKET structure. If no pointer is given, the function will use the last response packet revived with this class.
Returns:
Returns true or false.
bool dchk::CIrisLWZ::PayloadIsOther ( IRISLWZ_PACKET p = NULL  )  [inherited]

This function checks, if the payload of the given packet contains other information.

Parameters:
[in] p Optional pointer to a IRISLWZ_PACKET structure. If no pointer is given, the function will use the last response packet revived with this class.
Returns:
Returns true or false.
bool dchk::CIrisLWZ::PayloadIsSizeInfo ( IRISLWZ_PACKET p = NULL  )  [inherited]

This function checks, if the payload of the given packet contains size information.

Parameters:
[in] p Optional pointer to a IRISLWZ_PACKET structure. If no pointer is given, the function will use the last response packet revived with this class.
Returns:
Returns true or false.
bool dchk::CIrisLWZ::PayloadIsVersion ( IRISLWZ_PACKET p = NULL  )  [inherited]

This function checks, if the payload of the given packet contains version information.

Parameters:
[in] p Optional pointer to a IRISLWZ_PACKET structure. If no pointer is given, the function will use the last response packet revived with this class.
Returns:
Returns true or false.
bool dchk::CIrisLWZ::PayloadIsXML ( IRISLWZ_PACKET p = NULL  )  [inherited]

This function checks, if the payload of the given packet is XML.

Parameters:
[in] p Optional pointer to a IRISLWZ_PACKET structure. If no pointer is given, the function will use the last response packet revived with this class.
Returns:
Returns true or false.
int dchk::CIrisLWZ::SetAuthorityByDomainList ( CDomainList list  )  [inherited]

This function uses the first domain in the domain list to set an authority name for further requests.

Parameters:
[in] list Reference to a CDomainList object
Returns:
Returns 1 on success or 0 when an error occurred.
Remarks:
The function actually only picks the first domain name from the list and calls the function irislwz_SetAuthorityByDomain.
int dchk::CIrisLWZ::UseRFC1950 ( int  flag  )  [inherited]

The IRIS LWZ RFC (RFC 4993) describes to use the deflate algorithm described in RFC 1951 for compression. But the first version of DENIC's DCHK server, client and also this client wrongly used RFC 1950, which is a zlib wrapper around RFC 1951. Until the bug is fixed in the server, you can use this option to keep the wrong compression.

Parameters:
[in] flag Use "0" to use RFC 1950 as it was meant to, or "1" to use the wrong compression.
Returns:
Always returns 1 except the pointer to the IRISLWZ_HANDLE object handle was NULL.
Generated on Wed Aug 4 21:23:46 2010 for DCHK Client Documentation by  doxygen 1.6.3