Loading...
Searching...
No Matches
quic.h
Go to the documentation of this file.
1
12#ifndef IMQUIC_QUIC_H
13#define IMQUIC_QUIC_H
14
15#include <sys/socket.h>
16
17#include <glib.h>
18
19#include "../imquic/imquic.h"
20#include "connection.h"
21#include "stream.h"
22#include "utils.h"
23
25void imquic_quic_init(void);
27void imquic_quic_deinit(void);
28
38
51
92
109imquic_frame *imquic_frame_create(imquic_frame_type type, uint8_t *buffer, size_t size);
113
139
192
196typedef struct imquic_sent_packet {
202 enum ssl_encryption_level_t level;
208 int64_t sent_time;
211 /* TODO We should add info on whether this packet contained an ACK,
212 * so that we can decide when to move on with our own ACK ranges */
217
221
230void imquic_process_message(imquic_network_endpoint *socket, imquic_network_address *sender, uint8_t *quic, size_t bytes);
242int imquic_parse_packet(imquic_network_endpoint *socket, imquic_network_address *sender, imquic_connection **pconn, imquic_packet *pkt, uint8_t *quic, size_t bytes);
252
256
270size_t imquic_payload_parse_ack(imquic_connection *conn, uint8_t *bytes, size_t blen, enum ssl_encryption_level_t level);
276size_t imquic_payload_parse_reset_stream(imquic_connection *conn, uint8_t *bytes, size_t blen);
282size_t imquic_payload_parse_stop_sending(imquic_connection *conn, uint8_t *bytes, size_t blen);
291size_t imquic_payload_parse_crypto(imquic_connection *conn, uint8_t *bytes, size_t blen, enum ssl_encryption_level_t level);
297size_t imquic_payload_parse_new_token(imquic_connection *conn, uint8_t *bytes, size_t blen);
306size_t imquic_payload_parse_stream(imquic_connection *conn, uint8_t *bytes, size_t blen);
312size_t imquic_payload_parse_max_data(imquic_connection *conn, uint8_t *bytes, size_t blen);
318size_t imquic_payload_parse_max_stream_data(imquic_connection *conn, uint8_t *bytes, size_t blen);
324size_t imquic_payload_parse_max_streams(imquic_connection *conn, uint8_t *bytes, size_t blen);
330size_t imquic_payload_parse_data_blocked(imquic_connection *conn, uint8_t *bytes, size_t blen);
336size_t imquic_payload_parse_stream_data_blocked(imquic_connection *conn, uint8_t *bytes, size_t blen);
342size_t imquic_payload_parse_streams_blocked(imquic_connection *conn, uint8_t *bytes, size_t blen);
348size_t imquic_payload_parse_new_connection_id(imquic_connection *conn, uint8_t *bytes, size_t blen);
354size_t imquic_payload_parse_retire_connection_id(imquic_connection *conn, uint8_t *bytes, size_t blen);
360size_t imquic_payload_parse_path_challenge(imquic_connection *conn, uint8_t *bytes, size_t blen);
366size_t imquic_payload_parse_path_response(imquic_connection *conn, uint8_t *bytes, size_t blen);
373size_t imquic_payload_parse_connection_close(imquic_connection *conn, uint8_t *bytes, size_t blen);
380size_t imquic_payload_parse_datagram(imquic_connection *conn, uint8_t *bytes, size_t blen);
382
386
391size_t imquic_payload_add_padding(uint8_t *bytes, size_t blen, size_t padding);
396size_t imquic_payload_add_ping(uint8_t *bytes, size_t blen);
404size_t imquic_payload_add_ack(uint8_t *bytes, size_t blen, GList *received, uint64_t delay, uint64_t *ecn_counts);
412size_t imquic_payload_add_reset_stream(uint8_t *bytes, size_t blen, uint64_t stream_id, uint64_t error_code, uint64_t final_size);
419size_t imquic_payload_add_stop_sending(uint8_t *bytes, size_t blen, uint64_t stream_id, uint64_t error_code);
427size_t imquic_payload_add_crypto(uint8_t *bytes, size_t blen, uint8_t *crypto, size_t crypto_offset, size_t crypto_length);
434size_t imquic_payload_add_new_token(uint8_t *bytes, size_t blen, uint8_t *token, size_t token_length);
445size_t imquic_payload_add_stream(uint8_t *bytes, size_t blen, uint64_t stream_id, uint8_t *stream, size_t stream_offset, size_t stream_length, gboolean complete, gboolean last);
451size_t imquic_payload_add_max_data(uint8_t *bytes, size_t blen, uint64_t max_data);
458size_t imquic_payload_add_max_stream_data(uint8_t *bytes, size_t blen, uint64_t stream_id, uint64_t max_data);
465size_t imquic_payload_add_max_streams(uint8_t *bytes, size_t blen, gboolean bidirectional, uint64_t max_streams);
471size_t imquic_payload_add_data_blocked(uint8_t *bytes, size_t blen, uint64_t max_data);
478size_t imquic_payload_add_stream_data_blocked(uint8_t *bytes, size_t blen, uint64_t stream_id, uint64_t max_data);
484size_t imquic_payload_add_streams_blocked(uint8_t *bytes, size_t blen, uint64_t max_streams);
493size_t imquic_payload_add_new_connection_id(uint8_t *bytes, size_t blen, uint64_t seqnum, uint64_t retire_prior_to, imquic_connection_id *cid, uint8_t *reset_token);
499size_t imquic_payload_add_retire_connection_id(uint8_t *bytes, size_t blen, uint64_t seqnum);
505size_t imquic_payload_add_path_challenge(uint8_t *bytes, size_t blen, uint8_t *data);
511size_t imquic_payload_add_path_response(uint8_t *bytes, size_t blen, uint8_t *data);
519size_t imquic_payload_add_connection_close(uint8_t *bytes, size_t blen, imquic_error_code error_code, imquic_frame_type frame_type, const char *reason);
524size_t imquic_payload_add_handshake_done(uint8_t *bytes, size_t blen);
532size_t imquic_payload_add_datagram(uint8_t *bytes, size_t blen, uint8_t *datagram, size_t datagram_length, gboolean last);
534
538
543size_t imquic_transport_parameter_add_novalue(uint8_t *bytes, size_t blen, imquic_transport_parameter param);
550size_t imquic_transport_parameter_add_int(uint8_t *bytes, size_t blen, imquic_transport_parameter param, uint64_t number);
558size_t imquic_transport_parameter_add_data(uint8_t *bytes, size_t blen, imquic_transport_parameter param, uint8_t *buf, size_t buflen);
567
571
577int imquic_parse_transport_parameters(imquic_connection *conn, uint8_t *bytes, size_t blen);
579
583
590int imquic_send_ack(imquic_connection *conn, enum ssl_encryption_level_t level, imquic_connection_id *src, imquic_connection_id *dest);
623int imquic_send_close_connection(imquic_connection *conn, imquic_error_code error_code, imquic_frame_type frame_type, const char *reason);
644
652
660
661#endif
QUIC connection abstraction (headers)
imquic_error_code
QUIC error codes.
Definition error.h:14
imquic public interface (headers)
gboolean imquic_handle_event(imquic_connection *conn)
Callback fired when the event loop has an event for a specific connection.
Definition quic.c:2713
int imquic_send_keepalive(imquic_connection *conn, imquic_connection_id *dest)
Helper method to generate a packet containing a PING and send it.
Definition quic.c:2040
void imquic_sent_packet_destroy(imquic_sent_packet *sent_pkt)
Helper method to destroy an existing imquic_sent_packet instance.
Definition quic.c:247
size_t imquic_payload_add_max_streams(uint8_t *bytes, size_t blen, gboolean bidirectional, uint64_t max_streams)
Helper method to add a MAX_STREAMS frame to a buffer.
Definition quic.c:1529
size_t imquic_payload_parse_datagram(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a DATAGRAM frame, and notify the stack about it via internal callbacks.
Definition quic.c:1350
size_t imquic_payload_parse_path_response(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a PATH_RESPONSE frame.
Definition quic.c:1312
int imquic_send_pending_datagram(imquic_connection *conn, imquic_connection_id *dest)
Helper method to generate one or more packets containing one or more DATAGRAM frames and send them.
Definition quic.c:2181
size_t imquic_payload_add_max_data(uint8_t *bytes, size_t blen, uint64_t max_data)
Helper method to add a MAX_DATA frame to a buffer.
Definition quic.c:1512
size_t imquic_transport_parameter_add_connection_id(uint8_t *bytes, size_t blen, imquic_transport_parameter param, imquic_connection_id *cid)
Helper to add a QUIC transport parameter with a Connection ID to a buffer.
Definition quic.c:1679
size_t imquic_transport_parameter_add_int(uint8_t *bytes, size_t blen, imquic_transport_parameter param, uint64_t number)
Helper to add a QUIC transport parameter with a numeric value to a buffer.
Definition quic.c:1650
size_t imquic_payload_add_stop_sending(uint8_t *bytes, size_t blen, uint64_t stream_id, uint64_t error_code)
Helper method to add a STOP_SENDING frame to a buffer.
Definition quic.c:1465
int imquic_send_packet(imquic_connection *conn, imquic_packet *pkt)
Send a QUIC packet to the peer.
Definition quic.c:2481
size_t imquic_payload_parse_max_streams(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a MAX_STREAMS frame.
Definition quic.c:1198
int imquic_parse_transport_parameters(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper to parse a buffer containing QUIC transport parameters, and update the associated imquic_conne...
Definition quic.c:1695
const char * imquic_frame_type_str(imquic_frame_type type)
Helper function to serialize to string the name of a imquic_frame_type value.
Definition quic.c:60
void imquic_process_message(imquic_network_endpoint *socket, imquic_network_address *sender, uint8_t *quic, size_t bytes)
Process incoming data from the network we've made aware of.
Definition quic.c:2546
const char * imquic_long_packet_type_str(imquic_long_packet_type type)
Helper function to serialize to string the name of a imquic_long_packet_type value.
Definition quic.c:45
size_t imquic_payload_add_stream_data_blocked(uint8_t *bytes, size_t blen, uint64_t stream_id, uint64_t max_data)
Helper method to add a STREAM_DATA_BLOCKED frame to a buffer.
Definition quic.c:1545
size_t imquic_payload_add_retire_connection_id(uint8_t *bytes, size_t blen, uint64_t seqnum)
Helper method to add a RETIRE_CONNECTION_ID frame to a buffer.
Definition quic.c:1581
size_t imquic_payload_parse_stream(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a STREAM frame, and handle it accordingly, e.g., by creating the stream loca...
Definition quic.c:1036
void imquic_check_incoming_stream(imquic_connection *conn)
Helper method to check if we received STREAM frames we need to go process, and handle ourselves or pa...
size_t imquic_payload_add_new_connection_id(uint8_t *bytes, size_t blen, uint64_t seqnum, uint64_t retire_prior_to, imquic_connection_id *cid, uint8_t *reset_token)
Helper method to add a NEW_CONNECTION_ID frame to a buffer.
Definition quic.c:1562
imquic_packet * imquic_packet_create(void)
Helper method to create a imquic_packet instance.
Definition quic.c:186
size_t imquic_payload_add_ping(uint8_t *bytes, size_t blen)
Helper method to add a PING frame to a buffer.
Definition quic.c:1385
void imquic_quic_deinit(void)
Uninitialize the QUIC stack.
Definition quic.c:40
int imquic_send_pending_crypto(imquic_connection *conn, imquic_connection_id *src, imquic_connection_id *dest)
Helper method to generate one or more packets containing one or more CRYPTO frames and send them.
Definition quic.c:1934
int imquic_send_ack(imquic_connection *conn, enum ssl_encryption_level_t level, imquic_connection_id *src, imquic_connection_id *dest)
Helper method to generate a packet containing an ACK and send it.
Definition quic.c:1905
void imquic_quic_init(void)
Initialize the QUIC stack at startup.
Definition quic.c:35
size_t imquic_payload_add_padding(uint8_t *bytes, size_t blen, size_t padding)
Helper method to add a PADDING frame to a buffer.
Definition quic.c:1375
int imquic_packet_long_init(imquic_packet *pkt, imquic_long_packet_type type, imquic_connection_id *src, imquic_connection_id *dest)
Initialize a imquic_packet instance as a long header packet.
Definition quic.c:191
size_t imquic_payload_parse_retire_connection_id(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a RETIRE_CONNECTION_ID frame.
Definition quic.c:1289
size_t imquic_payload_add_handshake_done(uint8_t *bytes, size_t blen)
Helper method to add a HANDSHAKE_DONE frame to a buffer.
Definition quic.c:1627
size_t imquic_payload_parse_connection_close(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a CONNECTION_CLOSE frame, and handle it accordingly by closing the connectio...
Definition quic.c:1323
size_t imquic_payload_add_stream(uint8_t *bytes, size_t blen, uint64_t stream_id, uint8_t *stream, size_t stream_offset, size_t stream_length, gboolean complete, gboolean last)
Helper method to add a STREAM frame to a buffer.
Definition quic.c:1495
size_t imquic_payload_add_crypto(uint8_t *bytes, size_t blen, uint8_t *crypto, size_t crypto_offset, size_t crypto_length)
Helper method to add a CRYPTO frame to a buffer.
Definition quic.c:1474
size_t imquic_payload_parse_new_connection_id(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a NEW_CONNECTION_ID frame.
Definition quic.c:1251
size_t imquic_payload_parse_stream_data_blocked(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a STREAM_DATA_BLOCKED frame.
Definition quic.c:1223
void imquic_quic_connection_remove(imquic_connection_id *cid)
Stop tracking a Connection ID associated to a connection.
Definition quic.c:28
int imquic_packet_short_init(imquic_packet *pkt, imquic_connection_id *dest)
Initialize a imquic_packet instance as a short header packet.
Definition quic.c:219
size_t imquic_payload_parse_streams_blocked(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a STREAMS_BLOCKED frame.
Definition quic.c:1238
size_t imquic_payload_add_new_token(uint8_t *bytes, size_t blen, uint8_t *token, size_t token_length)
Helper method to add a NEW_TOKEN frame to a buffer.
Definition quic.c:1485
void imquic_frame_destroy(imquic_frame *frame)
Helper method to destroy an existing imquic_frame instance.
Definition quic.c:178
size_t imquic_payload_add_max_stream_data(uint8_t *bytes, size_t blen, uint64_t stream_id, uint64_t max_data)
Helper method to add a MAX_STREAM_DATA frame to a buffer.
Definition quic.c:1520
imquic_frame * imquic_frame_create(imquic_frame_type type, uint8_t *buffer, size_t size)
Helper method to create a imquic_frame instance.
Definition quic.c:164
size_t imquic_payload_parse_data_blocked(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a DATA_BLOCKED frame.
Definition quic.c:1211
size_t imquic_payload_add_reset_stream(uint8_t *bytes, size_t blen, uint64_t stream_id, uint64_t error_code, uint64_t final_size)
Helper method to add a RESET_STREAM frame to a buffer.
Definition quic.c:1455
void imquic_packet_destroy(imquic_packet *pkt)
Helper method to destroy an existing imquic_packet instance.
Definition quic.c:240
imquic_transport_parameter
QUIC transport parameters.
Definition quic.h:115
@ IMQUIC_INITIAL_SOURCE_CONNECTION_ID
Definition quic.h:131
@ IMQUIC_DISABLE_ACTIVE_MIGRATION
Definition quic.h:128
@ IMQUIC_MAX_ACK_DELAY
Definition quic.h:127
@ IMQUIC_MAX_UDP_PAYLOAD_SIZE
Definition quic.h:119
@ IMQUIC_ACTIVE_CONNECTION_ID_LIMIT
Definition quic.h:130
@ IMQUIC_INITIAL_MAX_STREAM_DATA_BIDI_LOCAL
Definition quic.h:121
@ IMQUIC_INITIAL_MAX_STREAM_DATA_BIDI_REMOTE
Definition quic.h:122
@ IMQUIC_MAX_DATAGRAM_FRAME_SIZE
Definition quic.h:133
@ IMQUIC_INITIAL_MAX_STREAM_DATA_UNI
Definition quic.h:123
@ IMQUIC_MAX_IDLE_TIMEOUT
Definition quic.h:117
@ IMQUIC_STATELESS_RESET_TOKEN
Definition quic.h:118
@ IMQUIC_INITIAL_MAX_STREAMS_UNI
Definition quic.h:125
@ IMQUIC_INITIAL_MAX_STREAMS_BIDI
Definition quic.h:124
@ IMQUIC_PREFERRED_ADDRESS
Definition quic.h:129
@ IMQUIC_ORIGINAL_DESTINATION_CONNECTION_ID
Definition quic.h:116
@ IMQUIC_INITIAL_MAX_DATA
Definition quic.h:120
@ IMQUIC_RETRY_SOURCE_CONNECTION_ID
Definition quic.h:132
@ IMQUIC_ACK_DELAY_EXPONENT
Definition quic.h:126
size_t imquic_payload_parse_max_data(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a MAX_DATA frame.
Definition quic.c:1171
void imquic_check_incoming_crypto(imquic_connection *conn)
Helper method to check if we received CRYPTO frames we need to go through, and in case pass them to t...
Definition quic.c:2576
int imquic_send_pending_stream(imquic_connection *conn, imquic_connection_id *dest)
Helper method to generate one or more packets containing one or more STREAM frames and send them.
Definition quic.c:2065
size_t imquic_payload_add_path_response(uint8_t *bytes, size_t blen, uint8_t *data)
Helper method to add a PATH_RESPONSE frame to a buffer.
Definition quic.c:1597
struct imquic_frame imquic_frame
A serialized QUIC frame.
size_t imquic_payload_add_datagram(uint8_t *bytes, size_t blen, uint8_t *datagram, size_t datagram_length, gboolean last)
Helper method to add a DATAGRAM frame to a buffer.
Definition quic.c:1632
size_t imquic_transport_parameter_add_novalue(uint8_t *bytes, size_t blen, imquic_transport_parameter param)
Helper to add a QUIC transport parameter with no value to a buffer.
Definition quic.c:1645
int imquic_send_close_connection(imquic_connection *conn, imquic_error_code error_code, imquic_frame_type frame_type, const char *reason)
Helper method to generate a packet containing a CONNECTION_CLOSE and send it.
Definition quic.c:2251
int imquic_start_quic_client(imquic_network_endpoint *socket)
Helper to start a new client endpoint, and so attempt a connection.
Definition quic.c:2739
size_t imquic_payload_add_connection_close(uint8_t *bytes, size_t blen, imquic_error_code error_code, imquic_frame_type frame_type, const char *reason)
Helper method to add a CONNECTION_CLOSE frame to a buffer.
Definition quic.c:1605
size_t imquic_payload_parse_max_stream_data(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a MAX_STREAM_DATA frame.
Definition quic.c:1183
int imquic_parse_packet(imquic_network_endpoint *socket, imquic_network_address *sender, imquic_connection **pconn, imquic_packet *pkt, uint8_t *quic, size_t bytes)
Parse a QUIC packet from an incoming buffer and handle it.
Definition quic.c:255
int imquic_retransmit_packet(imquic_connection *conn, imquic_sent_packet *sent_pkt)
Retransmit a previously sent packet.
Definition quic.c:2518
int imquic_serialize_packet(imquic_connection *conn, imquic_packet *pkt)
Serialize an imquic packet object to a QUIC packet ready to be sent, taking care of header protection...
Definition quic.c:2292
imquic_long_packet_type
QUIC long packet types.
Definition quic.h:41
@ IMQUIC_INITIAL
Definition quic.h:42
@ IMQUIC_RETRY
Definition quic.h:45
@ IMQUIC_0RTT
Definition quic.h:43
@ IMQUIC_HANDSHAKE
Definition quic.h:44
size_t imquic_payload_add_path_challenge(uint8_t *bytes, size_t blen, uint8_t *data)
Helper method to add a PATH_CHALLENGE frame to a buffer.
Definition quic.c:1589
size_t imquic_payload_add_streams_blocked(uint8_t *bytes, size_t blen, uint64_t max_streams)
Helper method to add a STREAMS_BLOCKED frame to a buffer.
Definition quic.c:1554
size_t imquic_payload_parse_ack(imquic_connection *conn, uint8_t *bytes, size_t blen, enum ssl_encryption_level_t level)
Helper method to process an ACK frame.
Definition quic.c:823
const char * imquic_transport_parameter_str(imquic_transport_parameter param)
Helper function to serialize to string the name of a imquic_transport_parameter value.
Definition quic.c:120
size_t imquic_payload_parse_reset_stream(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a RESET_STREAM frame.
Definition quic.c:942
struct imquic_packet imquic_packet
Abstraction of a QUIC packet.
size_t imquic_payload_parse_crypto(imquic_connection *conn, uint8_t *bytes, size_t blen, enum ssl_encryption_level_t level)
Helper method to process a CRYPTO frame, and in case add all chunks to the buffer associated with the...
Definition quic.c:993
size_t imquic_payload_parse_path_challenge(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a PATH_CHALLENGE frame.
Definition quic.c:1301
int imquic_parse_frames(imquic_connection *conn, imquic_packet *pkt)
Parse QUIC frames in a QUIC message payload.
Definition quic.c:672
size_t imquic_payload_add_data_blocked(uint8_t *bytes, size_t blen, uint64_t max_data)
Helper method to add a DATA_BLOCKED frame to a buffer.
Definition quic.c:1537
size_t imquic_payload_parse_new_token(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a NEW_TOKEN frame.
Definition quic.c:1019
size_t imquic_transport_parameter_add_data(uint8_t *bytes, size_t blen, imquic_transport_parameter param, uint8_t *buf, size_t buflen)
Helper to add a QUIC transport parameter with generic data to a buffer.
Definition quic.c:1665
size_t imquic_payload_add_ack(uint8_t *bytes, size_t blen, GList *received, uint64_t delay, uint64_t *ecn_counts)
Helper method to add a ACK frame to a buffer.
Definition quic.c:1390
size_t imquic_payload_parse_stop_sending(imquic_connection *conn, uint8_t *bytes, size_t blen)
Helper method to process a STOP_SENDING frame.
Definition quic.c:969
void imquic_quic_connection_add(imquic_connection *conn, imquic_connection_id *cid)
Track a Connection ID and map it to a connection.
Definition quic.c:21
struct imquic_sent_packet imquic_sent_packet
Info on a sent packet.
imquic_frame_type
QUIC frame types.
Definition quic.h:53
@ IMQUIC_PING
Definition quic.h:55
@ IMQUIC_PATH_CHALLENGE
Definition quic.h:80
@ IMQUIC_PADDING
Definition quic.h:54
@ IMQUIC_STREAMS_BLOCKED_UNI
Definition quic.h:77
@ IMQUIC_STREAM_OF
Definition quic.h:67
@ IMQUIC_STOP_SENDING
Definition quic.h:59
@ IMQUIC_MAX_STREAM_DATA
Definition quic.h:71
@ IMQUIC_NEW_CONNECTION_ID
Definition quic.h:78
@ IMQUIC_ACK_WITH_ECN
Definition quic.h:57
@ IMQUIC_MAX_DATA
Definition quic.h:70
@ IMQUIC_STREAM_OLF
Definition quic.h:69
@ IMQUIC_RESET_STREAM
Definition quic.h:58
@ IMQUIC_ACK
Definition quic.h:56
@ IMQUIC_STREAM_DATA_BLOCKED
Definition quic.h:75
@ IMQUIC_STREAM
Definition quic.h:62
@ IMQUIC_STREAM_F
Definition quic.h:63
@ IMQUIC_STREAM_O
Definition quic.h:66
@ IMQUIC_CONNECTION_CLOSE
Definition quic.h:82
@ IMQUIC_HANDSHAKE_DONE
Definition quic.h:84
@ IMQUIC_STREAMS_BLOCKED
Definition quic.h:76
@ IMQUIC_CONNECTION_CLOSE_APP
Definition quic.h:83
@ IMQUIC_MAX_STREAMS
Definition quic.h:72
@ IMQUIC_STREAM_OL
Definition quic.h:68
@ IMQUIC_STREAM_LF
Definition quic.h:65
@ IMQUIC_DATAGRAM_L
Definition quic.h:86
@ IMQUIC_STREAM_L
Definition quic.h:64
@ IMQUIC_RETIRE_CONNECTION_ID
Definition quic.h:79
@ IMQUIC_MAX_STREAMS_UNI
Definition quic.h:73
@ IMQUIC_NEW_TOKEN
Definition quic.h:61
@ IMQUIC_DATAGRAM
Definition quic.h:85
@ IMQUIC_CRYPTO
Definition quic.h:60
@ IMQUIC_DATA_BLOCKED
Definition quic.h:74
@ IMQUIC_PATH_RESPONSE
Definition quic.h:81
QUIC STREAM abstraction (headers)
QUIC Connection ID.
Definition connection.h:31
QUIC Connection.
Definition connection.h:101
Generic fixed size data buffer.
Definition utils.h:154
A serialized QUIC frame.
Definition quic.h:96
uint8_t * buffer
Content of the frame.
Definition quic.h:100
size_t size
Size of the frame.
Definition quic.h:102
imquic_frame_type type
Frame type.
Definition quic.h:98
Abstraction of a network address.
Definition network.h:29
Abstraction of a network endpoint (client or server)
Definition network.h:43
Abstraction of a QUIC packet.
Definition quic.h:141
size_t frames_size
Cumulative size of all the frames.
Definition quic.h:166
gboolean spin_bit
Whether ths spin bit and/or the key phase bit are set in this packet (only in case longheader is FALS...
Definition quic.h:149
imquic_long_packet_type type
Type of long header packet (only in case longheader is TRUE)
Definition quic.h:151
imquic_data_fixed payload
Buffers.
Definition quic.h:172
uint64_t packet_number
QUIC packet number.
Definition quic.h:159
imquic_connection_id destination
Destination Connection ID.
Definition quic.h:155
size_t length_offset
Offsets in the packet data to where the lenght, packet number and payload are.
Definition quic.h:161
imquic_connection_id source
Source Connection ID (only in case longheader is TRUE)
Definition quic.h:157
gboolean ack_eliciting
Whether this packet contains ACK-eliciting frames.
Definition quic.h:168
GList * frames
List of serialized frames in this packet.
Definition quic.h:164
imquic_data_fixed data
Definition quic.h:172
gboolean is_protected
Definition quic.h:143
size_t payload_offset
Definition quic.h:161
gboolean retransmit_if_lost
Whether this packet should be retransmitted if lost.
Definition quic.h:170
enum ssl_encryption_level_t level
The encryption level of this packet.
Definition quic.h:145
gboolean is_valid
Whether the packet is valid, (still) protected, and (still) encrypted.
Definition quic.h:143
gboolean longheader
Whether this packet uses a long or short header.
Definition quic.h:147
gboolean key_phase
Definition quic.h:149
uint32_t version
QUIC version in the packet (only in case longheader is TRUE)
Definition quic.h:153
size_t pkn_offset
Definition quic.h:161
gboolean is_encrypted
Definition quic.h:143
Info on a sent packet.
Definition quic.h:196
int64_t sent_time
Monotonic time of when this packet was sent.
Definition quic.h:208
uint64_t packet_number
Packet number.
Definition quic.h:204
size_t packet_size
Packet size in bytes.
Definition quic.h:206
enum ssl_encryption_level_t level
The encryption level of this packet.
Definition quic.h:202
gboolean ack_eliciting
Whether this packet contained ACK-eliciting frames.
Definition quic.h:210
imquic_connection * conn
Connection this packet was sent on.
Definition quic.h:198
imquic_packet * packet
imquic_packet instance, in case we need it for retransmissions
Definition quic.h:200
Generic utilities (headers)