HP-UX C SIP Stack Programmer's Guide (Novembery 2007)

Authentication 191
Client Authentication Implementation
pRpoolUserName->hPool,
pRpoolUserName->hPage,
(void*) strAuthUserName,
strlen(strAuthUserName) + 1,
&(pRpoolUserName->offset));
/*Appends the password to the given page.*/
RPOOL_AppendFromExternalToPage(
pRpoolPassword->hPool,
pRpoolPassword->hPage,
(void*) strAuthPassword,
strlen(strAuthPassword) + 1,
&(pRpoolPassword->offset));
}
/*==========================================================================*/
SETTING APPLICATION CALLBACKS
Set your callback functions pointers in the authenticator using
RvSipAuthenticatorSetEvHandlers().
The authenticator callback functions are gathered together in a structure called
RvSipAuthenticatorEvHandlers. This structure is where you should set your
callback function pointers and is given as a parameter to
RvSipAuthenticatorSetEvHandlers().
Sample Code
The following code demonstrates how to set callback functions.
/*=========================================================================================*/
static void SetEventHandlers()
{
RvStatus status;
RvSipAuthenticatorEvHandlers authEvHandlers;
memset(&authEvHandlers,0,sizeof(RvSipAuthenticatorEvHandlers));
/*Sets application callbacks in the structure.*/
authEvHandlers.pfnMD5AuthenticationExHandler = AppAuthenticationMD5Ev;
authEvHandlers.pfnGetSharedSecretAuthenticationHandler = AppAuthenticationGetSharedSecretEv;
status = RvSipAuthenticatorSetEvHandlers(
g_hAuthenticatorMgr,