SAP Virus Scan Adapter API

To display a list of topics by category, click any of the contents entries below. To display an alpabetical list of topics, choose the Index button.

Description

Modules

API

Functions

Callbacks

Enumerations

Structures

Types



Help file built: 08/02/13


Callbacks

  • VSA_CIOCBFP
  • VSA_EVENTCBFP


  • Enumerations

  • VS_ACTIONTYPE_T
  • VS_ADAPTER_T
  • VS_CALLRC
  • VS_DETECTTYPE_T
  • VS_INITPARAM_T
  • VS_IOREQUEST_T
  • VS_MESSAGE_T
  • VS_OBJECTTYPE_T
  • VS_OPTPARAM_T
  • VS_PARAMTYPE_T
  • VS_THREADMODEL_T
  • VS_VIRUSTYPE_T
  • VSA_ACTIONPARAM_T
  • VSA_RC
  • VSA_SCANPARAM_T


  • Functions

  • VsaCleanup
  • VsaEnd
  • VsaGetConfig
  • VsaInit
  • VsaReleaseScan
  • VsaScan
  • VsaStartup


  • Modules

  • Virus Scan Adapter


  • Structures

  • VSA_ADAPTERINFO
  • VSA_CALLBACK
  • VSA_CONFIG
  • VSA_CONTENTINFO
  • VSA_DRIVERINFO
  • VSA_INIT
  • VSA_INITPARAM
  • VSA_INITPARAMS
  • VSA_OPTPARAM
  • VSA_OPTPARAMS
  • VSA_SCANERROR
  • VSA_SCANINFO
  • VSA_SCANPARAM
  • VSA_VIRUSINFO


  • Types

  • Bool
  • Byte
  • Char
  • Double
  • EXTCHAR
  • EXTSIGN
  • Float
  • Int
  • Long
  • LSTOK
  • Short
  • size_t
  • time_t
  • UInt
  • ULong
  • UShort
  • Void
  • VS_PARAMETER_T
  • VSA_ENGINE
  • VSA_PARAM
  • VSA_PARAMVALUE
  • VSA_USRDATA


  • Virus Scan Adapter

    Filename: VSAXXTYP.H

    Description

    This module contains the type declarations for an adapter to an external scan engine. The adapter - known as the virus scan adapter (VSA) - is designed as shared library. The data types described here are defined to have a common interface to allow this module to be used outside of SAP.

    The SAP virus scan interface (VSI) should provide a vendor- independent interface outside of SAP and a common interface inside of SAP for internal use. An external virus scan adapter must at least provide the filling of the structure VSA_CONFIG. The parameters can then be set by calling the functions "VsaInit" and "VsaScan".

    Version: 2.00

    Version information in source control:
    $Id: //bas/720_REL/src/include/vsaxxtyp.h#8 $ $Date: 2013/07/26 $

    Functions for the Virus Scan Adapter

    VsaStartup
    This function will be called first after loading the shared library. All global initialization should be done here, such as WSAStartup(), CoInitialize(), ThreadLibraryinitialization()

    VsaGetConfig
    The VSA has to fill the VSA_CONFIG structure with all provided features, parameters and flags. A vendor of the VSA can also set default values for each initial and option parameter.

    VsaInit
    Depending which thread model the adapter provides (STA or MTA), this function will be called once or several times for each scan instance. The VSA initializes itself (or the connected scan engine) and reads all status information (version,date) about the anti-virus engine and the drivers (of the AV engine).

    VsaScan
    Performs the scan and clean job!
    -> If the engine wants to notify the caller, the adapter can pass this information and send it to the callback function. Here the user can handle these messages like events (event handling).
    -> If the caller wants to provide all I/O operations, then an extra callback can be installed and the scan action 'CLIENTIO' must be set.

    VsaReleaseScan
    Releases the reserved data structure VSA_SCANINFO. This function only has to be called if the scan function VsaScan should return that information.

    VsaEnd
    Depending which thread model the adapter provides (STA or MTA), this function will be called once or more for each instance. Releases all used resources and shuts the engine down

    VsaCleanup
    Called as last function before unloading the adapter Cleanup all your global reserved data here, such as WSACleanup, CoUninitialize, ExitThread Shuts the adapter down!


    VSA_CIOCBFP

    VS_CALLRC CALLBACK VSA_CIOCBFP( 
       VSA_ENGINEpVsaEngine/* Handle to AV engine VSA_ENGINE */,
       VS_IOREQUEST_TtRequest/* Request ID. typeof VS_IOREQUEST_T */,
       PVoidpvBuffer/* Buffer provided by engine */,
       size_tlBufferSize/* Size of the provided buffer */,
       size_t *lCopiedBytes/* Size of the copied bytes */
    );

    This callback is for client I/O requests. The call should be used as follows: 1. VSA_SP_CLIENTIO is specified. 2. Callback function pointer is set in VSA_CALLBACK with the flags. Flags means the types of callback requests the client will be provide, such as for a stream interface means. READ / WRITE / LENGTH

    Defined in: VSAXXTYP.H

    Parameters

    pVsaEngine
    Handle to AV engine VSA_ENGINE

    tRequest
    Request ID. typeof VS_IOREQUEST_T

    pvBuffer
    Buffer provided by engine

    lBufferSize
    Size of the provided buffer

    lCopiedBytes
    Size of the copied bytes


    VSA_EVENTCBFP

    VS_CALLRC CALLBACK VSA_EVENTCBFP( 
       VSA_ENGINEpVsaEngine/* Handle to AV engine VSA_ENGINE */,
       VS_MESSAGE_TtMessage/* Message ID. typeof VS_MESSAGE_T */,
       VSA_PARAMpParameter/* Data passed by callback. */,
       VSA_USRDATApUsrData/* Pointer to user-defined data. */
    );

    This callback is for interactive event handling. it is not mandatory for the user or the VSA vendor! Each message must be returned with VS_CB_OK to proceed with the action, otherwise action will (must) be terminated with VSA_E_CBC_TERMINATED

    Defined in: VSAXXTYP.H

    Return Value

    Return value must be one of VS_CALLRC, otherwise the action will be terminated.

    Parameters

    pVsaEngine
    Handle to AV engine VSA_ENGINE

    tMessage
    Message ID. typeof VS_MESSAGE_T

    pParameter
    Data passed by callback.

    pUsrData
    Pointer to user-defined data.


    VsaCleanup

    VSA_RC VSA_API VsaCleanup( void );

    Global cleanup for the adapter. This function will be called at last before unloading the VSA.

    Defined in: VSAXXTYP.H

    Return Value

    Returncodes: one of VSA_RC

    VSA_OK
    Success

    VSA_E_NOT_INITIALISED
    Global initialization not successful

    VSA_E_IN_PROGRESS
    Any thread is still running


    VsaEnd

    VSA_RC VSA_API VsaEnd( 
       PPVSA_INITppVsaInit/* REQ[in] Address of handle VSA_INIT */,
       PPVSA_CONFIGppVsaConfig/* REQ[in] Address of handle VSA_CONFIG */
    );

    Closes the engine instance. Releases also VSA_CONFIG allocated by VsaGetConfig - assumes that the actual job is done there.
    "REQ" (required) parameters are mandatory.
    "OPT" (optional) parameters are not mandatory.

    Defined in: VSAXXTYP.H

    Return Value

    Returncodes: one of VSA_RC

    VSA_OK
    Success

    VSA_E_NULL_PARAM
    NULL pointer provided

    VSA_E_NOT_INITIALISED
    Global initialization not successful

    VSA_E_END_FAILED
    The AV engine could not be closed

    VSA_E_IN_PROGRESS
    Any thread is still running

    Parameters

    ppVsaInit
    REQ[in] Address of handle VSA_INIT

    ppVsaConfig
    REQ[in] Address of handle VSA_CONFIG


    VsaGetConfig

    VSA_RC VSA_API VsaGetConfig( 
       PPVSA_CONFIGppVsaConfig/* REQ[out] Address of handle VSA_CONFIG */
    );

    This call allows the SAP system to know which type of VSA was loaded and which parameters and other features it has. An AV vendor of a VSA can also define a default profile of initial and optional parameters here.
    "REQ" (required) parameters are mandatory.
    "OPT" (optional) parameters are not mandatory.

    Defined in: VSAXXTYP.H

    Return Value

    Returncodes: one of VSA_RC

    VSA_OK
    Success

    VSA_E_NOT_INITIALISED
    Global initialization not successful

    VSA_E_NO_SPACE
    Any resource allocation failed

    VSA_E_NULL_PARAMETER
    NULL pointer provided

    Parameters

    ppVsaConfig
    REQ[out] Address of handle VSA_CONFIG


    VsaInit

    VSA_RC VSA_API VsaInit( 
       const PVSA_CALLBACKpVsaCallback/* OPT[in ] Handle to VSA_CALLBACK */,
       const PVSA_INITPARAMSpVsaInitParams/* OPT[in ] Handle to VSA_INITPARAMS */,
       PPVSA_INITppVsaInit/* REQ[out] Address of handle VSA_INIT */
    );

    Initializes or creates a new scan engine instance. Then assigns all the vendor specific data structures from actual AV product to VSA data structure.
    "REQ" (required) parameters are mandatory.
    "OPT" (optional) parameters are not mandatory.

    Defined in: VSAXXTYP.H

    Return Value

    Returncodes: one of VSA_RC

    VSA_OK
    Success

    VSA_E_EXPIRED
    Engine or driver expired

    VSA_E_NO_SPACE
    Any resource allocation failed

    VSA_E_LOAD_FAILED
    Load failed (such as external process)

    VSA_E_BAD_EXPRESSION
    Regular expression syntax is invalid

    VSA_E_NULL_PARAM
    NULL pointer provided

    VSA_E_INVALID_PARAM
    At least one parameter is invalid

    VSA_E_DRIVER_FAILED
    At least one driver failed

    VSA_E_NOT_SUPPORTED
    At least one parameter or object is not supported

    VSA_E_CIO_FAILED
    Client I/O request action failed.

    VSA_E_NOT_INITIALISED
    Global initialization not successful

    VSA_E_CBC_TERMINATED
    Action was terminated during callback

    Parameters

    pVsaCallback
    OPT[in ] Handle to VSA_CALLBACK

    pVsaInitParams
    OPT[in ] Handle to VSA_INITPARAMS

    ppVsaInit
    REQ[out] Address of handle VSA_INIT


    VsaReleaseScan

    VSA_RC VSA_API VsaReleaseScan( 
       PPVSA_SCANINFOppVsaScanInfo/* REQ[in] Address of handle VSA_SCANINFO */
    );

    Release the dynamically allocated structure VSA_SCANINFO. The address of the of the handle is required but the handle can also point to NULL.
    "REQ" (required) parameters are mandatory.
    "OPT" (optional) parameters are not mandatory.

    Defined in: VSAXXTYP.H

    Return Value

    Returncodes: one of VSA_RC

    VSA_OK
    Success

    VSA_E_NOT_INITIALISED
    Global initialization not successful

    VSA_E_NULL_PARAM
    NULL pointer provided

    Parameters

    ppVsaScanInfo
    REQ[in] Address of handle VSA_SCANINFO


    VsaScan

    VSA_RC VSA_API VsaScan( 
       const PVSA_INITpVsaInit/* REQ[in ] Handle to VSA_INIT */,
       const PVSA_CALLBACKpVsaCallback/* OPT[in ] Handle to VSA_CALLBACK */,
       const PVSA_SCANPARAMpVsaScanParam/* REQ[in ] Handle to VSA_SCANPARAM */,
       const PVSA_OPTPARAMSpVsaOptParams/* OPT[in ] Handle to VSA_OPTPARAMS */,
       PPVSA_SCANINFOppVsaScanInfo/* OPT[out] Address of handle VSA_SCANINFO */
    );

    Performs the scan. Requires a valid instance handle VSA_INIT from VsaInit. If the VSA should not perform any callback during the scan action, then the parameter pVsaScanparam can be set to NULL. The address of a handle to a VSA_SCANINFO structure can optionally be provided. This means if "ppVsaScaninfo" is set to NULL, the VSA will not return any information about the scan action. This allows the caller to decide, if [only] callbacks [or | and] [only] the VSA_SCANINFO structure should be returned.
    "REQ" (required) parameters are mandatory.
    "OPT" (optional) parameters are not mandatory.

    Defined in: VSAXXTYP.H

    Return Value

    Returncodes: one of VSA_RC

    Virus error codes (negative values):

    VSA_E_CLEAN_FAILED
    Removing/replacing infection failed

    VSA_E_PATTERN_FOUND
    Pattern was found

    VSA_E_MACRO_FOUND
    Macro was found

    VSA_E_VIRUS_FOUND
    Virus was found

    VSA_E_CLEAN_OK
    The clean action was successful

    No error, no virus:

    VSA_OK
    Success

    Program error codes (positive values):

    VSA_E_NO_SPACE
    Any resource allocation failed

    VSA_E_NULL_PARAM
    NULL pointer provided

    VSA_E_INVALID_PARAM
    At least one parameter is invalid

    VSA_E_INVALID_HANDLE
    The provided handle is invalid

    VSA_E_NOT_INITIALISED
    The adapter was not successfully initialized

    VSA_E_NOT_SUPPORTED
    At least one parameter or object is not supported

    VSA_E_INVALID_SCANOBJECT
    See VSA_SCANPARAM, object is invalid

    VSA_E_CIO_FAILED
    Client I/O failed. Scan could not be performed.

    VSA_E_SCAN_FAILED
    The scan action failed

    VSA_E_NOT_SCANNED
    At least one object was not scanned

    VSA_E_CBC_TERMINATED
    Action was terminated during callback

    Parameters

    pVsaInit
    REQ[in ] Handle to VSA_INIT

    pVsaCallback
    OPT[in ] Handle to VSA_CALLBACK

    pVsaScanParam
    REQ[in ] Handle to VSA_SCANPARAM

    pVsaOptParams
    OPT[in ] Handle to VSA_OPTPARAMS

    ppVsaScanInfo
    OPT[out] Address of handle VSA_SCANINFO


    VsaStartup

    VSA_RC VSA_API VsaStartup( void );

    Global initialization of the adapter. This function will be called once after loading the VSA.

    Defined in: VSAXXTYP.H

    Return Value

    Returncodes: one of VSA_RC

    VSA_OK
    Success

    VSA_E_NOT_INITIALISED
    Global initialization not successful

    VSA_E_NO_SPACE
    Any resource allocation failed


    Bool

    Means unsigned 8-bit unsigned character: Byte.

    Defined in: VSAXXTYP.H


    Byte

    8-bit <=> 1 byte. Defined as "unsigned char"

    Defined in: VSAXXTYP.H


    Char

    Defined as UTF-8 string "unsigned char" which means the adapter has to use UTF-8 for character operations

    Defined in: VSAXXTYP.H


    Double

    8 byte value

    Defined in: VSAXXTYP.H


    EXTCHAR

    Extension replacement sign '*' (asterisk), such as C*,EX*,D

    Defined in: VSAXXTYP.H


    EXTSIGN

    Extension replace sign '?' (question mark), such as C??,EX?

    Defined in: VSAXXTYP.H


    Float

    4 byte floating point value

    Defined in: VSAXXTYP.H


    Int

    4 byte value with the range -2147483647 to 2147483647

    Defined in: VSAXXTYP.H


    Long

    8 byte value with the range -+ 9223372036854775807

    Defined in: VSAXXTYP.H


    LSTOK

    List/Token delimiter symbol ';' (semicolon).

    Defined in: VSAXXTYP.H


    Short

    2 byte value with the range -32767 to 32767

    Defined in: VSAXXTYP.H


    size_t

    Platform-specific data type size_t. Contains the byte length of an object

    Defined in: VSAXXTYP.H


    time_t

    Platform-specific data type time_t. Contains the time in sec.

    Defined in: VSAXXTYP.H


    UInt

    4 byte value with the range 0 to 4294967295

    Defined in: VSAXXTYP.H


    ULong

    8 byte value with the range 0 - 18446744073709551615

    Defined in: VSAXXTYP.H


    UShort

    2 byte value with the range 0 to 65535

    Defined in: VSAXXTYP.H


    Void

    Data type void. Pointer declarations are *PVoid, **PPVoid. Platform specific size !

    Defined in: VSAXXTYP.H


    VS_ACTIONTYPE_T

    enum VS_ACTIONTYPE_T {
    	VS_AT_NOACTION,
    	VS_AT_ACTIONFAILED,
    	VS_AT_CLEANED,
    	VS_AT_RENAMED,
    	VS_AT_DELETED,
    	VS_AT_MOVED,
    	VS_AT_BLOCKED,
    	VS_AT_ENCRYPTED,
    };
    
    The action the was done with the object.

    Defined in: VSAXXTYP.H

    Members

    VS_AT_NOACTION
    No action
    VS_AT_ACTIONFAILED
    The action failed; error
    VS_AT_CLEANED
    Object was repaired
    VS_AT_RENAMED
    Object was renamed
    VS_AT_DELETED
    Object was deleted
    VS_AT_MOVED
    Objects was moved to quarantine directory
    VS_AT_BLOCKED
    Object was blocked
    VS_AT_ENCRYPTED
    Object was encrypted

    VS_ADAPTER_T

    enum VS_ADAPTER_T {
    	VS_AD_SAP,
    };
    
    This enumerator identifies which certified adapter the partner provides. For new vendors or products, add your new ID here. You could also define an extra ID here for different versions of an engine to provide extra mechanisms.

    Defined in: VSAXXTYP.H

    Members

    VS_AD_SAP
    Example ID for a SAP VSA.

    VS_CALLRC

    enum VS_CALLRC {
    	VS_CB_EOF,
    	VS_CB_OK,
    	VS_CB_NEXT,
    	VS_CB_TERMINATE,
    };
    
    CALLBACK return codes

    Defined in: VSAXXTYP.H

    Members

    VS_CB_EOF
    Client I/O error or end-of-file return value
    VS_CB_OK
    Callback OK, continue the action
    VS_CB_NEXT
    Abort the current action, go to next object
    VS_CB_TERMINATE
    Terminate the complete callback action.

    VS_DETECTTYPE_T

    enum VS_DETECTTYPE_T {
    	VS_DT_NOVIRUS,
    	VS_DT_KNOWNVIRUS,
    	VS_DT_VARIANTVIRUS,
    	VS_DT_NEWVIRUS,
    	VS_DT_ACTIVECONTENT,
    	VS_DT_MIMEVALIDATION,
    	VS_DT_PATTERNMATCH,
    	VS_DT_ERROR,
    };
    
    Type of detection for found object.

    Defined in: VSAXXTYP.H

    Members

    VS_DT_NOVIRUS
    No virus <=> VS_VT_NOVIRUS
    VS_DT_KNOWNVIRUS
    Known virus. Provide additional information.
    VS_DT_VARIANTVIRUS
    New but similar to a known virus
    VS_DT_NEWVIRUS
    Not a known virus
    VS_DT_ACTIVECONTENT
    Not a virus but found active content
    VS_DT_MIMEVALIDATION
    Not a virus but found invalid MIME content
    VS_DT_PATTERNMATCH
    Not a virus but pattern matched
    VS_DT_ERROR
    An error occurred

    VS_INITPARAM_T

    enum VS_INITPARAM_T {
    	VS_IP_INITDRIVERS,
    	VS_IP_INITEXTRADRIVERS,
    	VS_IP_INITDRIVERDIRECTORY,
    	VS_IP_INITEXTRADRIVERDIRECTORY,
    	VS_IP_INITSERVERS,
    	VS_IP_INITTIMEOUT,
    	VS_IP_INITRECONNECTTIME,
    	VS_IP_INITCONTENTPATTERN,
    	VS_IP_INITREPLACEPATTERN,
    	VS_IP_INITREGEXFLAGS,
    	VS_IP_INITTEMP_PATH,
    	VS_IP_INITDIRECTORY,
    	VS_IP_INITENGINES,
    	VS_IP_INITENGINEDIRECTORY,
    	VS_IP_INITUPDATE_URI,
    	VS_IP_INITLICENSE_PATH,
    };
    
    Initial parameter list of VSA. These parameters must be set with the function VsaInit.

    Defined in: VSAXXTYP.H

    Members

    VS_IP_INITDRIVERS
    Standard driver(list) which should be loaded on VsaInit
    VS_IP_INITEXTRADRIVERS
    Extra or additional driver(list) in a separate location.
    VS_IP_INITDRIVERDIRECTORY
    Default directory in which the required drivers can be found.
    VS_IP_INITEXTRADRIVERDIRECTORY
    Extra or additional directory in which drivers can be found.
    VS_IP_INITSERVERS
    Server(list) to be connected if VSA is a scan daemon. Syntax: "server[:port];server[:port]"
    VS_IP_INITTIMEOUT
    Timeout in sec (time_t) for the connection to the VSA.
    VS_IP_INITRECONNECTTIME
    Time in sec (time_t) after which a VSA should reattempt connection if a TIMEOUT occures.
    VS_IP_INITCONTENTPATTERN
    POSIX regular pattern the engine should search on content scan
    VS_IP_INITREPLACEPATTERN
    POSIX reg. pattern for replace actions
    VS_IP_INITREGEXFLAGS
    POSIX reg. flags for the regex engine
    VS_IP_INITTEMP_PATH
    Temporary directory path where the engine may create files.
    VS_IP_INITDIRECTORY
    Base directory
    VS_IP_INITENGINES
    Threat engine(s) to be used for malware protection, content filtering, etc.
    VS_IP_INITENGINEDIRECTORY
    Default directory in which the threat engine(s) can be found
    VS_IP_INITUPDATE_URI
    URI (URL or local path) to an update service
    VS_IP_INITLICENSE_PATH
    Path where the external product can find a valid license file

    See Also

    When providing a "list" the token LSTOK separates the values. The number of entries in the list has to be checked by the adapter.
    VS_OPTPARAM_T


    VS_IOREQUEST_T

    enum VS_IOREQUEST_T {
    	VS_IO_OPENREAD,
    	VS_IO_OPENWRITE,
    	VS_IO_CLOSEREAD,
    	VS_IO_CLOSEWRITE,
    	VS_IO_READ,
    	VS_IO_WRITE,
    };
    
    This I/O request enumerator is used with simple bit flags. These should provide client input/output requests for bytes to be scanned. After VsaGetConfig the adapter should return the I/O request messages.

    Defined in: VSAXXTYP.H

    Members

    VS_IO_OPENREAD
    Open the stream for read
    VS_IO_OPENWRITE
    Open the stream for write
    VS_IO_CLOSEREAD
    Close the input stream
    VS_IO_CLOSEWRITE
    Close the output stream
    VS_IO_READ
    Read bytes from the stream
    VS_IO_WRITE
    Write bytes to the stream

    See Also

    VSA_CALLBACK.


    VS_MESSAGE_T

    enum VS_MESSAGE_T {
    	VS_M_ALL,
    	VS_M_ERROR,
    	VS_M_ABORTSCAN,
    	VS_M_VIRUS,
    	VS_M_CLEAN,
    	VS_M_NOTSCANNED,
    	VS_M_REPAIRED,
    	VS_M_NOTREPAIRED,
    	VS_M_OBJECTFOUND,
    	VS_M_MACROSCLEANED,
    	VS_M_CONTAINMACROS,
    	VS_M_EXPIRED,
    	VS_M_SCANACTIONS,
    	VS_M_SCANPROGRESS,
    	VS_M_MATCHPATTERN,
    	VS_M_REPLACEDPATTERN,
    };
    
    This message enumerator is used with simple bit flags. These should provide user-defined notification mechanism. After VsaGetConfig the adapter should return notification messages. The user can obtain for which events the VSA should send notifications. Such as: FLAG = VS_M_VIRUS | VS_M_CLEAN;

    Defined in: VSAXXTYP.H

    Members

    VS_M_ALL
    Should help the user to set all, regardless of the VSA
    VS_M_ERROR
    Error occurred. Send VSA error text
    VS_M_ABORTSCAN
    Abort current scan action? => Send JOBID
    VS_M_VIRUS
    Virus found ! => Send VSA_VIRUSINFO
    VS_M_CLEAN
    No virus found => Send JOBID
    VS_M_NOTSCANNED
    The object was not scanned => Send VSA_SCANERROR
    VS_M_REPAIRED
    The object was repaired => Send VSA_VIRUSINFO
    VS_M_NOTREPAIRED
    The object was not repaired => Send VSA_SCANERROR
    VS_M_OBJECTFOUND
    Object found such as OnFileFound => Send OBJECTNAME
    VS_M_MACROSCLEANED
    All macros in object cleaned => Send JOBID
    VS_M_CONTAINMACROS
    Object contains macros => Send JOBID
    VS_M_EXPIRED
    Signature patterns were updated, instance needs to be reloaded
    VS_M_SCANACTIONS
    Send number of re-scans if VS_OP_SCANLIMIT > 0
    VS_M_SCANPROGRESS
    Called in short distances => Send progress in percentage
    VS_M_MATCHPATTERN
    The content matches a specified expression. => Send VSA_CONTENTINFO
    VS_M_REPLACEDPATTERN
    The matched pattern was replaced. => Send VSA_CONTENTINFO

    See Also

    VSA_CALLBACK.


    VS_OBJECTTYPE_T

    enum VS_OBJECTTYPE_T {
    	VS_OT_UNKNOWN,
    	VS_OT_TEXT,
    	VS_OT_HTML,
    	VS_OT_XHTML,
    	VS_OT_XML,
    	VS_OT_XSL,
    	VS_OT_DTD,
    	VS_OT_JSCRIPT,
    	VS_OT_EMCASCRIPT,
    	VS_OT_VBSCRIPT,
    	VS_OT_RTF,
    	VS_OT_RICHTEXT,
    	VS_OT_CSS,
    	VS_OT_SGML,
    	VS_OT_ALF,
    	VS_OT_OTF,
    	VS_OT_SAPSHORTCUT,
    	VS_OT_INI,
    	VS_OT_IMAGE,
    	VS_OT_GIF,
    	VS_OT_JPEG,
    	VS_OT_BMP,
    	VS_OT_RIFF,
    	VS_OT_TIFF,
    	VS_OT_PNG,
    	VS_OT_ICO,
    	VS_OT_VIDEO,
    	VS_OT_MPEG,
    	VS_OT_QUICKTIME,
    	VS_OT_AVI,
    	VS_OT_AUDIO,
    	VS_OT_WAV,
    	VS_OT_MP3,
    	VS_OT_XMPEG,
    	VS_OT_MIDI,
    	VS_OT_REALAUDIO,
    	VS_OT_FLASHVIDEO,
    	VS_OT_BINARY,
    	VS_OT_MSO,
    	VS_OT_VBAMACRO,
    	VS_OT_COMPRESSED,
    	VS_OT_SELFEXTRACT,
    	VS_OT_PDF,
    	VS_OT_POSTSCRIPT,
    	VS_OT_EXEC,
    	VS_OT_ELF,
    	VS_OT_MACHO,
    	VS_OT_JAVA,
    	VS_OT_ODF,
    	VS_OT_OFFICE,
    	VS_OT_COM,
    	VS_OT_ARCHIVE,
    	VS_OT_SAR,
    	VS_OT_ZIP,
    	VS_OT_TAR,
    	VS_OT_GZIP,
    	VS_OT_ARJ,
    	VS_OT_RAR,
    	VS_OT_UUE,
    	VS_OT_CMZ,
    	VS_OT_CAB,
    	VS_OT_TNEF,
    	VS_OT_LHA,
    	VS_OT_BZIP2,
    	VS_OT_ICAB,
    	VS_OT_SFX,
    	VS_OT_ARC,
    	VS_OT_ACE,
    	VS_OT_JAR,
    	VS_OT_FLASH,
    	VS_OT_SILVERLIGHT,
    	VS_OT_SIM,
    	VS_OT_KEP,
    	VS_OT_MULTIPART,
    	VS_OT_EMBEDDED,
    	VS_OT_ENCRYPTED,
    	VS_OT_OLE2,
    	VS_OT_FORM_DATA,
    	VS_OT_MESSAGE,
    	VS_OT_RFC822,
    	VS_OT_NEWS,
    	VS_OT_PARTIAL,
    	VS_OT_HTTP,
    	VS_OT_EXTERNALBODY,
    	VS_OT_MODEL,
    	VS_OT_VRML,
    	VS_OT_3DMF,
    };
    
    Type of the object which was found. This enumeration is designed to store IDs of the MIME types (see RFC 2045 to 2049). The definition of MIME types are in canonical form, which means that the media types here are with a major integer and their subtypes with a "minor integer". The ranges of the media types are:

    text ... 000...199
    image ... 200...299
    video ... 300...399
    audio ... 400...499
    application ... 500...599
    application/archive ... 600...699
    multipart ... 700...799
    message ... 800...899
    model ... 900...999

    Defined in: VSAXXTYP.H

    Members

    VS_OT_UNKNOWN
    Set unknown/unknown or application/unknown
    VS_OT_TEXT
    Plain text, means text/plain
    VS_OT_HTML
    HTML object, means text/html
    VS_OT_XHTML
    XHTML object application/xhtml+xml
    VS_OT_XML
    XML object, text/xml
    VS_OT_XSL
    XML style sheet object
    VS_OT_DTD
    SGML Document Definition File
    VS_OT_JSCRIPT
    JavaScript Code, application/javascript (application/javascript)
    VS_OT_EMCASCRIPT
    Ecmascript, application/ecmascript
    VS_OT_VBSCRIPT
    Visual Basic for Applications Script
    VS_OT_RTF
    Microsoft RTF file (application/rtf)
    VS_OT_RICHTEXT
    Rich text file
    VS_OT_CSS
    CSS style sheet file
    VS_OT_SGML
    SGML file
    VS_OT_ALF
    Archive Link Format (application/x-alf)
    VS_OT_OTF
    Open Type Font (application/x-otf)
    VS_OT_SAPSHORTCUT
    SAP Short File with extension *.sap (application/x-sapshortcut)
    VS_OT_INI
    Textual configuration files with extension ini (text/x-ini)
    VS_OT_IMAGE
    Image object, means image/X (any)
    VS_OT_GIF
    GIF image file (application/gif)
    VS_OT_JPEG
    JPEG image file (application/jpg)
    VS_OT_BMP
    Bitmap image file
    VS_OT_RIFF
    RIFF image file
    VS_OT_TIFF
    TIFF image file
    VS_OT_PNG
    PNG image file (application/png)
    VS_OT_ICO
    ICO (icon image) file (application/ico)
    VS_OT_VIDEO
    Video object
    VS_OT_MPEG
    MPEG-1/2 video stream
    VS_OT_QUICKTIME
    Quick time file
    VS_OT_AVI
    Audio Video Interleave (AVI) File
    VS_OT_AUDIO
    Audio object
    VS_OT_WAV
    Waveform Audio
    VS_OT_MP3
    MPEG Audio Stream, Layer III
    VS_OT_XMPEG
    MPEG (mp2) file
    VS_OT_MIDI
    MIDI file
    VS_OT_REALAUDIO
    RealAudio file
    VS_OT_FLASHVIDEO
    Flash Video (video/x-flv)
    VS_OT_BINARY
    Binary object (application/octet-stream)
    VS_OT_MSO
    Microsoft Office document
    VS_OT_VBAMACRO
    VBA macro
    VS_OT_COMPRESSED
    Compressed object
    VS_OT_SELFEXTRACT
    Compressed object with self-extracting
    VS_OT_PDF
    Adobe PDF file (application/pdf)
    VS_OT_POSTSCRIPT
    Adobe Postscript file (application/postscript)
    VS_OT_EXEC
    Dos/Windows executable
    VS_OT_ELF
    Unix executable
    VS_OT_MACHO
    Mac executable
    VS_OT_JAVA
    JAVA byte code (application/x-java-class)
    VS_OT_ODF
    Open Document Formats (application/vnd.oasis.opendocument*)
    VS_OT_OFFICE
    Generic Office Formats, in case of no MSOffice and ODF
    VS_OT_COM
    MS-DOS COM (command) executable
    VS_OT_ARCHIVE
    Archive object
    VS_OT_SAR
    SAP archive format CAR/SAR (application/sar)
    VS_OT_ZIP
    ZIP archive (application/zip)
    VS_OT_TAR
    TAR archive
    VS_OT_GZIP
    GZip archive (application/zip)
    VS_OT_ARJ
    ARJ archive
    VS_OT_RAR
    RAR archive (application/rar)
    VS_OT_UUE
    UUE archive
    VS_OT_CMZ
    CMZ archive
    VS_OT_CAB
    Microsoft Cabinet archive
    VS_OT_TNEF
    TNEF archive
    VS_OT_LHA
    LHA archive
    VS_OT_BZIP2
    BZip2 archive
    VS_OT_ICAB
    Install Shield Cabinet archive
    VS_OT_SFX
    Self-extracting archive
    VS_OT_ARC
    LH ARC old version
    VS_OT_ACE
    WinAce Compressed File
    VS_OT_JAR
    JAR archive, (application/x-jar)
    VS_OT_FLASH
    Flash File (application/x-shockwave-flash)
    VS_OT_SILVERLIGHT
    Silverlight (application/x-silverlight)
    VS_OT_SIM
    SAP Tutor file (application/x-sim)
    VS_OT_KEP
    SAP Show file (outdated in NetWeaver) (application/x-kep)
    VS_OT_MULTIPART
    Multipart object
    VS_OT_EMBEDDED
    Embedded object
    VS_OT_ENCRYPTED
    Encrypted object
    VS_OT_OLE2
    Embedded document in OLE2 file
    VS_OT_FORM_DATA
    Multipart data from HTML forms
    VS_OT_MESSAGE
    Message RFC822 object
    VS_OT_RFC822
    RFC 1822 based messages
    VS_OT_NEWS
    Newsgroup message
    VS_OT_PARTIAL
    Message with partial content
    VS_OT_HTTP
    HTTP header message
    VS_OT_EXTERNALBODY
    Message with external content
    VS_OT_MODEL
    Vector model objects
    VS_OT_VRML
    VRML file
    VS_OT_3DMF
    3DMF file

    VS_OPTPARAM_T

    enum VS_OPTPARAM_T {
    	VS_OP_SCANBESTEFFORT,
    	VS_OP_SCANALLFILES,
    	VS_OP_SCANALLMACROS,
    	VS_OP_SCANALLEMBEDDED,
    	VS_OP_SCANEXTENSIONS,
    	VS_OP_SCANHEURISTICLEVEL,
    	VS_OP_SCANONLYHEURISTIC,
    	VS_OP_SCANLIMIT,
    	VS_OP_SCANEXTRACT,
    	VS_OP_SCANEXTRACT_PATH,
    	VS_OP_SCANEXTRACT_SIZE,
    	VS_OP_SCANEXTRACT_TIME,
    	VS_OP_SCANEXTRACT_DEPTH,
    	VS_OP_SCANEXTRACT_RATIO,
    	VS_OP_SCANLOGPATH,
    	VS_OP_SCANDIREXCLUDELIST,
    	VS_OP_SCANSUBDIRLEVEL,
    	VS_OP_SCANACCESSFILELOCAL,
    	VS_OP_SCANMIMETYPES,
    	VS_OP_SCANEXCLUDEMIMETYPES,
    	VS_OP_SCANREGEXFLAGS,
    	VS_OP_CLEANRENAME,
    	VS_OP_CLEANDELETE,
    	VS_OP_CLEANQUARANTINE,
    	VS_OP_CLEANNODELETEINARCHIVE,
    	VS_OP_CLEANNODELETEINEMBEDDED,
    	VS_OP_CLEANNODELETEJOKES,
    	VS_OP_BLOCKMIMETYPES,
    	VS_OP_BLOCKEXTENSIONS,
    };
    
    Initial parameter list of VSA. These parameters must be set with the function VsaScan.

    Defined in: VSAXXTYP.H

    Members

    VS_OP_SCANBESTEFFORT
    Set all flags known to the VSA to provide a scan on the "best effort" basis, such as SCANALLFILES
    VS_OP_SCANALLFILES
    Scan for all files, regardless of their extension. Means ??? or *
    VS_OP_SCANALLMACROS
    Scan for all macro types regardless of their file type. If SCANALLFILES, then this has no effect
    VS_OP_SCANALLEMBEDDED
    Scan in embedded objects: uu-/hex-/xx-/binhex-encoded files, objects in PDF etc.
    VS_OP_SCANEXTENSIONS
    Scan only for these extensions. Wildcards can also be used here, such as exe;com;b?t;h??;. See EXTSIGN and EXTCHAR.
    VS_OP_SCANHEURISTICLEVEL
    Activate heuristic searching at level X. 0 means deactivated
    VS_OP_SCANONLYHEURISTIC
    Use only heuristic mechanisms.
    VS_OP_SCANLIMIT
    Restricts scan/repair of an object to a number. In this way you can search, for example, only for one virus.
    VS_OP_SCANEXTRACT
    Archives or compressed objects should be unpacked
    VS_OP_SCANEXTRACT_PATH
    Unpack directory, such as temporary scan directory
    VS_OP_SCANEXTRACT_SIZE
    Maximum unpack size in size_t
    VS_OP_SCANEXTRACT_TIME
    Maximum unpack time
    VS_OP_SCANEXTRACT_DEPTH
    Maximum depth to which an object should be unpacked.
    VS_OP_SCANEXTRACT_RATIO
    Maximum ratio of compressed/uncompressed of an object
    VS_OP_SCANLOGPATH
    Path for log or trace file of the VSA.
    VS_OP_SCANDIREXCLUDELIST
    List of directories to be excluded when scanning subdirectories.
    VS_OP_SCANSUBDIRLEVEL
    Scans subdirectories to a level of X. 0 means that subdirectories are not scanned.
    VS_OP_SCANACCESSFILELOCAL
    Object can be accessed locally by the VSA or engine. Informs scan daemons that the object does not need to be sent using sockets.
    VS_OP_SCANMIMETYPES
    Scan and allow MIME types. Define more than one in a list or by wildcards, such as text*
    VS_OP_SCANEXCLUDEMIMETYPES
    Depreciated, do not use anymore, but support BLOCK parameters
    VS_OP_SCANREGEXFLAGS
    POSIX reg. flags for the regex engine
    VS_OP_CLEANRENAME
    An infected object should be renamed if it is cleaned. The rules for this depend on the VSA.
    VS_OP_CLEANDELETE
    An infected object should be deleted either directly or if not reparable, depending on the VSA.
    VS_OP_CLEANQUARANTINE
    Directory for infected objects. VSA should move the infected objects there.
    VS_OP_CLEANNODELETEINARCHIVE
    If an infection is found in an archive file, this subobject should not be deleted.
    VS_OP_CLEANNODELETEINEMBEDDED
    If an infection is found in an embedded object (including macros), this subobject should not be deleted. For example, for Microsoft Word documents with embedded macro viruses.
    VS_OP_CLEANNODELETEJOKES
    Infected objects should not be deleted if the VSA determines that they are not real viruses, but rather hoaxes or joke viruses.
    VS_OP_BLOCKMIMETYPES
    Block MIME types
    VS_OP_BLOCKEXTENSIONS
    Block files extensions

    See Also

    When providing a "list" the token LSTOK separates the values. The number of entries in the list has to be checked by the adapter.
    VS_INITPARAM_T


    VS_PARAMETER_T

    Union of parameter types.

    Defined in: VSAXXTYP.H

    See Also

    The number of entries in the list has to be checked by the adapter.
    VS_INITPARAM_T
    VS_OPTPARAM_T


    VS_PARAMTYPE_T

    enum VS_PARAMTYPE_T {
    	VS_TYPE_BOOL,
    	VS_TYPE_BYTE,
    	VS_TYPE_SHORT,
    	VS_TYPE_INT,
    	VS_TYPE_LONG,
    	VS_TYPE_FLOAT,
    	VS_TYPE_DOUBLE,
    	VS_TYPE_CHAR,
    	VS_TYPE_TIME_T,
    	VS_TYPE_SIZE_T,
    	VS_TYPE_OBJECT,
    };
    
    Virus scan specific DATA TYPES This section defines the data types known to the VSA as generic data types to those known on the upper level

    Defined in: VSAXXTYP.H

    Members

    VS_TYPE_BOOL
    boolean, 1 byte Bool
    VS_TYPE_BYTE
    byte, 1 byte Byte
    VS_TYPE_SHORT
    short, 2 byte Short
    VS_TYPE_INT
    int, 4 byte Int
    VS_TYPE_LONG
    long, 8 byte Long
    VS_TYPE_FLOAT
    float, 4 byte Float
    VS_TYPE_DOUBLE
    double, 8 byte Double
    VS_TYPE_CHAR
    UTF8, unsigned char Char
    VS_TYPE_TIME_T
    platform depend. time_t
    VS_TYPE_SIZE_T
    platform depend. size_t
    VS_TYPE_OBJECT
    void

    VS_THREADMODEL_T

    enum VS_THREADMODEL_T {
    	VS_THREAD_APARTMENT,
    	VS_THREAD_BOTH,
    	VS_THREAD_FREE,
    };
    
    Type of thread model the VSA supports. These types are corresponding to the COM/COM+ ThreadingModel identifiers.

    Defined in: VSAXXTYP.H

    Members

    VS_THREAD_APARTMENT
    Single-thread apartment (STA). The VSA supports only single threaded instances.
    VS_THREAD_BOTH
    STA and MTA provided.
    VS_THREAD_FREE
    Multi-thread apartment (MTA). The VSA instances are valid for different threads.

    VS_VIRUSTYPE_T

    enum VS_VIRUSTYPE_T {
    	VS_VT_NOVIRUS,
    	VS_VT_VIRUS,
    	VS_VT_TROJAN,
    	VS_VT_JOKE,
    	VS_VT_HOAX,
    	VS_VT_POLYMORPH,
    	VS_VT_ENCRYPTED,
    	VS_VT_COMPRESSED,
    	VS_VT_APPLICATION,
    	VS_VT_WORM,
    	VS_VT_CORRUPTED,
    	VS_VT_TEST,
    	VS_VT_BACKDOOR,
    	VS_VT_EXPLOIT,
    	VS_VT_FLOODER,
    	VS_VT_SPAM,
    	VS_VT_PUA,
    	VS_VT_CHAMELEON,
    };
    
    Classification of the found virus infection.

    Defined in: VSAXXTYP.H

    Members

    VS_VT_NOVIRUS
    Not a virus <=> VS_DT_NOVIRUS
    VS_VT_VIRUS
    Known virus, “normal” for us.
    VS_VT_TROJAN
    Trojan
    VS_VT_JOKE
    A bad joke, not a virus
    VS_VT_HOAX
    Wannabe virus; harmless.
    VS_VT_POLYMORPH
    A polymorphic virus
    VS_VT_ENCRYPTED
    An encrypted object that looks like a virus
    VS_VT_COMPRESSED
    A compressed object that looks like a virus
    VS_VT_APPLICATION
    Application that behaves like a virus, such as a dialer
    VS_VT_WORM
    A worm virus (such as an e-mail worm)
    VS_VT_CORRUPTED
    A corrupted object or an object that cannot be analyzed
    VS_VT_TEST
    A test virus, such as EICAR
    VS_VT_BACKDOOR
    A back door
    VS_VT_EXPLOIT
    An exploit
    VS_VT_FLOODER
    A flooder (such as ICQ bombs, lead to denial of service)
    VS_VT_SPAM
    A Spam mail
    VS_VT_PUA
    (P)otential (u)nwanted (a)pplication
    VS_VT_CHAMELEON
    Chameleon file, found during MIME check

    VSA_ACTIONPARAM_T

    enum VSA_ACTIONPARAM_T {
    	VSA_AP_CHECKMIMETYPE,
    	VSA_AP_SCAN,
    	VSA_AP_CHECKREPAIR,
    	VSA_AP_CLEAN,
    	VSA_AP_BLOCKACTIVECONTENT,
    	VSA_AP_REMOVEACTIVECONTENT,
    	VSA_AP_SCANCONTENT,
    	VSA_AP_REPLACECONTENT,
    };
    
    List of provided scan actions of the VSA.

    Defined in: VSAXXTYP.H

    Members

    VSA_AP_CHECKMIMETYPE
    Check whether it is worthwhile to scan the object and whether it is scanable by VSA
    VSA_AP_SCAN
    Scan only
    VSA_AP_CHECKREPAIR
    Scan and if infected check if reparable, but do not clean
    VSA_AP_CLEAN
    Scan and clean infected object
    VSA_AP_BLOCKACTIVECONTENT
    Scan and regard all macros as virus send VS_M_CONTAINMACROS
    VSA_AP_REMOVEACTIVECONTENT
    Scan and remove ***ALL*** embedded macros in objects
    VSA_AP_SCANCONTENT
    Scan the content and return content information structure
    VSA_AP_REPLACECONTENT
    Scan and replace the content with specified content

    VSA_ADAPTERINFO structure

    struct { 
     size_tstruct_size;
     VS_ADAPTER_TtAdapterID;
     VS_THREADMODEL_TtThreadingModel;
     UShortusVsiVersion;
     UShortusVsaMajVersion;
     UShortusVsaMinVersion;
     PCharpszVendorInfo;
     PCharpszAdapterName;
     BoolbReserved1;
     void *pvReserved2;

    } VSA_ADAPTERINFO;

    Virus scan adapter information structure to know which features and configuration the current adapter has.

    Defined in: VSAXXTYP.H

    Members

    struct_size
    Size of structure
    tAdapterID
    VS_ADAPTER_T ID of the certified vendor
    tThreadingModel
    VS_THREADMODEL_T Threading models: STA, both, MTA
    usVsiVersion
    Supported VSI version.
    usVsaMajVersion
    VSA major version
    usVsaMinVersion
    VSA minor version
    pszVendorInfo
    Version string of the vendor
    pszAdapterName
    VSA product name
    bReserved1
    Reserved for later usage
    pvReserved2
    Reserved for later usage

    See Also

    size_t, VSA_CONFIG, UInt, VS_ADAPTER_T, VS_THREADMODEL_T, Bool.


    VSA_CALLBACK structure

    struct { 
     size_tstruct_size;
     VSA_EVENTCBFPpEventCBFP;
     UIntuiEventMsgFlags;
     VSA_USRDATApvUsrData;
     PVoidpClientIOCBFP;
     UIntuiCIOMsgFlags;
     VSA_IODATApvIOData;

    } VSA_CALLBACK;

    Callback structure.

    Defined in: VSAXXTYP.H

    Members

    struct_size
    Size of structure
    pEventCBFP
    Callback function pointer of type VSA_EVENTCBFP
    uiEventMsgFlags
    Bit combination of VS_MESSAGE_T for callback
    pvUsrData
    Void* to pass own data through callback
    pClientIOCBFP
    Pointer of client callback VSA_CIOCBFP
    uiCIOMsgFlags
    Bit combination of VS_IOREQUEST_T for callback
    pvIOData
    Pointer to pass request data for I/O messages

    See Also

    size_t, UInt, Bool.


    VSA_CONFIG structure

    struct { 
     size_tstruct_size;
     PVSA_ADAPTERINFOpAdapterInfo;
     UIntuiVsaScanFlags;
     UIntuiVsaActionFlags;
     UIntuiVsaEvtMsgFlags;
     UIntuiVsaCIOMsgFlags;
     PVSA_INITPARAMSpInitParams;
     PVSA_OPTPARAMSpOptParams;
     BoolbReserved1;
     PVoidpvReserved2;

    } VSA_CONFIG;

    Configuration structure of the adapter contains features and settings of it. These settings are requested after the adapter is started and are responsible for the other function calls.

    Defined in: VSAXXTYP.H

    Members

    struct_size
    Size of structure
    pAdapterInfo
    Info about adapter to be used. Pointer to VSA_ADAPTERINFO
    uiVsaScanFlags
    OR linked value from VSA_SCANPARAM_T. Which scan parameters are known.
    uiVsaActionFlags
    Bit combination of VSA_ACTIONPARAM_T which are known
    uiVsaEvtMsgFlags
    Bit combination of VS_MESSAGE_T which are known
    uiVsaCIOMsgFlags
    Bit combination of VS_IOREQUEST_T which are known
    pInitParams
    Pointer to initial parameters array VSA_INITPARAMS
    pOptParams
    Pointer to optional parameters array VSA_OPTPARAMS
    bReserved1
    Reserved: for possible later usage
    pvReserved2
    Reserved: for possible later usage

    See Also

    size_t, VSA_ADAPTERINFO, UInt, VSA_INITPARAMS, VSA_OPTPARAMS, Bool, Void.


    VSA_CONTENTINFO structure

    struct { 
     size_tstruct_size;
     VS_OBJECTTYPE_TtObjectType;
     PCharpszExtension;
     PCharpszContentType;
     PCharpszCharSet;
     UIntuiJobID;
     PCharpszObjectName;
     size_tlObjectSize;
     size_tmatch_so;
     size_tmatch_eo;

    } VSA_CONTENTINFO;

    Information structure of the content to be scanned.

    Defined in: VSAXXTYP.H

    Members

    struct_size
    Size of structure
    tObjectType
    One of enumeration VS_OBJECTTYPE_T
    pszExtension
    Extension of the content, such as .doc, .xls
    pszContentType
    MIME type of content, see RFCs 2045/2046/2077
    pszCharSet
    Charset of content
    uiJobID
    JobID, passed back to caller
    pszObjectName
    Name of object, such as filename
    lObjectSize
    Size of the object, such as byte length, file size.
    match_so
    Byte offset from string's start to substring's start.
    match_eo
    Byte offset from string's start to substring's end.

    See Also

    size_t, VsaScan, UInt, VSA_SCANINFO, VS_OBJECTTYPE_T, time_t, Bool, Void.


    VSA_DRIVERINFO structure

    struct { 
     size_tstruct_size;
     PCharpszName;
     UShortusDrvMajVersion;
     UShortusDrvMinVersion;
     time_tutcDate;
     UIntuiViruses;
     UIntuiVariants;
     IntiDriverRC;

    } VSA_DRIVERINFO;

    Information structure about the loaded drivers.

    Defined in: VSAXXTYP.H

    Members

    struct_size
    Size of structure
    pszName
    Name of driver.
    usDrvMajVersion
    Major version of the driver
    usDrvMinVersion
    Minor version of the driver
    utcDate
    Driver date saved in UTC
    uiViruses
    Number of viruses detected by this driver
    uiVariants
    Number of variants detected by this driver
    iDriverRC
    Error return code of driver on load
    define:
    iDriverRC = 0 -> OK
    iDriverRC <> 0 -> error/warning in driver, vendor intern. Therefore set also ulErrorRC and fill pszErrorText in VSA_INIT

    See Also

    size_t, VsaInit, UInt, VSA_INIT, time_t, Bool, Void.


    VSA_ENGINE

    Handle to an external AV product. Data type is *Void

    Defined in: VSAXXTYP.H


    VSA_INIT structure

    struct { 
     size_tstruct_size;
     VSA_ENGINEhEngine;
     UIntuiViruses;
     UIntuiExtensions;
     UIntuiIntRevNum;
     UIntuiSignature;
     UShortusDrivers;
     PVSA_DRIVERINFOpDriver;
     UShortusEngineMajVersion;
     UShortusEngineMinVersion;
     PCharpszEngineVersionText;
     time_tutcDate;
     IntiErrorRC;
     PCharpszErrorText;

    } VSA_INIT;

    Single instance structure of VSA. The handle to the external product (engine, scan daemon) is stored here as a pointer (void). The other parameters are for information purposes. The caller has to check if a parameter is NULL.

    Defined in: VSAXXTYP.H

    Members

    struct_size
    Size of structure
    hEngine
    Handle to external AV engine VSA_ENGINE
    uiViruses
    Number of viruses known by engine
    uiExtensions
    Numbers of extensions which can be scanned
    uiIntRevNum
    Internal revision number from engine
    uiSignature
    Vendor-specific engine signature
    usDrivers
    Number of drivers, which currently used
    pDriver
    Pointer to driver structure VSA_DRIVERINFO
    usEngineMajVersion
    Major engine version number
    usEngineMinVersion
    Minor engine version number
    pszEngineVersionText
    Printable version string of engine
    utcDate
    Engine date saved in UTC
    iErrorRC
    Vendor dep. error code either from driver or engine
    pszErrorText
    Vendor dep. error text occurred in driver or engine

    See Also

    size_t, VsaInit, UInt, VSA_DRIVERINFO, time_t, Bool, Void.


    VSA_INITPARAM structure

    struct { 
     size_tstruct_size;
     VS_INITPARAM_TtCode;
     VS_PARAMTYPE_TtType;
     size_tlLength;
     VSA_PARAMVALUEpvValue;

    } VSA_INITPARAM;

    Initial parameter structure of the adapter.

    Defined in: VSAXXTYP.H

    Members

    struct_size
    Size of structure
    tCode
    Parameter code from enum VS_INITPARAM_T
    tType
    Type of pvValue VS_PARAMTYPE_T
    lLength
    Size of pvValue
    pvValue
    Content of value pvValue. Typeof: *Void

    See Also

    size_t, VSA_CONFIG, UInt, VSA_INITPARAMS, Bool, Void.


    VSA_INITPARAMS structure

    struct { 
     UShortusInitParams;
     PVSA_INITPARAMpInitParam;

    } VSA_INITPARAMS;

    Initial parameter array structure.

    Defined in: VSAXXTYP.H

    Members

    usInitParams
    Number of parameters in array
    pInitParam
    Pointer to the parameters VSA_INITPARAM

    See Also

    size_t, VSA_CONFIG, UInt, VSA_INITPARAM, Bool, Void.


    VSA_OPTPARAM structure

    struct { 
     size_tstruct_size;
     VS_OPTPARAM_TtCode;
     VS_PARAMTYPE_TtType;
     size_tlLength;
     VSA_PARAMVALUEpvValue;

    } VSA_OPTPARAM;

    Optional parameter structure of the adapter.

    Defined in: VSAXXTYP.H

    Members

    struct_size
    Size of structure
    tCode
    Parameter code from enum VS_OPTPARAM_T
    tType
    Type of pvValue VS_PARAMTYPE_T
    lLength
    Size of pvValue
    pvValue
    Content of value pvValue. Typeof: *Void

    See Also

    size_t, VSA_CONFIG, UInt, VSA_OPTPARAMS, Bool, Void.


    VSA_OPTPARAMS structure

    struct { 
     UShortusOptParams;
     PVSA_OPTPARAMpOptParam;

    } VSA_OPTPARAMS;

    Optional parameter array structure.

    Defined in: VSAXXTYP.H

    Members

    usOptParams
    Number of parameters in array
    pOptParam
    Pointer to the parameters VSA_OPTPARAM

    See Also

    size_t, VSA_CONFIG, UInt, VSA_OPTPARAM, Bool, Void.


    VSA_PARAM

    Pointer to the value returned by callback. The real information in the pointer might be dereferenced. Data type is *Void

    Defined in: VSAXXTYP.H


    VSA_PARAMVALUE

    Contain pointer to a parameter value. Data type is *Void

    Defined in: VSAXXTYP.H


    VSA_RC

    enum VSA_RC {
    	VSA_E_BLOCKED_BY_POLICY,
    	VSA_E_CLEAN_FAILED,
    	VSA_E_PATTERN_FOUND,
    	VSA_E_ACTIVECONTENT_FOUND,
    	VSA_E_VIRUS_FOUND,
    	VSA_E_CLEAN_OK,
    	VSA_OK,
    	VSA_E_NO_SPACE,
    	VSA_E_NULL_PARAM,
    	VSA_E_INVALID_PARAM,
    	VSA_E_INVALID_HANDLE,
    	VSA_E_NOT_INITIALISED,
    	VSA_E_EXPIRED,
    	VSA_E_LOAD_FAILED,
    	VSA_E_BAD_EXPRESSION,
    	VSA_E_DRIVER_FAILED,
    	VSA_E_NOT_SUPPORTED,
    	VSA_E_INVALID_SCANOBJECT,
    	VSA_E_CIO_FAILED,
    	VSA_E_SCAN_FAILED,
    	VSA_E_NOT_SCANNED,
    	VSA_E_END_FAILED,
    	VSA_E_IN_PROGRESS,
    	VSA_E_CBC_TERMINATED,
    };
    
    Returncodes of VSA implementations

    Defined in: VSAXXTYP.H

    Members

    VSA_E_BLOCKED_BY_POLICY
    Content was blocked because of VSA_AP_CHECKCONTENT policy
    VSA_E_CLEAN_FAILED
    Repair/clean of object failed
    VSA_E_PATTERN_FOUND
    Found pattern on content scan, only if VSA_AP_SCANCONTENT
    VSA_E_ACTIVECONTENT_FOUND
    Found macro during scan, only if VSA_AP_BLOCKACTIVECONTENT
    VSA_E_VIRUS_FOUND
    Found virus during scan
    VSA_E_CLEAN_OK
    Repair/clean of object was OK, Virus/Macros cleaned
    VSA_OK
    No error, no virus
    VSA_E_NO_SPACE
    Resource problem: no memory,disk space,handle,etc. avail.
    VSA_E_NULL_PARAM
    NULL parameter was supplied to function, where not allowed
    VSA_E_INVALID_PARAM
    At least one parameter is invalid
    VSA_E_INVALID_HANDLE
    Handle to adapter invalid
    VSA_E_NOT_INITIALISED
    If VsaStartup() was not successfully called
    VSA_E_EXPIRED
    Engine or driver(s) out of date - need update
    VSA_E_LOAD_FAILED
    Loading engine or another library failed
    VSA_E_BAD_EXPRESSION
    The passed regular expression contains a bad expression
    VSA_E_DRIVER_FAILED
    Loading the driver(s) failed or invalid driver
    VSA_E_NOT_SUPPORTED
    Action call or parameter is not supported on this VSA
    VSA_E_INVALID_SCANOBJECT
    Not correct object, such as "c:\\" for VSA_SP_FILE
    VSA_E_CIO_FAILED
    Client I/O callback failed. Scan could not be performed.
    VSA_E_SCAN_FAILED
    See VSA_SCANERROR, any scan problem during action occurred
    VSA_E_NOT_SCANNED
    Not an error, but a warning for the caller
    VSA_E_END_FAILED
    Termination/unload of VSA (engine) failed
    VSA_E_IN_PROGRESS
    VsaCleanup was not possible, a thread is still running
    VSA_E_CBC_TERMINATED
    Callback action was terminated by user

    VSA_SCANERROR structure

    struct { 
     size_tstruct_size;
     UIntuiJobID;
     PCharpszObjectName;
     size_tlObjectSize;
     IntiErrorRC;
     PCharpszErrorText;

    } VSA_SCANERROR;

    Information structure of a scan error that has occurred.

    Defined in: VSAXXTYP.H

    Members

    struct_size
    Size of structure
    uiJobID
    JobID, passed back to caller
    pszObjectName
    Name of object, such as filename
    lObjectSize
    Size of the object, such as byte length, file size.
    iErrorRC
    Vendor-dep. error code either from driver or engine
    pszErrorText
    Vendor-dep. error text occurred in driver or engine

    See Also

    size_t, VsaScan, UInt, VSA_SCANINFO, VSA_VIRUSINFO, time_t, Bool, Void.


    VSA_SCANINFO structure

    struct { 
     size_tstruct_size;
     UIntuiJobID;
     UIntuiScanned;
     UIntuiNotScanned;
     UIntuiClean;
     UIntuiInfections;
     UIntuiScanErrors;
     PVSA_CONTENTINFOpContentInfo;
     PVSA_VIRUSINFOpVirusInfo;
     PVSA_SCANERRORpScanError;
     PBytepbBytesCleaned;
     size_tlBytesCleaned;
     PVoidpvReserved1;

    } VSA_SCANINFO;

    Information structure of a scan result.

    Defined in: VSAXXTYP.H

    Members

    struct_size
    Size of structure
    uiJobID
    JobID, passed back to caller
    uiScanned
    Number of scanned objects, also counter for pContentInfo ()
    uiNotScanned
    Number of objects not scanned
    uiClean
    Number of clean objects
    uiInfections
    Number of infections, also counter for pVirusInfo ()
    uiScanErrors
    Number of errors during scan, also counter for pScanError ()
    pContentInfo
    Structure array (size = uiScanned) with VSA_CONTENTINFO to query information about the content.
    pVirusInfo
    Structure array (size = uiInfections) with VSA_VIRUSINFO to query infections without a callback function after a scan
    pScanError
    Structure array (size = uiScanErrors) with VSA_SCANERROR to query scan problems
    pbBytesCleaned
    Filtered or changed/cleaned bytes. Correspond to VSA_SCANPARAM field pbByte, but allocated by VSA. The VSA has to release/free it
    lBytesCleaned
    The size of the byte pbBytesCleaned
    pvReserved1
    Reserved, not in use

    See Also

    size_t, VsaScan, UInt, VSA_SCANERROR, VSA_VIRUSINFO, time_t, Bool, Void.


    VSA_SCANPARAM structure

    struct { 
     size_tstruct_size;
     VSA_SCANPARAM_TtScanCode;
     UInttActionCode;
     PCharpszObjectName;
     PBytepbByte;
     size_tlLength;
     UIntuiJobID;

    } VSA_SCANPARAM;

    Scan structure for VsaScan. Contains all information for the function.

    Defined in: VSAXXTYP.H

    Members

    struct_size
    Size of structure
    tScanCode
    Scan code,which object type should be scanned
    tActionCode
    Action type to be performed, such as SCAN | CLEAN
    pszObjectName
    Path, file, or only name if bytes are scanned
    pbByte
    Ptr to bytes of length. lLength to be scanned
    lLength
    Size of bytes to be scanned in pointer pbByte
    uiJobID
    JobID should only be passed back to caller

    See Also

    size_t, VsaScan, UInt, VSA_OPTPARAM, VSA_OPTPARAMS, Bool, Void.


    VSA_SCANPARAM_T

    enum VSA_SCANPARAM_T {
    	VSA_SP_CLIENTIO,
    	VSA_SP_BYTES,
    	VSA_SP_FILE,
    	VSA_SP_DIRECTORY,
    	VSA_SP_PARTITION,
    	VSA_SP_BOOTSECTOR,
    	VSA_SP_MEMORY,
    	VSA_SP_HTTP_HEADER,
    	VSA_SP_HTTP_BODY,
    	VSA_SP_HTTP_URI,
    	VSA_SP_HTTP_MESSAGE,
    	VSA_SP_MAIL_MESSAGE,
    };
    
    Scanable object list of an adapter.

    Defined in: VSAXXTYP.H

    Members

    VSA_SP_CLIENTIO
    Perform client I/O such as external streams
    VSA_SP_BYTES
    Byte array: an area in memory of a defined number of bytes in length.
    VSA_SP_FILE
    A single file in the local file system.
    VSA_SP_DIRECTORY
    A complete directory in the file system (with subdirectories, if specified).
    VSA_SP_PARTITION
    A complete local partition.
    VSA_SP_BOOTSECTOR
    MBR partition boot block of local hard disk
    VSA_SP_MEMORY
    The entire local main memory. Might not be possible for SAP platforms, but included for completeness
    VSA_SP_HTTP_HEADER
    HTTP header
    VSA_SP_HTTP_BODY
    HTTP body
    VSA_SP_HTTP_URI
    Uniform Ressource Locator (URI)
    VSA_SP_HTTP_MESSAGE
    Raw HTTP message
    VSA_SP_MAIL_MESSAGE
    Raw mail message

    VSA_USRDATA

    Contain pointer to user-defined data structure. Data type is *Void

    Defined in: VSAXXTYP.H


    VSA_VIRUSINFO structure

    struct { 
     size_tstruct_size;
     BoolbRepairable;
     VS_DETECTTYPE_TtDetectType;
     VS_VIRUSTYPE_TtVirusType;
     VS_OBJECTTYPE_TtObjectType;
     VS_ACTIONTYPE_TtActionType;
     UIntuiVirusID;
     PCharpszVirusName;
     UIntuiJobID;
     PCharpszObjectName;
     size_tlObjectSize;
     PCharpszFreeTextInfo;

    } VSA_VIRUSINFO;

    Information structure of a virus infection.

    Defined in: VSAXXTYP.H

    Members

    struct_size
    Size of structure
    bRepairable
    Flag to determine if the virus can be removed.
    tDetectType
    One of enumeration VS_DETECTTYPE_T
    tVirusType
    One of enumeration VS_VIRUSTYPE_T
    tObjectType
    One of enumeration VS_OBJECTTYPE_T
    tActionType
    One of enumeration VS_ACTIONTYPE_T
    uiVirusID
    Virus identifier, may be different for another VSA
    pszVirusName
    Virus name
    uiJobID
    JobID, passed back to caller
    pszObjectName
    Name of object, such as file name
    lObjectSize
    Size of the object, such as byte length, file size.
    pszFreeTextInfo
    Free text field, if engine has more information about infection

    See Also

    size_t, VsaScan, UInt, VSA_SCANINFO, VSA_SCANERROR, time_t, Bool, Void.