12#include <interface99.h>
14#include <compy/priv/compiler_attrs.h>
22#define Compy_Transport_IFACE \
30 vfunc99(int, transmit, VSelf99, Compy_IoVecSlice bufs) \
31 vfunc99(bool, is_full, VSelf99)
36#define Compy_Transport_EXTENDS (Compy_Droppable)
56 Compy_Writer w, uint8_t channel_id,
size_t max_buffer) COMPY_PRIV_MUST_USE;
121 Compy_SrtpSuite_AES_CM_128_HMAC_SHA1_80,
122 Compy_SrtpSuite_AES_CM_128_HMAC_SHA1_32,
129 uint8_t master_key[16];
130 uint8_t master_salt[14];
131} Compy_SrtpKeyMaterial;
146Compy_Transport compy_transport_srtp(
147 Compy_Transport inner, Compy_SrtpSuite suite,
148 const Compy_SrtpKeyMaterial *key) COMPY_PRIV_MUST_USE;
164Compy_Transport compy_transport_srtcp(
165 Compy_Transport inner, Compy_SrtpSuite suite,
166 const Compy_SrtpKeyMaterial *key) COMPY_PRIV_MUST_USE;
184 Compy_SrtpSuite suite,
185 const Compy_SrtpKeyMaterial *key) COMPY_PRIV_MUST_USE;
205int compy_srtp_recv_unprotect(
221int compy_srtcp_recv_unprotect(
229int compy_srtp_generate_key(Compy_SrtpKeyMaterial *key) COMPY_PRIV_MUST_USE;
244int compy_srtp_format_crypto_attr(
245 char *buf,
size_t buf_len,
int tag, Compy_SrtpSuite suite,
246 const Compy_SrtpKeyMaterial *key) COMPY_PRIV_MUST_USE;
257int compy_srtp_parse_crypto_attr(
258 const char *attr_value, Compy_SrtpSuite *suite,
259 Compy_SrtpKeyMaterial *key) COMPY_PRIV_MUST_USE;
int compy_dgram_socket(int af, const void *restrict addr, uint16_t port) COMPY_PRIV_MUST_USE
Creates a new datagram socket suitable for compy_transport_udp.
Definition udp.c:94
Compy_Transport compy_transport_udp(int fd) COMPY_PRIV_MUST_USE
Creates a new UDP transport.
Definition udp.c:25
void * compy_sockaddr_ip(const struct sockaddr *restrict addr) COMPY_PRIV_MUST_USE
Returns a pointer to the IP address of addr.
Definition udp.c:196
Compy_Transport compy_transport_tcp(Compy_Writer w, uint8_t channel_id, size_t max_buffer) COMPY_PRIV_MUST_USE
Creates a new TCP transport.
Definition tcp.c:23
int compy_recv_dgram_socket(int af, uint16_t port) COMPY_PRIV_MUST_USE
Creates a new datagram socket bound to a local port for receiving.
Definition udp.c:152
interface99(Compy_Transport)
Defines the Compy_Transport interface.