Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_ia_set_client_avp_function.3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
2 .TH "gnutls_ia_set_client_avp_function" 3 "2.12.6.1" "gnutls" "gnutls"
3 .SH NAME
4 gnutls_ia_set_client_avp_function \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/extra.h>
7 .sp
8 .BI "void gnutls_ia_set_client_avp_function(gnutls_ia_client_credentials_t " cred ", gnutls_ia_avp_func " avp_func ");"
9 .SH ARGUMENTS
10 .IP "gnutls_ia_client_credentials_t cred" 12
11 is a \fBgnutls_ia_client_credentials_t\fP structure.
12 .IP "gnutls_ia_avp_func avp_func" 12
13 is the callback function
14 .SH "DESCRIPTION"
15 Set the TLS/IA AVP callback handler used for the session.
16
17 The AVP callback is called to process AVPs received from the
18 server, and to get a new AVP to send to the server.
19
20 The callback's function form is:
21 int (*avp_func) (gnutls_session_t session, void *ptr,
22 const char *last, size_t lastlen,
23 char **next, size_t *nextlen);
24
25 The \fIsession\fP parameter is the \fBgnutls_session_t\fP structure
26 corresponding to the current session.  The \fIptr\fP parameter is the
27 application hook pointer, set through
28 \fBgnutls_ia_set_client_avp_ptr()\fP.  The AVP received from the server
29 is present in \fIlast\fP of \fIlastlen\fP size, which will be \fBNULL\fP on the
30 first invocation.  The newly allocated output AVP to send to the
31 server should be placed in *\fInext\fP of *\fInextlen\fP size.
32
33 The callback may invoke \fBgnutls_ia_permute_inner_secret()\fP to mix any
34 generated session keys with the TLS/IA inner secret.
35
36 Return 0 (\fBGNUTLS_IA_APPLICATION_PAYLOAD\fP) on success, or a negative
37 error code to abort the TLS/IA handshake.
38
39 Note that the callback must use allocate the \fInext\fP parameter using
40 \fBgnutls_malloc()\fP, because it is released via \fBgnutls_free()\fP by the
41 TLS/IA handshake function.
42 .SH "REPORTING BUGS"
43 Report bugs to <bug-gnutls@gnu.org>.
44 GnuTLS home page: http://www.gnu.org/software/gnutls/
45 General help using GNU software: http://www.gnu.org/gethelp/
46 .SH COPYRIGHT
47 Copyright \(co 2008 Free Software Foundation.
48 .br
49 Copying and distribution of this file, with or without modification,
50 are permitted in any medium without royalty provided the copyright
51 notice and this notice are preserved.
52 .SH "SEE ALSO"
53 The full documentation for
54 .B gnutls
55 is maintained as a Texinfo manual.  If the
56 .B info
57 and
58 .B gnutls
59 programs are properly installed at your site, the command
60 .IP
61 .B info gnutls
62 .PP
63 should give you access to the complete manual.