summaryrefslogtreecommitdiff
path: root/doc/tex
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-12-06 17:14:22 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-12-06 17:14:22 +0000
commitb0d4b6150fac1f17c61058a19e86ccedc2ff87c2 (patch)
tree4ec51caa2caf3ac4b876240d7e45c80863a483fe /doc/tex
parent84db053194b3e76290e75e6c4a268b2143774687 (diff)
downloadgnutls-b0d4b6150fac1f17c61058a19e86ccedc2ff87c2.tar.gz
Added the new functions gnutls_get_malloc_function(), gnutls_get_free_function(). Also changed the way callback functions must allocate data. They now need to use these functions, instead of just calling malloc().
Diffstat (limited to 'doc/tex')
-rw-r--r--doc/tex/Makefile.am2
-rw-r--r--doc/tex/callbacks.tex24
-rw-r--r--doc/tex/library.tex2
3 files changed, 27 insertions, 1 deletions
diff --git a/doc/tex/Makefile.am b/doc/tex/Makefile.am
index 4cf7322bee..8023be5b54 100644
--- a/doc/tex/Makefile.am
+++ b/doc/tex/Makefile.am
@@ -17,7 +17,7 @@ TEX_OBJECTS = gnutls.tex ../../lib/gnutls-api.tex fdl.tex \
appendix.tex x509cert.xml.tex pgpcert.xml.tex \
programs.tex library.tex certificate.tex record_weaknesses.tex \
tlsintro.tex compression.tex $(EXAMPLE_OBJECTS) \
- tls_extensions.tex srp.tex preparation.tex
+ tls_extensions.tex srp.tex preparation.tex callbacks.tex
gnutls.html: $(TEX_OBJECTS)
-latex2html gnutls.tex -no_navigation -split 0 \
diff --git a/doc/tex/callbacks.tex b/doc/tex/callbacks.tex
new file mode 100644
index 0000000000..59f3fff868
--- /dev/null
+++ b/doc/tex/callbacks.tex
@@ -0,0 +1,24 @@
+\section{Callback functions}
+\index{Callback functions}
+
+There are several cases where \gnutls{} may need some out of band input from
+your program. This is now implemented using some callback functions,
+which your program is expected to register.
+
+An example of this type of functions are the push and pull callbacks
+which are used to specify the functions that will retrieve and send
+data to the transport layer.
+\begin{itemize}
+\item \printfunc{gnutls_transport_set_push_function}{gnutls\_transport\_set\_push\_function}
+\item \printfunc{gnutls_transport_set_pull_function}{gnutls\_transport\_set\_pull\_function}
+\end{itemize}
+
+Other callback functions such as the one set by
+\printfunc{gnutls_srp_set_server_credentials_function}{gnutls\_srp\_set\_server\_credentials\_function},
+may require more complicated input, including data to be allocated.
+These callbacks should use the following function to get a malloc()
+and a free() like functions, to allocate data.
+\begin{itemize}
+\item \printfunc{gnutls_global_get_malloc_function}{gnutls\_global\_get\_malloc\_function}
+\item \printfunc{gnutls_global_get_free_function}{gnutls\_global\_get\_free\_function}
+\end{itemize}
diff --git a/doc/tex/library.tex b/doc/tex/library.tex
index 62cbdc4596..5ef9b58f29 100644
--- a/doc/tex/library.tex
+++ b/doc/tex/library.tex
@@ -107,3 +107,5 @@ with the previous one.
\input{errors}
\input{memory}
+
+\input{callbacks}