/*
* Dolda Connect - Modular multiuser Direct Connect-style client
- * Copyright (C) 2004 Fredrik Tolf (fredrik@dolda2000.com)
+ * Copyright (C) 2004 Fredrik Tolf <fredrik@dolda2000.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include <wchar.h>
+#include "net.h"
+
#define AUTH_SUCCESS 0 /* Authentication successful and done */
#define AUTH_DENIED 1 /* Ultimately failed - reason in handle->text */
#define AUTH_PASS 2 /* Pass data - look in handle->prompt */
wchar_t *name;
int (*inithandle)(struct authhandle *handle, char *username);
void (*release)(struct authhandle *handle);
- int (*authenticate)(struct authhandle *handle, char *data);
+ int (*authenticate)(struct authhandle *handle, struct socket *sk, char *data);
int (*renewcred)(struct authhandle *handle);
int (*opensess)(struct authhandle *handle);
int (*closesess)(struct authhandle *handle);
+ int (*available)(struct socket *sk);
};
struct authhandle
void *mechdata;
};
-int authenticate(struct authhandle *handle, char *data);
+int authenticate(struct authhandle *handle, struct socket *sk, char *data);
struct authhandle *initauth(wchar_t *mechname, char *username);
void authgethandle(struct authhandle *auth);
void authputhandle(struct authhandle *auth);
int authopensess(struct authhandle *handle);
int authclosesess(struct authhandle *handle);
void regmech(struct authmech *mech);
+int authavailable(struct authmech *mech, struct socket *sk);
extern struct authmech *mechs;