* defined in quic_frame.c. Do not forget to complete the associated function
* quic_frame_type_is_known() and both qf_builder()/qf_parser().
*/
+extern const uint64_t QUIC_FT_QX_TRANSPORT_PARAMETERS;
#define QUIC_FT_PKT_TYPE_I_BITMASK (1 << QUIC_PACKET_TYPE_INITIAL)
#define QUIC_FT_PKT_TYPE_0_BITMASK (1 << QUIC_PACKET_TYPE_0RTT)
unsigned char reason_phrase[QUIC_CC_REASON_PHRASE_MAXLEN];
};
+struct qf_qx_transport_parameters {
+ struct quic_transport_params params;
+};
+
struct quic_frame {
struct list list; /* List elem from parent elem (typically a Tx packet instance, a PKTNS or a MUX element). */
struct quic_tx_packet *pkt; /* Last Tx packet used to send the frame. */
struct qf_path_challenge_response path_challenge_response;
struct qf_connection_close connection_close;
struct qf_connection_close_app connection_close_app;
+ struct qf_qx_transport_parameters qmux_transport_params;
};
struct quic_frame *origin; /* Parent frame. Set if frame is a duplicate (used for retransmission). */
struct list reflist; /* List head containing duplicated children frames. */
return 1;
}
+static int quic_build_qmux_transport_parameters(unsigned char **pos, const unsigned char *end,
+ struct quic_frame *frm, struct quic_conn *conn)
+{
+ /* TODO */
+ return 1;
+}
+
/* Parse a HANDSHAKE_DONE frame at QUIC layer at <pos> buffer position with <end> as end into <frm> frame.
* Always succeed.
*/
return 1;
}
+static int quic_parse_qmux_transport_parameters(struct quic_frame *frm, struct quic_conn *qc,
+ const unsigned char **pos, const unsigned char *end)
+{
+ /* TODO */
+ return 1;
+}
+
struct quic_frame_builder {
int (*func)(unsigned char **pos, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn);
* };
*/
+/* quic-on-streams transport parameters frame. */
+const uint64_t QUIC_FT_QX_TRANSPORT_PARAMETERS = 0x3f5153300d0a0d0a;
+const struct quic_frame_parser qf_parser_qx_transport_parameters = {
+ .func = quic_parse_qmux_transport_parameters,
+ .mask = 0,
+ .flags = 0,
+};
+const struct quic_frame_builder qf_builder_qx_transport_parameters = {
+ .func = quic_build_qmux_transport_parameters,
+ .mask = 0,
+ .flags = 0,
+};
+
/* Returns true if frame <type> is supported. */
static inline int quic_frame_type_is_known(uint64_t type)
{
/* Complete here for extra frame types greater than QUIC_FT_MAX. */
- return type < QUIC_FT_MAX;
+ return type < QUIC_FT_MAX ||
+ (type == QUIC_FT_QX_TRANSPORT_PARAMETERS);
}
static const struct quic_frame_parser *qf_parser(uint64_t type)
return &quic_frame_parsers[type];
/* Complete here for extra frame types greater than QUIC_FT_MAX. */
+ if (type == QUIC_FT_QX_TRANSPORT_PARAMETERS)
+ return &qf_parser_qx_transport_parameters;
ABORT_NOW();
return NULL;
return &quic_frame_builders[type];
/* Complete here for extra frame types greater than QUIC_FT_MAX. */
+ if (type == QUIC_FT_QX_TRANSPORT_PARAMETERS)
+ return &qf_builder_qx_transport_parameters;
ABORT_NOW();
return NULL;