|
pianod2
multisource multiuser scriptable networked music player
|
Football transport layer implementation. More...
#include <config.h>#include <errno.h>#include <assert.h>#include "fb_public.h"#include "fb_transport.h"#include "fb_service.h"#include <sys/socket.h>
Macros | |
| #define | MSG_NOSIGNAL (0) |
| #define | TLS_PUBLIC_KEY_FILE "x509-server-key.pem" |
| #define | TLS_CERTIFICATE_FILE "x509-server.pem" |
Functions | |
| bool | fb_unencrypted_init (struct fb_connection_t *connection) |
| ssize_t | fb_unencrypted_handshake (struct fb_connection_t *connection) |
| Perform TLS handshaking on a new connection. Return incomplete, failure, or 0. More... | |
| ssize_t | fb_unencrypted_buffering (struct fb_connection_t *connection) |
| Query number of bytes in TLS buffers. More... | |
| ssize_t | fb_unencrypted_read (struct fb_connection_t *connection, char *data, ssize_t byte_count) |
| ssize_t | fb_unencrypted_write (struct fb_connection_t *connection, const char *data, ssize_t byte_count) |
| void | fb_unencrypted_done (FB_CONNECTION *connection) |
| bool | fb_file_init (struct fb_connection_t *connection) |
| ssize_t | fb_file_read (struct fb_connection_t *connection, char *data, ssize_t byte_count) |
| ssize_t | fb_file_write (struct fb_connection_t *connection, const char *data, ssize_t byte_count) |
| void | fb_file_done (FB_CONNECTION *connection) |
| bool | fb_init_tls_support (const char *path) |
| void | fb_cleanup_tls_support (void) |
Variables | |
| const ssize_t | FB_TRANSPORT_CLOSED = 0 |
| Connection closed normally. Returned by read transport function only. More... | |
| const ssize_t | FB_TRANSPORT_INCOMPLETE = -1 |
| An action was incomplete, but can be retried in the future. More... | |
| const ssize_t | FB_TRANSPORT_FAILURE = -2 |
| An action failed permanently; the connection has failed and should be closed. More... | |
| const FB_TRANSPORT_FUNCS | fb_transport_unencrypted |
| Transport virtual method table for unenrypted connections. More... | |
| const FB_TRANSPORT_FUNCS | fb_transport_read_file |
| Transport virtual method table for reading from files. More... | |
Football transport layer implementation.
Generic functions and support for unsecured connections and files.
| #define MSG_NOSIGNAL (0) |
| #define TLS_CERTIFICATE_FILE "x509-server.pem" |
| #define TLS_PUBLIC_KEY_FILE "x509-server-key.pem" |
| void fb_cleanup_tls_support | ( | void | ) |

| void fb_file_done | ( | FB_CONNECTION * | connection | ) |
Wrap up reading from a file.
| bool fb_file_init | ( | struct fb_connection_t * | connection | ) |
Prepare to read from a file in the guise of a connection.
| ssize_t fb_file_read | ( | struct fb_connection_t * | connection, |
| char * | data, | ||
| ssize_t | byte_count | ||
| ) |
Read data from an unencrypted BSD Sockets connection.
| ssize_t fb_file_write | ( | struct fb_connection_t * | connection, |
| const char * | data, | ||
| ssize_t | byte_count | ||
| ) |
Send writes to the logfile when reading from a file.
| bool fb_init_tls_support | ( | const char * | path | ) |

| ssize_t fb_unencrypted_buffering | ( | struct fb_connection_t * | connection | ) |
Query number of bytes in TLS buffers.
| void fb_unencrypted_done | ( | FB_CONNECTION * | connection | ) |
Close an unencrypted BSD Sockets connection.
| ssize_t fb_unencrypted_handshake | ( | struct fb_connection_t * | connection | ) |
Perform TLS handshaking on a new connection. Return incomplete, failure, or 0.
| bool fb_unencrypted_init | ( | struct fb_connection_t * | connection | ) |
Initialize an unencrypted BSD sockets connection.
| ssize_t fb_unencrypted_read | ( | struct fb_connection_t * | connection, |
| char * | data, | ||
| ssize_t | byte_count | ||
| ) |
Read data from an unencrypted BSD Sockets connection.
| ssize_t fb_unencrypted_write | ( | struct fb_connection_t * | connection, |
| const char * | data, | ||
| ssize_t | byte_count | ||
| ) |
Write data to an unencrytped BSD Sockets connection.
| const ssize_t FB_TRANSPORT_CLOSED = 0 |
Connection closed normally. Returned by read transport function only.
| const ssize_t FB_TRANSPORT_FAILURE = -2 |
An action failed permanently; the connection has failed and should be closed.
| const ssize_t FB_TRANSPORT_INCOMPLETE = -1 |
An action was incomplete, but can be retried in the future.
| const FB_TRANSPORT_FUNCS fb_transport_read_file |
Transport virtual method table for reading from files.
| const FB_TRANSPORT_FUNCS fb_transport_unencrypted |
Transport virtual method table for unenrypted connections.