Communication buffer exit library functions structure

The db2commexitInit function takes a void * commexit_fns parameter. This parameter is cast to the version-specific structure which contains all of the functions that are implemented by the communication buffer exit library. The db2commexitInit function must assign the function pointers so that the database manager can call those functions.

The structure that must be completed, including a function pointer for each API, follows.
struct db2commexitFunctions_v1
{
    db2int32 version;

    SQL_API_RC ( SQL_API_FN * db2commexitTerm )
    (
       char     **errormsg,
       db2int32 *errormsglen
    );

    SQL_API_RC ( SQL_API_FN * db2commexitRegister )
    (
       void                         ** ppConnectionContext,
       const db2commexitCommInfo_v1  * pCommInfo,
       db2int32                        state,
       db2int64                      * pReservedFlags,
       char                         ** errormsg,
       db2int32                      * errormsglen
    );

    SQL_API_RC ( SQL_API_FN * db2commexitDeregister )
    (
       void                          * pConnectionContext,
       const db2commexitCommInfo_v1  * pCommInfo,
       db2int32                        state,
       db2int64                      * pReservedFlags,
       char                         ** errormsg,
       db2int32                      * errormsglen
    );

    SQL_API_RC ( SQL_API_FN * db2commexitRecv )
    (
       void                          * pConnectionContext,
       const db2commexitCommInfo_v1  * pCommInfo,
       const db2commexitBuffer       * pBuffer,
       db2int64                      * pReservedFlags,
       char                         ** errormsg,
       db2int32                      * errormsglen
    );

    SQL_API_RC ( SQL_API_FN * db2commexitSend )
    (
       void                          * pConnectionContext,
       const db2commexitCommInfo_v1  * pCommInfo,
       const db2commexitBuffer       * pBuffer,
       db2int64                      * pReservedFlags,
       char                         ** errormsg,
       db2int32                      * errormsglen
    );

    SQL_API_RC ( SQL_API_FN * db2commexitUserIdentity )
    (
       void                          * pConnectionContext,
       const db2commexitCommInfo_v1  * pCommInfo,
       db2int32                        state,
       db2int32                        usernameLen,
       const char                    * pUserame,
       db2int32                        sessionAuthidLen,
       const char                    * pSessionAuthid,
       db2int64                      * pReservedFlags,
       char                         ** errormsg,
       db2int32                      * errormsglen
    );

    SQL_API_RC ( SQL_API_FN * db2commexitFreeErrormsg )
    (
       char * errormsg
    );

};