All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
channel.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
15  */
16 #ifndef _FR_CHANNEL_H
17 #define _FR_CHANNEL_H
18 /**
19  * $Id: eb27af9f1cbae8145cbec6c3c044881e8dbb4c05 $
20  *
21  * @file include/channel.h
22  * @brief API to provide distinct communication channels for the radmin protocol.
23  *
24  * @copyright 2015 Alan DeKok <aland@deployingradius.com>
25  */
26 RCSIDH(channel_h, "$Id: eb27af9f1cbae8145cbec6c3c044881e8dbb4c05 $")
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 typedef enum fr_channel_type_t {
43 
44 typedef enum fr_channel_result_t {
48 
49 typedef enum fr_channel_notify_t {
54 
55 
56 ssize_t fr_channel_drain(int fd, fr_channel_type_t *pchannel, void *inbuf, size_t buflen, uint8_t **outbuf, size_t have_read);
57 ssize_t fr_channel_read(int fd, fr_channel_type_t *pchannel, void *buffer, size_t buflen);
58 ssize_t fr_channel_write(int fd, fr_channel_type_t channel, void const *buffer, size_t buflen);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 #endif /* _FR_CHANNEL_H */
#define RCSIDH(h, id)
Definition: build.h:136
fr_channel_notify_t
Definition: channel.h:49
ssize_t fr_channel_read(int fd, fr_channel_type_t *pchannel, void *buffer, size_t buflen)
Definition: channel.c:125
fr_channel_type_t
Definition: channel.h:32
ssize_t fr_channel_write(int fd, fr_channel_type_t channel, void const *buffer, size_t buflen)
Definition: channel.c:205
ssize_t fr_channel_drain(int fd, fr_channel_type_t *pchannel, void *inbuf, size_t buflen, uint8_t **outbuf, size_t have_read)
Definition: channel.c:61
fr_channel_result_t
Definition: channel.h:44