All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
otp_pw_valid.h
Go to the documentation of this file.
1 /*
2  * $Id: 25df9032dfc012a03e3d61045e5f9adf9ff2a8ad $
3  *
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.
8  *
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.
13  *
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
17  *
18  * Copyright 2006 TRI-D Systems, Inc.
19  */
20 
21 #ifndef OTP_PW_VALID_H
22 #define OTP_PW_VALID_H
23 
24 RCSIDH(otp_pw_valid_h, "$Id: 25df9032dfc012a03e3d61045e5f9adf9ff2a8ad $")
25 
26 #include <pthread.h>
27 #include <sys/types.h>
28 #include "extern.h" /* rlm_otp_t */
29 #include "otp.h" /* otp_request_t, otp_reply_t */
30 
31 typedef struct otp_fd_t {
32  pthread_mutex_t mutex;
33  char const *path; /* allows diff instances to use diff otpds */
34  int fd;
35  struct otp_fd_t *next;
36 } otp_fd_t;
37 
38 static int otprc2rlmrc(int);
39 static int otp_verify(rlm_otp_t const *,
40  otp_request_t const *, otp_reply_t *);
41 static int otp_read(otp_fd_t *, char *, size_t);
42 static int otp_write(otp_fd_t *, char const *, size_t);
43 static int otp_connect(char const *);
44 static otp_fd_t *otp_getfd(rlm_otp_t const *);
45 static void otp_putfd(otp_fd_t *, int);
46 
47 #endif /* OTP_PW_VALID_H */
#define RCSIDH(h, id)
Definition: build.h:136
pthread_mutex_t mutex
Definition: otp_pw_valid.h:32
static int otprc2rlmrc(int)
static int otp_verify(rlm_otp_t const *, otp_request_t const *, otp_reply_t *)
char const * path
Definition: otp_pw_valid.h:33
static void otp_putfd(otp_fd_t *, int)
static otp_fd_t * otp_getfd(rlm_otp_t const *)
static int otp_write(otp_fd_t *, char const *, size_t)
static int otp_connect(char const *)
static int otp_read(otp_fd_t *, char *, size_t)
struct otp_fd_t * next
Definition: otp_pw_valid.h:35
struct otp_fd_t otp_fd_t