DCHK Client Version 0.5.7 - Documentation |
![]() |
Basic data type for all DCHK C-API functions. More...
#include <dchk.h>
Basic data type for all DCHK C-API functions. When you want to use one of the DCHK-API functions, you have to define a IRISLWZ_HANDLE object and initialize it (irislwz_Init). At the end of your program (or when you don't need the object any longer) you have to de-initialize it (irislwz_Exit).
#include <dchk.h> int main(int argc, char **argv) { IRISLWZ_HANDLE dchk; if (!irislwz_Init(&dchk)) { printf ("Initialization of DCHK object failed!\n"); return 1; } ... irislwz_Exit(&iris); return 0; }
Data Fields | |
char | acceptDeflated |
Flag which indicates if we accept compressed answers or not. | |
char * | authority |
Pointer to the authority, which should be used in DCHK requests. | |
void * | debugdata |
Private data which is passed to the debug callback function. | |
void(* | DebugHandler )(int level, const char *text, void *privatedata) |
Pointer to a function to which debug code is passed. | |
int | debuglevel |
Level of debug output. | |
char | dontValidateInput |
int | error |
char * | errortext |
Contains a pointer the additional error text of the last error. | |
char | flag_oi |
Flag which indicates if we should set the OI-bit in requests. | |
char | flag_si |
Flag which indicates if we should set the SI-bit in requests. | |
char | ignoreInvalidXML |
unsigned char | initialized |
Flag which is set, when structure was initialized with irislwz_Init. | |
char * | localcharset |
For future use. Currently this value always contains "UTF-8". | |
int | maximumResponseLength |
int | port |
Port number of DCHK server (defaults to 715). | |
IRISLWZ_PACKET | request |
Structure which holds the complete request. | |
IRISLWZ_PACKET | response |
Structure which holds the complete response. | |
char | rfc1950_workaround |
char | sendDeflated |
Flag which indicates if we should send compressed requests or not. | |
char * | server |
Pointer to hostname or IP of DCHK server. | |
void * | socket |
Holds structure with socket data used for DCHK connection. | |
int | test_authlen |
char | test_flags |
Bitfield for special testing capabilities. | |
char | test_header |
int | test_tid |
int | test_truncate |
char | test_version |
int | timeout_seconds |
Number of seconds we wait until a timeout is generated. | |
int | timeout_useconds |
Number of microseconds we wait until a timeout is generated. | |
char | verboseflag |
controls verbose information |
Flag which indicates if we accept compressed answers or not
Pointer to the authority, which should be used in DCHK requests. The default is to use no authority. In a DCHK query the authority should be set to the requested TLD by using the function irislwz_SetAuthority
Private data which is passed to the debug callback function
Pointer to a function to which debug code is passed
Level of debug output
last error code
Contains a pointer the additional error text of the last error
Flag which indicates if we should set the OI-bit in requests
Flag which indicates if we should set the SI-bit in requests
Flag which is set, when structure was initialized with irislwz_Init
Currently this value always contains "UTF-8". It is used inside the XML parser for beautifying the output. The library currently supports UTF-8 only.
Holds the maximum number of bytes we accept in response packets.
Port number of DCHK server (defaults to 715)
Structure which holds the complete request
Structure which holds the complete response
Flag which indicates if we should send compressed requests or not
Pointer to hostname or IP of DCHK server
Holds a pointer to a structure with socket data used for DCHK connection. The contents of the structure itself is operation system dependent. It is automatically allocated when calling irislwz_Init and deallocated when calling irislwz_Exit.
The bits have the following meaning:
Bits | Mask | Description |
---|---|---|
0 | 1 | Override Version in LWZ header with value of IRISLWZ_HANDLE::test_version |
1 | 2 | Override complete LWZ header with value of IRISLWZ_HANDLE::test_header |
2 | 4 | Override transaction id in LWZ header with value of IRISLWZ_HANDLE::test_tid |
3 | 8 | Override authority length in LWZ header with value of IRISLWZ_HANDLE::test_authlen |
4 | 16 | Truncate request packet at position stored in IRISLWZ_HANDLE::test_truncate |
5 | 32 | Currupt compressed request packet by changing some random bytes |
Number of seconds we wait until a timeout is generated. The default is 5 seconds.
Number of microseconds we wait until a timeout is generated
This flag is a bit field, which controls various verbose output during the process:
Bit 0: XML-Payload of Request is printed to STDOUT (Value: 1) Bit 1: XML-Payload of Request is "beautified" and printed to STDOUT (Value: 2) Bit 2: IRISLWZ-Header of Request is explained to STDOUT (Value: 4) Bit 3: XML-Payload of Response is printed to STDOUT (Value: 8) Bit 4: XML-Payload of Response is "beautified" and printed to STDOUT (Value: 16) Bit 5: IRISLWZ-Header of Response is explained to STDOUT (Value: 32) Bit 6: Use Debug-Handler instead of STDOUT (Value: 64)
Level of debug output