gsasl  1.10.0
About: GNU SASL is an implementation of the Simple Authentication and Security Layer (SASL). Development version.
  Fossies Dox: gsasl-1.10.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

gsasl-mech.h
Go to the documentation of this file.
1 /* gsasl-mech.h --- Header file for mechanism handling in GNU SASL Library.
2  * Copyright (C) 2002-2021 Simon Josefsson
3  *
4  * This file is part of GNU SASL Library.
5  *
6  * GNU SASL Library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License
8  * as published by the Free Software Foundation; either version 2.1 of
9  * the License, or (at your option) any later version.
10  *
11  * GNU SASL Library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License License along with GNU SASL Library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef GSASL_MECH_H
24 #define GSASL_MECH_H
25 
26 /* Mechanism function prototypes. */
27 typedef int (*Gsasl_init_function) (Gsasl * ctx);
28 typedef void (*Gsasl_done_function) (Gsasl * ctx);
29 typedef int (*Gsasl_start_function) (Gsasl_session * sctx, void **mech_data);
30 typedef int (*Gsasl_step_function) (Gsasl_session * sctx, void *mech_data,
31  const char *input, size_t input_len,
32  char **output, size_t *output_len);
33 typedef void (*Gsasl_finish_function) (Gsasl_session * sctx, void *mech_data);
34 typedef int (*Gsasl_code_function) (Gsasl_session * sctx, void *mech_data,
35  const char *input, size_t input_len,
36  char **output, size_t *output_len);
37 
38 /* Collection of mechanism functions for either client or server. */
40 {
48 };
50 
51 /* Information about a mechanism. */
53 {
54  const char *name;
55 
58 };
59 typedef struct Gsasl_mechanism Gsasl_mechanism;
60 
61 /* Register new mechanism: register.c. */
62 extern GSASL_API int gsasl_register (Gsasl * ctx,
63  const Gsasl_mechanism * mech);
64 
65 #endif /* GSASL_MECH_H */
int(* Gsasl_start_function)(Gsasl_session *sctx, void **mech_data)
Definition: gsasl-mech.h:29
int(* Gsasl_step_function)(Gsasl_session *sctx, void *mech_data, const char *input, size_t input_len, char **output, size_t *output_len)
Definition: gsasl-mech.h:30
GSASL_API int gsasl_register(Gsasl *ctx, const Gsasl_mechanism *mech)
Definition: register.c:38
void(* Gsasl_done_function)(Gsasl *ctx)
Definition: gsasl-mech.h:28
void(* Gsasl_finish_function)(Gsasl_session *sctx, void *mech_data)
Definition: gsasl-mech.h:33
int(* Gsasl_init_function)(Gsasl *ctx)
Definition: gsasl-mech.h:27
int(* Gsasl_code_function)(Gsasl_session *sctx, void *mech_data, const char *input, size_t input_len, char **output, size_t *output_len)
Definition: gsasl-mech.h:34
#define GSASL_API
Definition: gsasl.h:38
Gsasl_start_function start
Definition: gsasl-mech.h:43
Gsasl_code_function encode
Definition: gsasl-mech.h:46
Gsasl_finish_function finish
Definition: gsasl-mech.h:45
Gsasl_step_function step
Definition: gsasl-mech.h:44
Gsasl_init_function init
Definition: gsasl-mech.h:41
Gsasl_code_function decode
Definition: gsasl-mech.h:47
Gsasl_done_function done
Definition: gsasl-mech.h:42
const char * name
Definition: gsasl-mech.h:54
struct Gsasl_mechanism_functions server
Definition: gsasl-mech.h:57
struct Gsasl_mechanism_functions client
Definition: gsasl-mech.h:56
Definition: internal.h:41