This reference section lists all libkavclient error codes with their descriptions (as returned by kav_strerror), explains meanings of the errors and suggests possible steps you can take to correct the situation once an error occurred.
Failed to create a socket to connect to kavdaemon
Failed to connect to kavdaemon
Connection to KAVDaemon failed. Examine the system errno value to find out why. The most likely reason for this error is that KAVDaemon is not running, or the path to KAVDaemon socket (as set by kav_set_socketpath) is incorrect (in that case errno will be set to ENOENT).
Check is already in progress
Failed to write to kavdaemon
Error waiting for kavdaemon to respond
The request to KAVDaemon was succesfully sent, but some error occurred while waiting for reply. Check the system errno value to find out what kind of error. Note that libkavclient waits for reply using the system select function.
Timeout waiting for kavdaemon to respond
The request to KAVDaemon was succesfully sent, but no response was received from KAVDaemon. The amount of time that libkavclient waits before returning this error can be set by the kav_set_timeout function, and by default is 5 seconds.
Failed to read from kavdaemon
Key file not found or expired
KAVDaemon was successfully contacted, but it failed to perform the requested check because it didn't find a valid key file. This means that you don't have a valid license to use KAVDaemon (remember, KAVDaemon is commercial software!). You should contact Kaspersky Lab.
Antivirus descriptions not found
KAVDaemon was successfully contacted, but it failed to perform the requested check because it couldn't find its virus definition bases. Either something is wrong with your KAVDaemon configuration, or you need to run kavupdater to download the virus definition bases.
Internal integrity was compromised
Failed to get a key for shared memory
This error means that the system function ftok failed. Most probably you passed an invalid keyfile parameter to kav_shmem_init, such as a non-existen or non-accessible file. If you encounter this error when calling kav_check_mem or when passing NULL for keyfile to kav_shmem_init, you have either run into a bug in libkavclient or your system is severely out of memory. Check the system errno value for additional information on why ftok failed.
Failed to create a keyfile for shared memory
For some reason, libkavclient failed to create a temporary file, which is necessary to check memory regions. Examine the system errno value to find out why. If you encounter this error, you probably have run into a bug in libkavclient, or something is wrong with your system, such as /tmp directory is not writable.
Failed to allocate shared memory
Failed to attach to shared memory segment
This error means that libkavclient failed to attach to the shared memory segment it allocated in order to pass it to KAVDaemon for checking. More technically, the system function shmat failed. Examine system errno value to find out why. It must be either a bug in libkavclient, or your system is severely out of memory.
Shared memory operations were not initialized
Request to check a shared memory segment larger then allocated size
Applies to kav_shmem_check.
This error means that kav_shmem_check was called with size larger than the size of the shared memory block previously created by kav_shmem_init. Check the size arguments of corresponding kav_shmem_init and kav_shmem_check calls - the latter must be less then or equal to the former.