Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
QUIC Library

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.

Detailed Description

QUIC library.

Since
4.5
Version
0.1.0

Macro Definition Documentation

◆ ZSOCK_SOL_QUIC

#define ZSOCK_SOL_QUIC   284

#include <zephyr/net/quic.h>

QUIC socket option level for getsockopt/setsockopt.

Enumeration Type Documentation

◆ anonymous enum

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.

◆ quic_stream_direction

#include <zephyr/net/quic.h>

Stream direction.

Enumerator
QUIC_STREAM_BIDIRECTIONAL 

Bidirectional stream.

QUIC_STREAM_UNIDIRECTIONAL 

Unidirectional stream.

◆ quic_stream_initiator

#include <zephyr/net/quic.h>

Stream initiator.

Enumerator
QUIC_STREAM_CLIENT 

Client initiated stream.

QUIC_STREAM_SERVER 

Server initiated stream.

Function Documentation

◆ quic_connection_close()

int quic_connection_close ( int sock)

#include <zephyr/net/quic.h>

Closes the QUIC socket.

Parameters
sockQUIC connection socket to close.
Returns
0 success, <0 on failure.

◆ quic_connection_open()

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.

Parameters
remote_addrRemote connection endpoint address.
local_addrLocal connection endpoint address. If set to NULL, the local address is selected according to the remote address.
Returns
New QUIC connection socket on success, <0 on failure.

◆ quic_is_connection_socket()

bool quic_is_connection_socket ( int sock)

#include <zephyr/net/quic.h>

Checks if the given socket is a QUIC connection socket.

Parameters
sockSocket to check.
Returns
true if the socket is a QUIC connection socket, false otherwise.

◆ quic_is_stream_socket()

bool quic_is_stream_socket ( int sock)

#include <zephyr/net/quic.h>

Checks if the given socket is a QUIC stream socket.

Parameters
sockSocket to check.
Returns
true if the socket is a QUIC stream socket, false otherwise.

◆ quic_stream_close()

int quic_stream_close ( int sock)

#include <zephyr/net/quic.h>

Closes the QUIC stream socket.

Parameters
sockQUIC stream socket to close.
Returns
0 success, <0 on failure.

◆ quic_stream_get_id()

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.

Parameters
sockSocket to check.
stream_idPointer to store the stream id.
Returns
0 on success, <0 on failure.

◆ quic_stream_open()

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.

Parameters
connection_sockConnection to create the stream on.
initiatorStream initiator (client or server).
directionStream direction (uni- or bidirectional).
priorityStream priority (0-255).
Returns
New QUIC stream socket on success, <0 on failure.