31RCSIDH(tls_connection_h,
"$Id: 4f92e29216aeae5a3cbf23c1b6a157a5921c8489 $")
33#include "openssl_user_macros.h"
35#include <freeradius-devel/unlang/action.h>
36#include <freeradius-devel/unlang/function.h>
37#include <freeradius-devel/util/timer.h>
59 TLS_CONNECTION_NEW_SESSION = 0,
60 TLS_CONNECTION_HANDSHAKE,
61 TLS_CONNECTION_TICKET,
63 TLS_CONNECTION_CONNECTED
65} fr_tls_connection_state_t;
71 TLS_CONNECTION_FAIL_NONE = 0,
72 TLS_CONNECTION_FAIL_TLS,
73 TLS_CONNECTION_FAIL_SYSCALL,
74 TLS_CONNECTION_FAIL_APPLICATION,
75} fr_tls_connection_fail_t;
90 FR_TLS_CONNECTION_IO_OK = 0,
92 FR_TLS_CONNECTION_IO_RETRY,
94 FR_TLS_CONNECTION_IO_BLOCKED,
96 FR_TLS_CONNECTION_IO_EOF,
99 FR_TLS_CONNECTION_IO_FATAL,
100} fr_tls_connection_io_state_t;
110extern size_t fr_tls_connection_state_table_len;
113extern size_t fr_tls_connection_fail_table_len;
116extern size_t fr_tls_connection_io_state_table_len;
139typedef struct fr_tls_connection_s fr_tls_connection_t;
141struct fr_tls_connection_s {
144 fr_tls_session_t *tls_session;
148 fr_tls_connection_state_t state;
165 fr_tls_connection_fail_t failed;
176 fr_tls_connection_io_state_t io_state;
199 void (*connected)(fr_tls_connection_t *conn);
201 void (*close)(fr_tls_connection_t *conn);
203 ssize_t (*write)(fr_tls_connection_t *conn,
210fr_tls_connection_t *fr_tls_connection_alloc(TALLOC_CTX *ctx,
fr_timer_list_t *tl,
211 ssize_t (*write)(fr_tls_connection_t *conn,
213 void (*connected)(fr_tls_connection_t *conn),
214 void (*close)(fr_tls_connection_t *conn));
216int fr_tls_connection_push(fr_tls_connection_t *conn);
218void fr_tls_connection_wake(fr_tls_connection_t *conn);
220void fr_tls_connection_failed(fr_tls_connection_t *conn, fr_tls_connection_fail_t reason);
222void fr_tls_connection_eof(fr_tls_connection_t *conn);
224fr_tls_connection_io_state_t fr_tls_connection_io_error(fr_tls_connection_t *conn,
ssize_t slen);
226void fr_tls_connection_recv(fr_tls_connection_t *conn,
uint8_t const *
data,
size_t data_len);
228int fr_tls_connection_write(fr_tls_connection_t *conn);
230void fr_tls_connection_process(fr_tls_connection_t *conn);
static uint8_t request[4]
unlang_action_t(* unlang_function_no_result_t)(request_t *request, void *uctx)
A generic function pushed by a module or xlat to functions deeper in the C call stack to create resum...
An element in a table indexed by numeric value.