|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
QUIC library. More...
Data Structures | |
| struct | net_stats_quic |
| Quic statistics. More... | |
| struct | net_stats_quic_global |
| Quic global statistics. More... | |
Macros | |
| #define | ZSOCK_SOL_QUIC 284 |
| QUIC socket option level for getsockopt/setsockopt. | |
Enumerations | |
| enum | quic_stream_direction { QUIC_STREAM_BIDIRECTIONAL = 0x00 , QUIC_STREAM_UNIDIRECTIONAL = 0x02 } |
| Stream direction. More... | |
| enum | quic_stream_initiator { QUIC_STREAM_CLIENT = 0x00 , QUIC_STREAM_SERVER = 0x01 } |
| Stream initiator. More... | |
| enum | { ZSOCK_QUIC_SO_STREAM_TYPE = 1 , ZSOCK_QUIC_SO_CERT_CHAIN_ADD = 2 , ZSOCK_QUIC_SO_CERT_CHAIN_DEL = 3 , ZSOCK_QUIC_SO_STOP_SENDING_CODE = 4 } |
| QUIC socket options for use with getsockopt/setsockopt at ZSOCK_SOL_QUIC level. More... | |
Functions | |
| int | quic_connection_open (const struct net_sockaddr *remote_addr, const struct net_sockaddr *local_addr) |
| Creates a new QUIC connection socket. | |
| int | quic_connection_close (int sock) |
| Closes the QUIC socket. | |
| int | quic_stream_open (int connection_sock, enum quic_stream_initiator initiator, enum quic_stream_direction direction, uint8_t priority) |
| Creates a new QUIC stream socket. | |
| int | quic_stream_close (int sock) |
| Closes the QUIC stream socket. | |
| bool | quic_is_stream_socket (int sock) |
| Checks if the given socket is a QUIC stream socket. | |
| bool | quic_is_connection_socket (int sock) |
| Checks if the given socket is a QUIC connection socket. | |
| int | quic_stream_get_id (int sock, uint64_t *stream_id) |
| Return the stream id associated with the given QUIC stream socket. | |
QUIC library.
| #define ZSOCK_SOL_QUIC 284 |
#include <zephyr/net/quic.h>
QUIC socket option level for getsockopt/setsockopt.
| anonymous enum |
#include <zephyr/net/quic.h>
QUIC socket options for use with getsockopt/setsockopt at ZSOCK_SOL_QUIC level.
| Enumerator | |
|---|---|
| ZSOCK_QUIC_SO_STREAM_TYPE | Get stream type (returns combination of direction | initiator bits). |
| ZSOCK_QUIC_SO_CERT_CHAIN_ADD | Add an intermediate certificate to the certificate chain. Option value is a pointer to a sec_tag_t referencing a credential previously registered via tls_credential_add() (with type TLS_CREDENTIAL_CA_CERTIFICATE or TLS_CREDENTIAL_PUBLIC_CERTIFICATE). Option length must be sizeof(sec_tag_t). Call multiple times to add multiple intermediate certificates. |
| ZSOCK_QUIC_SO_CERT_CHAIN_DEL | Delete an intermediate certificate from the certificate chain. Option value is a pointer to a sec_tag_t referencing a credential previously added by ZSOCK_QUIC_SO_CERT_CHAIN_ADD option. Option length must be sizeof(sec_tag_t) or set to 0. If set to 0, the option value can be omitted by setting it to NULL. If set to 0, all intermediate certificates are removed. |
| ZSOCK_QUIC_SO_STOP_SENDING_CODE | Set the error code to use when sending STOP_SENDING frame on stream close. |
#include <zephyr/net/quic.h>
Stream direction.
| Enumerator | |
|---|---|
| QUIC_STREAM_BIDIRECTIONAL | Bidirectional stream. |
| QUIC_STREAM_UNIDIRECTIONAL | Unidirectional stream. |
#include <zephyr/net/quic.h>
Stream initiator.
| Enumerator | |
|---|---|
| QUIC_STREAM_CLIENT | Client initiated stream. |
| QUIC_STREAM_SERVER | Server initiated stream. |
| int quic_connection_close | ( | int | sock | ) |
#include <zephyr/net/quic.h>
Closes the QUIC socket.
| sock | QUIC connection socket to close. |
| int quic_connection_open | ( | const struct net_sockaddr * | remote_addr, |
| const struct net_sockaddr * | local_addr ) |
#include <zephyr/net/quic.h>
Creates a new QUIC connection socket.
| remote_addr | Remote connection endpoint address. |
| local_addr | Local connection endpoint address. If set to NULL, the local address is selected according to the remote address. |
| bool quic_is_connection_socket | ( | int | sock | ) |
#include <zephyr/net/quic.h>
Checks if the given socket is a QUIC connection socket.
| sock | Socket to check. |
| bool quic_is_stream_socket | ( | int | sock | ) |
#include <zephyr/net/quic.h>
Checks if the given socket is a QUIC stream socket.
| sock | Socket to check. |
| int quic_stream_close | ( | int | sock | ) |
#include <zephyr/net/quic.h>
Closes the QUIC stream socket.
| sock | QUIC stream socket to close. |
| int quic_stream_get_id | ( | int | sock, |
| uint64_t * | stream_id ) |
#include <zephyr/net/quic.h>
Return the stream id associated with the given QUIC stream socket.
| sock | Socket to check. |
| stream_id | Pointer to store the stream id. |
| int quic_stream_open | ( | int | connection_sock, |
| enum quic_stream_initiator | initiator, | ||
| enum quic_stream_direction | direction, | ||
| uint8_t | priority ) |
#include <zephyr/net/quic.h>
Creates a new QUIC stream socket.
| connection_sock | Connection to create the stream on. |
| initiator | Stream initiator (client or server). |
| direction | Stream direction (uni- or bidirectional). |
| priority | Stream priority (0-255). |