| VLC
    3.0.18
    | 

| Data Structures | |
| struct | vlc_tls_socket | 
| Macros | |
| #define | SOL_TCP IPPROTO_TCP | 
| Typedefs | |
| typedef struct vlc_tls_socket | vlc_tls_socket_t | 
| Functions | |
| static int | tls_server_load (void *func, va_list ap) | 
| static int | tls_client_load (void *func, va_list ap) | 
| static void | tls_unload (void *func, va_list ap) | 
| vlc_tls_creds_t * | vlc_tls_ServerCreate (vlc_object_t *obj, const char *cert_path, const char *key_path) | 
| Allocates server TLS credentials.  More... | |
| vlc_tls_creds_t * | vlc_tls_ClientCreate (vlc_object_t *obj) | 
| Allocates TLS credentials for a client.  More... | |
| void | vlc_tls_Delete (vlc_tls_creds_t *crd) | 
| Releases TLS credentials.  More... | |
| static vlc_tls_t * | vlc_tls_SessionCreate (vlc_tls_creds_t *crd, vlc_tls_t *sock, const char *host, const char *const *alpn) | 
| void | vlc_tls_SessionDelete (vlc_tls_t *session) | 
| Destroys a TLS session down.  More... | |
| static void | cleanup_tls (void *data) | 
| vlc_tls_t * | vlc_tls_ClientSessionCreate (vlc_tls_creds_t *crd, vlc_tls_t *sock, const char *host, const char *service, const char *const *alpn, char **alp) | 
| Initiates a client TLS session.  More... | |
| vlc_tls_t * | vlc_tls_ServerSessionCreate (vlc_tls_creds_t *crd, vlc_tls_t *sock, const char *const *alpn) | 
| Creates a TLS server session.  More... | |
| ssize_t | vlc_tls_Read (vlc_tls_t *session, void *buf, size_t len, bool waitall) | 
| Receives data through a socket.  More... | |
| ssize_t | vlc_tls_Write (vlc_tls_t *session, const void *buf, size_t len) | 
| Sends data through a socket.  More... | |
| char * | vlc_tls_GetLine (vlc_tls_t *session) | 
| Receives a text line through a socket.  More... | |
| static int | vlc_tls_SocketGetFD (vlc_tls_t *tls) | 
| static ssize_t | vlc_tls_SocketRead (vlc_tls_t *tls, struct iovec *iov, unsigned count) | 
| static ssize_t | vlc_tls_SocketWrite (vlc_tls_t *tls, const struct iovec *iov, unsigned count) | 
| static int | vlc_tls_SocketShutdown (vlc_tls_t *tls, bool duplex) | 
| static void | vlc_tls_SocketClose (vlc_tls_t *tls) | 
| static vlc_tls_t * | vlc_tls_SocketAlloc (int fd, const struct sockaddr *restrict peer, socklen_t peerlen) | 
| vlc_tls_t * | vlc_tls_SocketOpen (int fd) | 
| Creates a transport-layer stream from a socket.  More... | |
| int | vlc_tls_SocketPair (int family, int protocol, vlc_tls_t *pair[2]) | 
| Creates a connected pair of transport-layer sockets.  More... | |
| static vlc_tls_t * | vlc_tls_SocketAddrInfo (const struct addrinfo *restrict info) | 
| Allocates an unconnected transport layer socket.  More... | |
| static int | vlc_tls_WaitConnect (vlc_tls_t *tls) | 
| Waits for pending transport layer socket connection.  More... | |
| static ssize_t | vlc_tls_Connect (vlc_tls_t *tls) | 
| Connects a transport layer socket.  More... | |
| static ssize_t | vlc_tls_ConnectWrite (vlc_tls_t *tls, const struct iovec *iov, unsigned count) | 
| vlc_tls_t * | vlc_tls_SocketOpenAddrInfo (const struct addrinfo *restrict info, bool defer_connect) | 
| vlc_tls_t * | vlc_tls_SocketOpenTCP (vlc_object_t *obj, const char *name, unsigned port) | 
| Creates a transport-layer TCP stream from a name and port.  More... | |
| vlc_tls_t * | vlc_tls_SocketOpenTLS (vlc_tls_creds_t *creds, const char *name, unsigned port, const char *service, const char *const *alpn, char **alp) | 
| Initiates a TLS session over TCP.  More... | |
Transport Layer Socket abstraction.
This file implements the Transport Layer Socket (vlc_tls) abstraction.
| #define SOL_TCP IPPROTO_TCP | 
| typedef struct vlc_tls_socket vlc_tls_socket_t | 
| 
 | static | 
References vlc_tls_SessionDelete().
Referenced by vlc_tls_ClientSessionCreate().
| 
 | static | 
Referenced by vlc_tls_ClientCreate().
| 
 | static | 
Referenced by vlc_tls_ServerCreate().
| 
 | static | 
Referenced by vlc_tls_Delete().
| 
 | static | 
Connects a transport layer socket.
References vlc_tls_socket::fd, vlc_tls_socket::peer, vlc_tls_socket::peerlen, and vlc_tls_WaitConnect().
Referenced by vlc_tls_ConnectWrite(), and vlc_tls_SocketOpenAddrInfo().
| 
 | static | 
References count, MSG_NOSIGNAL, vlc_tls_socket::peer, vlc_tls_socket::peerlen, sendmsg(), vlc_tls_Connect(), vlc_tls_SocketGetFD(), vlc_tls_SocketWrite(), vlc_tls_WaitConnect(), and vlc_tls::writev.
Referenced by vlc_tls_SocketOpenAddrInfo().
| 
 | static | 
References vlc_tls_creds::open, vlc_tls::p, vlc_restorecancel(), and vlc_savecancel().
Referenced by vlc_tls_ClientSessionCreate(), and vlc_tls_ServerSessionCreate().
| 
 | static | 
Allocates an unconnected transport layer socket.
References net_Close, SOL_TCP, unlikely, vlc_socket(), and vlc_tls_SocketAlloc().
Referenced by vlc_tls_SocketOpenAddrInfo().
| 
 | static | 
References vlc_tls::close, vlc_tls_socket::fd, vlc_tls::get_fd, vlc_tls::p, vlc_tls_socket::peer, vlc_tls_socket::peerlen, vlc_tls::readv, vlc_tls::shutdown, vlc_tls_socket::tls, unlikely, vlc_tls_SocketClose(), vlc_tls_SocketGetFD(), vlc_tls_SocketRead(), vlc_tls_SocketShutdown(), vlc_tls_SocketWrite(), and vlc_tls::writev.
Referenced by vlc_tls_SocketAddrInfo(), vlc_tls_SocketOpen(), and vlc_tls_SocketPair().
| 
 | static | 
References net_Close, and vlc_tls_SocketGetFD().
Referenced by vlc_tls_SocketAlloc().
| 
 | static | 
References vlc_tls_socket::fd, and vlc_tls_socket::tls.
Referenced by vlc_tls_ConnectWrite(), vlc_tls_SocketAlloc(), vlc_tls_SocketClose(), vlc_tls_SocketRead(), vlc_tls_SocketShutdown(), and vlc_tls_SocketWrite().
| vlc_tls_t* vlc_tls_SocketOpenAddrInfo | ( | const struct addrinfo *restrict | info, | 
| bool | defer_connect | ||
| ) | 
References vlc_tls_Connect(), vlc_tls_ConnectWrite(), vlc_tls_SessionDelete(), vlc_tls_SocketAddrInfo(), and vlc_tls::writev.
Referenced by vlc_h1_request(), vlc_tls_SocketOpenTCP(), and vlc_tls_SocketOpenTLS().
| 
 | static | 
References count, recvmsg(), and vlc_tls_SocketGetFD().
Referenced by vlc_tls_SocketAlloc().
| 
 | static | 
References vlc_tls_SocketGetFD().
Referenced by vlc_tls_SocketAlloc().
| 
 | static | 
References count, MSG_NOSIGNAL, sendmsg(), and vlc_tls_SocketGetFD().
Referenced by vlc_tls_ConnectWrite(), and vlc_tls_SocketAlloc().
| 
 | static | 
Waits for pending transport layer socket connection.
References pollfd::events, pollfd::fd, POLLOUT, vlc_killed(), vlc_poll_i11e(), and vlc_tls_GetFD().
Referenced by vlc_tls_Connect(), and vlc_tls_ConnectWrite().
 1.8.16
 1.8.16