ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/sasl.h
Revision: 1.2
Committed: Sat Jul 21 01:29:07 2007 UTC (16 years, 10 months ago) by pippijn
Content type: text/plain
Branch: MAIN
Changes since 1.1: +2 -2 lines
Log Message:
- moved to new documentation system
- fixed small build error

File Contents

# Content
1 /*
2 * Copyright © 2006 Atheme Development Group
3 * Rights to this code are as documented in doc/pod/license.pod.
4 *
5 * Data structures for SASL plugin use.
6 *
7 * $Id: sasl.h,v 1.1 2007-07-19 08:24:50 pippijn Exp $
8 */
9
10 #ifndef SASL_H
11 #define SASL_H
12
13 struct sasl_mechanism_t;
14
15 struct sasl_session_t
16 {
17 char uid[IDLEN];
18 char *buf, *p;
19 int len, flags;
20
21 sasl_mechanism_t *mechptr;
22 void *mechdata;
23
24 char *username;
25 };
26
27 struct sasl_message_t
28 {
29 char *uid;
30 char mode;
31 char *buf;
32 };
33
34 struct sasl_mechanism_t
35 {
36 char name[21];
37 int (*mech_start) (sasl_session_t *sptr, char **buffer, int *buflen);
38 int (*mech_step) (sasl_session_t *sptr, char *message, int length, char **buffer, int *buflen);
39 void (*mech_finish) (sasl_session_t *sptr);
40 };
41
42 #define ASASL_FAIL 0 /* client supplied invalid credentials / screwed up their formatting */
43 #define ASASL_MORE 1 /* everything looks good so far, but we're not done yet */
44 #define ASASL_DONE 2 /* client successfully authenticated */
45
46 #define ASASL_MARKED_FOR_DELETION 1 /* see delete_stale() in saslserv/main.c */
47 #define ASASL_NEED_LOG 2 /* user auth success needs to be logged still */
48
49 #endif