The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
conduit.h
Go to the documentation of this file.
1#pragma once
2/*
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16 */
17
18/**
19 * $Id: 83244952e65bb7a5e416355aaf316792ea5b4bfb $
20 *
21 * @file conduit.h
22 * @brief API to provide distinct communication conduits for the radmin protocol.
23 *
24 * @copyright 2015 Alan DeKok (aland@deployingradius.com)
25 */
26RCSIDH(conduit_h, "$Id: 83244952e65bb7a5e416355aaf316792ea5b4bfb $")
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32#define FR_CONDUIT_MAGIC (0xf7eead17)
33
46
52
58
64
65#define COMMAND_BUFFER_SIZE (1024)
66
74
80
81
82ssize_t fr_conduit_read_async(int fd, fr_conduit_type_t *pconduit, void *inbuf, size_t buflen,
83 size_t *leftover, bool *want_more);
84ssize_t fr_conduit_read(int fd, fr_conduit_type_t *pconduit, void *buffer, size_t buflen);
85ssize_t fr_conduit_write(int fd, fr_conduit_type_t conduit, void const *buffer, size_t buflen);
86
87#ifdef __cplusplus
88}
89#endif
static int const char char buffer[256]
Definition acutest.h:576
#define RCSIDH(h, id)
Definition build.h:484
uint16_t conduit
Definition conduit.h:77
fr_conduit_result_t
Definition conduit.h:53
@ FR_CONDUIT_FAIL
Definition conduit.h:54
@ FR_CONDUIT_PARTIAL
Definition conduit.h:55
@ FR_CONDUIT_SUCCESS
Definition conduit.h:56
fr_conduit_notify_t
Definition conduit.h:59
@ FR_NOTIFY_NONE
Definition conduit.h:60
@ FR_NOTIFY_BUFFERED
Definition conduit.h:61
@ FR_NOTIFY_UNBUFFERED
Definition conduit.h:62
uint32_t length
Definition conduit.h:78
fr_conduit_type_t
Definition conduit.h:34
@ FR_CONDUIT_STDOUT
Definition conduit.h:36
@ FR_CONDUIT_AUTH_RESPONSE
Definition conduit.h:41
@ FR_CONDUIT_HELP
Definition conduit.h:43
@ FR_CONDUIT_NOTIFY
Definition conduit.h:42
@ FR_CONDUIT_STDIN
Definition conduit.h:35
@ FR_CONDUIT_STDERR
Definition conduit.h:37
@ FR_CONDUIT_CMD_STATUS
Definition conduit.h:38
@ FR_CONDUIT_INIT_ACK
Definition conduit.h:39
@ FR_CONDUIT_COMPLETE
Definition conduit.h:44
@ FR_CONDUIT_AUTH_CHALLENGE
Definition conduit.h:40
ssize_t fr_conduit_read_async(int fd, fr_conduit_type_t *pconduit, void *inbuf, size_t buflen, size_t *leftover, bool *want_more)
Definition conduit.c:75
ssize_t offset
Definition conduit.h:70
ssize_t next
Definition conduit.h:71
ssize_t fr_conduit_write(int fd, fr_conduit_type_t conduit, void const *buffer, size_t buflen)
Definition conduit.c:228
ssize_t fr_conduit_read(int fd, fr_conduit_type_t *pconduit, void *buffer, size_t buflen)
Definition conduit.c:146
#define COMMAND_BUFFER_SIZE
Definition conduit.h:65
uint16_t origin
Definition conduit.h:76
fr_conduit_origin_t
Definition conduit.h:47
@ FR_ORIGIN_WORKER
Definition conduit.h:50
@ FR_ORIGIN_SIGNAL
Definition conduit.h:48
@ FR_ORIGIN_DEBUG
Definition conduit.h:49
unsigned short uint16_t
unsigned int uint32_t
long int ssize_t