DCHK Client Version 0.5.7 - Documentation |
![]() |
The low level API for using the IrisLWZ protocol. More...
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. |
int dchk::CIrisLWZ::CheckResponse | ( | ) | [inherited] |
This function can be used to check if a response packet contains size information or other information.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
handle
parameter is NULL.const char * dchk::CIrisLWZ::GetPayloadType | ( | IRISLWZ_PACKET * | p = NULL |
) | [inherited] |
This returns the name of the payload type.
[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. |
int irislwz_AcceptDeflated | ( | IRISLWZ_HANDLE * | handle, | |
int | flag | |||
) |
Tell the client if it should accept zlib compressed answers or not
[in] | handle | pointer to an IRISLWZ_HANDLE object |
[in] | flag | set to 1, if we accept compressed answers, set to 0 if not |
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.
[in] | major | Major version of the library |
[in] | minor | Minor version |
[in] | build | Build number |
int irislwz_CheckResponse | ( | IRISLWZ_HANDLE * | handle | ) |
This function can be used to check if a response packet contains size information or other information.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
handle
parameter is NULL.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.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
void irislwz_Debug | ( | IRISLWZ_HANDLE * | handle, | |
int | level, | |||
const char * | fmt, | |||
... | ||||
) |
This function is used to print to the debug handler
[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.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
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.
[in] | handle | pointer to an existing IRISLWZ_HANDLE object |
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.
[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.
[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.
[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.
[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. |
const char* irislwz_GetCopyrightString | ( | ) |
This function returns a pointer to a string containing the copyright of the library.
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.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
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.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
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".
const char* irislwz_GetVersion | ( | ) |
This function returns a pointer to a string containing the version of the library.
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.
[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 |
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.
[in] | handle | pointer to an existing IRISLWZ_HANDLE object |
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.
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.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
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.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
[in] | payload | Request, which should be send to IRIS server |
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.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
[in] | payload | Request, which should be send to IRIS server |
[in] | bytes | Size of the payload |
handle
. The request structure is filled, too. In case of an error, 0 will be returned.int irislwz_QueryVersion | ( | IRISLWZ_HANDLE * | handle | ) |
This function sends a version request to the server
[in] | handle | pointer to an IRISLWZ_HANDLE object |
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
[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 |
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.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
[in] | authority | Pointer to an authority string. The string must not be longer than 255 octets. |
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.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
[in] | domain | pointer to a domain name |
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.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
[in] | list | pointer to a DCHK_DOMAINLIST object |
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); }
[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 |
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).
[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.
[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) |
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.
[in] | handle | pointer to an IRISLWZ_HANDLE object |
[in] | bytes | number of bytes |
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.
[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 |
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.
[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 |
int irislwz_TestCleanup | ( | IRISLWZ_HANDLE * | handle | ) |
By calling this function all special test options get disabled.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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. |
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.
[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 . |
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).
[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. |
bool dchk::CIrisLWZ::IsDeflateSupported | ( | IRISLWZ_PACKET * | p = NULL |
) | [inherited] |
This function checks, if the given packet indicates that deflate (compression) is supported.
[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. |
bool dchk::CIrisLWZ::IsResponse | ( | IRISLWZ_PACKET * | p = NULL |
) | [inherited] |
This function checks, if the given packet is a response packet.
[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. |
bool dchk::CIrisLWZ::PayloadIsOther | ( | IRISLWZ_PACKET * | p = NULL |
) | [inherited] |
This function checks, if the payload of the given packet contains other information.
[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. |
bool dchk::CIrisLWZ::PayloadIsSizeInfo | ( | IRISLWZ_PACKET * | p = NULL |
) | [inherited] |
This function checks, if the payload of the given packet contains size information.
[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. |
bool dchk::CIrisLWZ::PayloadIsVersion | ( | IRISLWZ_PACKET * | p = NULL |
) | [inherited] |
This function checks, if the payload of the given packet contains version information.
[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. |
bool dchk::CIrisLWZ::PayloadIsXML | ( | IRISLWZ_PACKET * | p = NULL |
) | [inherited] |
This function checks, if the payload of the given packet is XML.
[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. |
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.
[in] | list | Reference to a CDomainList object |
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.
[in] | flag | Use "0" to use RFC 1950 as it was meant to, or "1" to use the wrong compression. |
handle
was NULL.