Go to the documentation of this file.
75 const char *host,
const char *
const *alpn);
77 const char *hostname,
const char *service,
104 return crd->
handshake(crd, tls, NULL, NULL, NULL);
145 const char *
const *alpn,
169 const char *
const *alpn);
266 while (session != NULL);
319 const char *hostname,
unsigned port);
331 const char *hostname,
unsigned port,
333 const char *
const *alpn,
char **alp);
338 const char *srv,
const char *
const *lp,
char **
p)
#define VLC_API
Definition: fourcc_gen.c:30
#define VLC_COMMON_MEMBERS
Backward compatibility macro.
Definition: vlc_common.h:453
#define VLC_DEPRECATED
Definition: vlc_common.h:98
ssize_t(* writev)(struct vlc_tls *, const struct iovec *, unsigned)
Definition: vlc_tls.h:47
ssize_t vlc_tls_Write(vlc_tls_t *, const void *buf, size_t len)
Sends data through a socket.
Definition: tls.c:268
char * vlc_tls_GetLine(vlc_tls_t *)
Receives a text line through a socket.
Definition: tls.c:307
TLS credentials.
Definition: vlc_tls.h:67
ssize_t vlc_tls_Read(vlc_tls_t *, void *buf, size_t len, bool waitall)
Receives data through a socket.
Definition: tls.c:227
Transport layer socket.
Definition: vlc_tls.h:43
struct vlc_tls * p
Definition: vlc_tls.h:51
void(* close)(struct vlc_tls *)
Definition: vlc_tls.h:49
void vlc_tls_Delete(vlc_tls_creds_t *)
Releases TLS credentials.
Definition: tls.c:128
int vlc_tls_SocketPair(int family, int protocol, vlc_tls_t *[2])
Creates a connected pair of transport-layer sockets.
Definition: tls.c:419
Internal module descriptor.
Definition: modules.h:79
int(* shutdown)(struct vlc_tls *, bool duplex)
Definition: vlc_tls.h:48
ssize_t(* readv)(struct vlc_tls *, struct iovec *, unsigned)
Definition: vlc_tls.h:46
static int vlc_tls_GetFD(vlc_tls_t *tls)
Definition: vlc_tls.h:187
void * sys
Definition: vlc_tls.h:72
struct vlc_tls vlc_tls_t
Transport layer socket.
module_t * module
Definition: vlc_tls.h:71
static void vlc_tls_Close(vlc_tls_t *session)
Closes a connection and its underlying resources.
Definition: vlc_tls.h:257
vlc_tls_t * vlc_tls_ServerSessionCreate(vlc_tls_creds_t *creds, vlc_tls_t *sock, const char *const *alpn)
Creates a TLS server session.
Definition: tls.c:220
vlc_tls_t * vlc_tls_SocketOpenTCP(vlc_object_t *obj, const char *hostname, unsigned port)
Creates a transport-layer TCP stream from a name and port.
Definition: tls.c:586
The main vlc_object_t structure.
Definition: vlc_objects.h:39
vlc_tls_t * vlc_tls_SocketOpen(int fd)
Creates a transport-layer stream from a socket.
Definition: tls.c:414
vlc_tls_t * vlc_tls_SocketOpenAddrInfo(const struct addrinfo *ai, bool defer_connect)
Creates a transport-layer stream from a struct addrinfo.
vlc_tls_t * vlc_tls_ClientSessionCreate(vlc_tls_creds_t *creds, vlc_tls_t *sock, const char *host, const char *service, const char *const *alpn, char **alp)
Initiates a client TLS session.
Definition: tls.c:169
#define unlikely(p)
Definition: vlc_common.h:114
vlc_tls_creds_t * vlc_tls_ClientCreate(vlc_object_t *)
Allocates TLS credentials for a client.
Definition: tls.c:109
static int vlc_tls_SessionHandshake(vlc_tls_creds_t *crd, vlc_tls_t *tls)
Definition: vlc_tls.h:101
int(* get_fd)(struct vlc_tls *)
Definition: vlc_tls.h:45
void vlc_tls_SessionDelete(vlc_tls_t *)
Destroys a TLS session down.
Definition: tls.c:154
static vlc_tls_t * vlc_tls_ClientSessionCreateFD(vlc_tls_creds_t *crd, int fd, const char *host, const char *srv, const char *const *lp, char **p)
Definition: vlc_tls.h:337
vlc_tls_creds_t * vlc_tls_ServerCreate(vlc_object_t *, const char *cert, const char *key)
Allocates server TLS credentials.
Definition: tls.c:86
int(* handshake)(struct vlc_tls_creds *, vlc_tls_t *session, const char *hostname, const char *service, char **alp)
Definition: vlc_tls.h:76
vlc_tls_t * vlc_tls_SocketOpenTLS(vlc_tls_creds_t *crd, const char *hostname, unsigned port, const char *service, const char *const *alpn, char **alp)
Initiates a TLS session over TCP.
Definition: tls.c:626
static int vlc_tls_Shutdown(vlc_tls_t *tls, bool duplex)
Shuts a connection down.
Definition: vlc_tls.h:241
struct vlc_tls_creds vlc_tls_creds_t
TLS credentials.