.\" DO NOT MODIFY THIS FILE! It was generated by gdoc. .TH "gnutls_ia_set_client_avp_function" 3 "2.4.2" "gnutls" "gnutls" .SH NAME gnutls_ia_set_client_avp_function \- Used to set a AVP callback .SH SYNOPSIS .B #include .sp .BI "void gnutls_ia_set_client_avp_function(gnutls_ia_client_credentials_t " cred ", gnutls_ia_avp_func " avp_func ");" .SH ARGUMENTS .IP "gnutls_ia_client_credentials_t cred" 12 is a \fBgnutls_ia_client_credentials_t\fP structure. .IP "gnutls_ia_avp_func avp_func" 12 is the callback function .SH "DESCRIPTION" Set the TLS/IA AVP callback handler used for the session. The AVP callback is called to process AVPs received from the server, and to get a new AVP to send to the server. The callback's function form is: int (*avp_func) (gnutls_session_t session, void *ptr, const char *last, size_t lastlen, char **next, size_t *nextlen); The \fIsession\fP parameter is the \fBgnutls_session_t\fP structure corresponding to the current session. The \fIptr\fP parameter is the application hook pointer, set through \fBgnutls_ia_set_client_avp_ptr()\fP. The AVP received from the server is present in \fIlast\fP of \fIlastlen\fP size, which will be \fBNULL\fP on the first invocation. The newly allocated output AVP to send to the server should be placed in *\fInext\fP of *\fInextlen\fP size. The callback may invoke \fBgnutls_ia_permute_inner_secret()\fP to mix any generated session keys with the TLS/IA inner secret. Return 0 (\fBGNUTLS_IA_APPLICATION_PAYLOAD\fP) on success, or a negative error code to abort the TLS/IA handshake. Note that the callback must use allocate the \fInext\fP parameter using \fBgnutls_malloc()\fP, because it is released via \fBgnutls_free()\fP by the TLS/IA handshake function. .SH "REPORTING BUGS" Report bugs to . .SH COPYRIGHT Copyright \(co 2008 Free Software Foundation. .br Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. .SH "SEE ALSO" The full documentation for .B gnutls is maintained as a Texinfo manual. If the .B info and .B gnutls programs are properly installed at your site, the command .IP .B info gnutls .PP should give you access to the complete manual.