4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 * Copyright 2006 TRI-D Systems, Inc.
21 #ifndef OTP_PW_VALID_H
22 #define OTP_PW_VALID_H
24 #include <freeradius-devel/ident.h>
25 RCSIDH(otp_pw_valid_h, "$Id$")
28 #include <sys/types.h>
29 #include "extern.h" /* otp_option_t */
30 #include "otp.h" /* otp_request_t, otp_reply_t */
32 typedef struct otp_fd_t {
33 pthread_mutex_t mutex;
34 const char *path; /* allows diff instances to use diff otpds */
36 struct otp_fd_t *next;
39 static int otprc2rlmrc(int);
40 static int otp_verify(const otp_option_t *,
41 const otp_request_t *, otp_reply_t *);
42 static int otp_read(otp_fd_t *, char *, size_t);
43 static int otp_write(otp_fd_t *, const char *, size_t);
44 static int otp_connect(const char *);
45 static otp_fd_t *otp_getfd(const otp_option_t *);
46 static void otp_putfd(otp_fd_t *, int);
48 #endif /* OTP_PW_VALID_H */