CLEANUP: assorted typo fixes in the code and comments

This is 14th iteration of typo fixes
This commit is contained in:
Ilya Shipitsin 2021-01-05 22:10:46 +05:00 committed by Willy Tarreau
parent 96d5368202
commit 1e9a66603f
11 changed files with 61 additions and 61 deletions

View File

@ -93,7 +93,7 @@
/* Maximum length of the cache secondary key (sum of all the possible parts of
* the secondary key). The actual keys might be smaller for some
* request/response pairs, because they depend on the responses' optional Vary
* header. The differents sizes can be found in the vary_information object (see
* header. The different sizes can be found in the vary_information object (see
* cache.c).*/
#define HTTP_CACHE_SEC_KEY_LEN (sizeof(int)+sizeof(int)+sizeof(int))

View File

@ -84,7 +84,7 @@ union quic_cc_algo_state {
};
struct quic_cc {
/* <conn> is there ony for debugging purpose. */
/* <conn> is there only for debugging purpose. */
struct quic_conn *qc;
struct quic_cc_algo *algo;
union quic_cc_algo_state algo_state;

View File

@ -220,7 +220,7 @@ static inline const char *ssl_error_str(int err)
return "WANT_CLIENT_HELLO_CB";
#endif
default:
return "UNKNWON";
return "UNKNOWN";
}
}

View File

@ -146,7 +146,7 @@ enum quic_pkt_type {
#define QUIC_PACKET_KEY_PHASE_BIT 0x04 /* (protected) */
/*
* Tranport level error codes.
* Transport level error codes.
*/
#define NO_ERROR 0x00
#define INTERNAL_ERROR 0x01
@ -577,7 +577,7 @@ struct quic_conn {
size_t enc_params_len;
/*
* Original Destination Connection ID (comming with first client Initial packets).
* Original Destination Connection ID (coming with first client Initial packets).
* Used only by servers.
*/
struct ebmb_node odcid_node;

View File

@ -54,7 +54,7 @@ static inline size_t sizeof_quic_cid(const struct quic_cid *cid)
}
/* Copy <src> QUIC CID to <dst>.
* This is the responsability of the caller to check there is enough room in
* This is the responsibility of the caller to check there is enough room in
* <dst> to copy <src>.
* Always succeeds.
*/
@ -145,7 +145,7 @@ static inline void quic_connection_id_to_frm_cpy(struct quic_frame *dst,
/* Allocate a new CID with <seq_num> as sequence number and attach it to <root>
* ebtree.
* Returns the new CID if succedded, NULL if not.
* Returns the new CID if succeeded, NULL if not.
*/
static inline struct quic_connection_id *new_quic_cid(struct eb_root *root,
int seq_num)
@ -213,7 +213,7 @@ static inline int quic_read_uint32(uint32_t *val,
/* Write a 32-bits integer to a buffer with <buf> as address.
* Make <buf> point to the data after this 32-buts value if succeeded.
* Note that thes 32-bits integers are networkg bytes ordered.
* Note that these 32-bits integers are networkg bytes ordered.
* Returns 0 if failed (not enough room in the buffer), 1 if succeeded.
*/
static inline int quic_write_uint32(unsigned char **buf,
@ -465,7 +465,7 @@ static inline size_t quic_packet_number_length(int64_t pn,
/* Encode <pn> packet number with <pn_len> as length in byte into a buffer with
* <buf> as current copy address and <end> as pointer to one past the end of
* this buffer. This is the responsability of the caller to check there is
* this buffer. This is the responsibility of the caller to check there is
* enough room in the buffer to copy <pn_len> bytes.
* Never fails.
*/
@ -542,7 +542,7 @@ static inline void quic_transport_params_init(struct quic_transport_params *p,
* order.
* So ->ipv4_addr and ->ipv6_addr, which are buffers, must contained values
* already encoded in network byte order.
* It is the responsability of the caller to check there is enough room in <buf> to encode
* It is the responsibility of the caller to check there is enough room in <buf> to encode
* this address.
* Never fails.
*/
@ -744,7 +744,7 @@ static inline int quic_transport_param_decode_type_len(uint64_t *type, uint64_t
}
/* Encode <param> bytes stream with <type> as type and <length> as length into buf.
* Returns 1 if succeded, 0 if not.
* Returns 1 if succeeded, 0 if not.
*/
static inline int quic_transport_param_enc_mem(unsigned char **buf, const unsigned char *end,
uint64_t type, void *param, uint64_t length)
@ -1152,7 +1152,7 @@ static inline ssize_t q_buf_room(struct q_buf *buf)
return q_buf_end(buf) - q_buf_getpos(buf);
}
/* Reset (or empty) <buf> buffer to prepare it for the next writting. */
/* Reset (or empty) <buf> buffer to prepare it for the next writing. */
static inline void q_buf_reset(struct q_buf *buf)
{
buf->pos = buf->area;

View File

@ -837,7 +837,7 @@ XXH_PUBLIC_API XXH128_hash_t XXH128(const void* data, size_t len, XXH64_hash_t s
*
* The check costs one initial branch per hash, which is generally negligible, but not zero.
* Moreover, it's not useful to generate binary for an additional code path
* if memory access uses same instruction for both aligned and unaligned adresses.
* if memory access uses same instruction for both aligned and unaligned addresses.
*
* In these cases, the alignment check can be removed by setting this macro to 0.
* Then the code will always use unaligned memory access.
@ -1046,7 +1046,7 @@ static xxh_u32 XXH_read32(const void* memPtr)
#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */
/* *** Endianess *** */
/* *** Endianness *** */
typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess;
/*!

View File

@ -193,7 +193,7 @@ client c1 -connect ${h1_fe_sock} {
# This request matches the cache entry for the request above, despite
# matching the `accept-encoding` of the first request because the
# request above only has the `identity` encoding which is implicitly
# added, unless explicitely forbidden.
# added, unless explicitly forbidden.
txreq -url "/accept-encoding" -hdr "Accept-Encoding: first_value"
rxresp
expect resp.status == 200

View File

@ -1,4 +1,4 @@
# Checks that compression doesnt cause corruption..
# Checks that compression doesn't cause corruption..
varnishtest "Compression validation"
#REQUIRE_VERSION=1.6

View File

@ -87,7 +87,7 @@ const char *quic_frame_type_string(enum quic_frame_type ft)
}
/* Encode <frm> PADDING frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_padding_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -142,7 +142,7 @@ static int quic_parse_ping_frame(struct quic_frame *frm, struct quic_conn *qc,
}
/* Encode a ACK frame.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_ack_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -205,7 +205,7 @@ static int quic_parse_ack_frame_header(struct quic_frame *frm, struct quic_conn
}
/* Encode a ACK_ECN frame.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_ack_ecn_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -233,7 +233,7 @@ static int quic_parse_ack_ecn_frame(struct quic_frame *frm, struct quic_conn *qc
}
/* Encode a RESET_STREAM frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_reset_stream_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -259,7 +259,7 @@ static int quic_parse_reset_stream_frame(struct quic_frame *frm, struct quic_con
}
/* Encode a STOP_SENDING frame.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_stop_sending_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -283,7 +283,7 @@ static int quic_parse_stop_sending_frame(struct quic_frame *frm, struct quic_con
}
/* Encode a CRYPTO frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_crypto_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -336,7 +336,7 @@ static int quic_parse_crypto_frame(struct quic_frame *frm, struct quic_conn *qc,
}
/* Encode a NEW_TOKEN frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_new_token_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -369,7 +369,7 @@ static int quic_parse_new_token_frame(struct quic_frame *frm, struct quic_conn *
}
/* Encode a STREAM frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_stream_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -420,7 +420,7 @@ static int quic_parse_stream_frame(struct quic_frame *frm, struct quic_conn *qc,
}
/* Encode a MAX_DATA frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_max_data_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -442,7 +442,7 @@ static int quic_parse_max_data_frame(struct quic_frame *frm, struct quic_conn *q
}
/* Encode a MAX_STREAM_DATA frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_max_stream_data_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -466,7 +466,7 @@ static int quic_parse_max_stream_data_frame(struct quic_frame *frm, struct quic_
}
/* Encode a MAX_STREAMS frame for bidirectional streams into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_max_streams_bidi_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -489,7 +489,7 @@ static int quic_parse_max_streams_bidi_frame(struct quic_frame *frm, struct quic
}
/* Encode a MAX_STREAMS frame for unidirectional streams into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_max_streams_uni_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -512,7 +512,7 @@ static int quic_parse_max_streams_uni_frame(struct quic_frame *frm, struct quic_
}
/* Encode a DATA_BLOCKED frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_data_blocked_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -534,7 +534,7 @@ static int quic_parse_data_blocked_frame(struct quic_frame *frm, struct quic_con
}
/* Encode a STREAM_DATA_BLOCKED into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_stream_data_blocked_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -558,7 +558,7 @@ static int quic_parse_stream_data_blocked_frame(struct quic_frame *frm, struct q
}
/* Encode a STREAMS_BLOCKED frame for bidirectional streams into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_streams_blocked_bidi_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -581,7 +581,7 @@ static int quic_parse_streams_blocked_bidi_frame(struct quic_frame *frm, struct
}
/* Encode a STREAMS_BLOCKED frame for unidirectional streams into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_streams_blocked_uni_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -604,7 +604,7 @@ static int quic_parse_streams_blocked_uni_frame(struct quic_frame *frm, struct q
}
/* Encode a NEW_CONNECTION_ID frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_new_connection_id_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -655,7 +655,7 @@ static int quic_parse_new_connection_id_frame(struct quic_frame *frm, struct qui
}
/* Encode a RETIRE_CONNECTION_ID frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_retire_connection_id_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -677,7 +677,7 @@ static int quic_parse_retire_connection_id_frame(struct quic_frame *frm, struct
}
/* Encode a PATH_CHALLENGE frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_path_challenge_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -712,7 +712,7 @@ static int quic_parse_path_challenge_frame(struct quic_frame *frm, struct quic_c
/* Encode a PATH_RESPONSE frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_path_response_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -748,7 +748,7 @@ static int quic_parse_path_response_frame(struct quic_frame *frm, struct quic_co
/* Encode a CONNECTION_CLOSE frame at QUIC layer into <buf> buffer.
* Note there exist two types of CONNECTION_CLOSE frame, one for the application layer
* and another at QUIC layer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_connection_close_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -794,7 +794,7 @@ static int quic_parse_connection_close_frame(struct quic_frame *frm, struct quic
/* Encode a CONNECTION_CLOSE frame at application layer into <buf> buffer.
* Note there exist two types of CONNECTION_CLOSE frame, one for application layer
* and another at QUIC layer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
static int quic_build_connection_close_app_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn)
@ -937,7 +937,7 @@ struct quic_frame_parser quic_frame_parsers[] = {
};
/* Decode a QUIC frame from <buf> buffer into <frm> frame.
* Returns 1 if succeded (enough data to parse the frame), 0 if not.
* Returns 1 if succeeded (enough data to parse the frame), 0 if not.
*/
int qc_parse_frm(struct quic_frame *frm, struct quic_rx_packet *pkt,
const unsigned char **buf, const unsigned char *end,
@ -974,7 +974,7 @@ int qc_parse_frm(struct quic_frame *frm, struct quic_rx_packet *pkt,
}
/* Encode <frm> QUIC frame into <buf> buffer.
* Returns 1 if succeded (enough room in <buf> to encode the frame), 0 if not.
* Returns 1 if succeeded (enough room in <buf> to encode the frame), 0 if not.
*/
int qc_build_frm(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_tx_packet *pkt,

View File

@ -4969,7 +4969,7 @@ ssl_sock_free_ca(struct bind_conf *bind_conf)
* <ssl> as addresses, <bio_meth> as BIO method and <ssl_ctx> as SSL context inherited settings.
* Connect the allocated BIO to the allocated SSL session. Also set <ctx> as address of custom
* data for the BIO and store <conn> as user data of the SSL session object.
* This is the responsability of the caller to check the validity of all the pointers passed
* This is the responsibility of the caller to check the validity of all the pointers passed
* as parameters to this function.
* Return 0 if succeeded, -1 if not. If failed, sets the ->err_code member of <conn> to
* CO_ER_SSL_NO_MEM.

View File

@ -67,7 +67,7 @@ static const struct trace_event quic_trace_events[] = {
{ .mask = QUIC_EV_CONN_WSEC, .name = "write_secs", .desc = "write secrets derivation" },
{ .mask = QUIC_EV_CONN_LPKT, .name = "lstnr_packet", .desc = "new listener received packet" },
{ .mask = QUIC_EV_CONN_SPKT, .name = "srv_packet", .desc = "new server received packet" },
{ .mask = QUIC_EV_CONN_ENCPKT, .name = "enc_hdshk_pkt", .desc = "handhshake packet encrytion" },
{ .mask = QUIC_EV_CONN_ENCPKT, .name = "enc_hdshk_pkt", .desc = "handhshake packet encryption" },
{ .mask = QUIC_EV_CONN_HPKT, .name = "hdshk_pkt", .desc = "handhshake packet building" },
{ .mask = QUIC_EV_CONN_PAPKT, .name = "phdshk_apkt", .desc = "post handhshake application packet preparation" },
{ .mask = QUIC_EV_CONN_PAPKTS, .name = "phdshk_apkts", .desc = "post handhshake application packets preparation" },
@ -703,7 +703,7 @@ int ha_quic_set_encryption_secrets(SSL *ssl, enum ssl_encryption_level_t level,
#else
/* ->set_read_secret callback to derive the RX secrets at <level> encryption
* level.
* Returns 1 if succedded, 0 if not.
* Returns 1 if succeeded, 0 if not.
*/
int ha_set_rsec(SSL *ssl, enum ssl_encryption_level_t level,
const SSL_CIPHER *cipher,
@ -751,7 +751,7 @@ int ha_set_rsec(SSL *ssl, enum ssl_encryption_level_t level,
/* ->set_write_secret callback to derive the TX secrets at <level>
* encryption level.
* Returns 1 if succedded, 0 if not.
* Returns 1 if succeeded, 0 if not.
*/
int ha_set_wsec(SSL *ssl, enum ssl_encryption_level_t level,
const SSL_CIPHER *cipher,
@ -1381,7 +1381,7 @@ static void qc_packet_loss_lookup(struct quic_pktns *pktns,
/* Parse ACK frame into <frm> from a buffer at <buf> address with <end> being at
* one byte past the end of this buffer. Also update <rtt_sample> if needed, i.e.
* if the largest acked packet was newly acked and if there was at leas one newly
* if the largest acked packet was newly acked and if there was at least one newly
* acked ack-eliciting packet.
* Return 1, if succeeded, 0 if not.
*/
@ -1498,7 +1498,7 @@ static inline int qc_parse_ack_frm(struct quic_frame *frm, struct quic_conn_ctx
/* Provide CRYPTO data to the TLS stack found at <data> with <len> as length
* from <qel> encryption level with <ctx> as QUIC connection context.
* Remaining parameter are there for debuging purposes.
* Remaining parameter are there for debugging purposes.
* Return 1 if succeeded, 0 if not.
*/
static inline int qc_provide_cdata(struct quic_enc_level *el,
@ -1927,7 +1927,7 @@ static inline size_t sack_gap(struct quic_arng_node *p,
/* Remove the last elements of <ack_ranges> list of ack range updating its
* encoded size until it goes below <limit>.
* Returns 1 if succeded, 0 if not (no more element to remove).
* Returns 1 if succeeded, 0 if not (no more element to remove).
*/
static int quic_rm_last_ack_ranges(struct quic_arngs *arngs, size_t limit)
{
@ -2331,7 +2331,7 @@ struct quic_conn *new_quic_conn(uint32_t version)
return quic_conn;
}
/* Unitialize <qel> QUIC encryption level. Never fails. */
/* Uninitialize <qel> QUIC encryption level. Never fails. */
static void quic_conn_enc_level_uninit(struct quic_enc_level *qel)
{
int i;
@ -2347,7 +2347,7 @@ static void quic_conn_enc_level_uninit(struct quic_enc_level *qel)
}
/* Initialize QUIC TLS encryption level with <level<> as level for <qc> QUIC
* connetion allocating everything needed.
* connection allocating everything needed.
* Returns 1 if succeeded, 0 if not.
*/
static int quic_conn_enc_level_init(struct quic_conn *qc,
@ -2560,7 +2560,7 @@ int qc_new_conn_init(struct quic_conn *qc, int ipv4,
/* Select our SCID which is the first CID with 0 as sequence number. */
qc->scid = icid->cid;
/* Insert the DCID the QUIC client has choosen (only for listeners) */
/* Insert the DCID the QUIC client has chosen (only for listeners) */
if (objt_listener(qc->conn->target))
ebmb_insert(quic_initial_clients, &qc->odcid_node, qc->odcid.len);
@ -3033,7 +3033,7 @@ static ssize_t qc_lstnr_pkt_rcv(unsigned char **buf, const unsigned char *end,
*/
pkt->token_len = token_len;
/* NOTE: the socket address has been concatenated to the destination ID
* choosen by the client for Initial packets.
* chosen by the client for Initial packets.
*/
if (!ctx->rx.hp && !qc_new_isecs(qc->conn, pkt->dcid.data,
pkt->odcid_len, 1)) {
@ -3227,10 +3227,10 @@ static int quic_ack_frm_reduce_sz(struct quic_frame *ack_frm, size_t limit)
* encryption level to be encoded in a buffer with <room> as available room,
* and <*len> the packet Length field initialized with the number of bytes already present
* in this buffer which must be taken into an account for the Length packet field value.
* <headlen> is the number of bytes already present in this packet befor building
* <headlen> is the number of bytes already present in this packet before building
* CRYPTO frames.
* This is the responsability of the caller to check that <*len> < <room> as this is
* the responsability to check that <headlen> < quic_path_prep_data(conn->path).
* This is the responsibility of the caller to check that <*len> < <room> as this is
* the responsibility to check that <headlen> < quic_path_prep_data(conn->path).
* Update consequently <*len> to reflect the size of these CRYPTO frames built
* by this function. Also attach these CRYPTO frames to <pkt> QUIC packet.
* Return 1 if succeeded, 0 if not.
@ -3317,7 +3317,7 @@ static inline int qc_build_cfrms(struct quic_tx_packet *pkt,
* reserved so that to be sure there is enough room to build this AEAD TAG after
* having successfully returned from this function and to be sure the position
* pointer of <wbuf> may be safely incremented by QUIC_TLS_TAG_LEN. After having
* returned from this funciton, <wbuf> position will point one past the last
* returned from this function, <wbuf> position will point one past the last
* byte of the payload with the confidence there is at least QUIC_TLS_TAG_LEN bytes
* available packet to encrypt this packet.
* This function also update the value of <buf_pn> pointer to point to the packet
@ -3515,7 +3515,7 @@ static inline void quic_tx_packet_init(struct quic_tx_packet *pkt)
LIST_INIT(&pkt->frms);
}
/* Free <pkt> TX packet which has not already attache to any tree. */
/* Free <pkt> TX packet which has not already attached to any tree. */
static inline void free_quic_tx_packet(struct quic_tx_packet *pkt)
{
struct quic_tx_frm *frm, *frmbak;
@ -3610,7 +3610,7 @@ static ssize_t qc_build_hdshk_pkt(struct q_buf *buf, struct quic_conn *qc, int p
return -2;
}
/* Prepare a clear post handhskake packet for <conn> QUIC connnection.
/* Prepare a clear post handhskake packet for <conn> QUIC connection.
* Return the length of this packet if succeeded, -1 <wbuf> was full.
*/
static ssize_t qc_do_build_phdshk_apkt(struct q_buf *wbuf,
@ -3732,13 +3732,13 @@ static ssize_t qc_do_build_phdshk_apkt(struct q_buf *wbuf,
}
/* Prepare a post handhskake packet at Application encryption level for <conn>
* QUIC connnection.
* QUIC connection.
* Return the length of this packet if succeeded, -1 if <wbuf> was full,
* -2 in case of major error (encryption failure).
*/
static ssize_t qc_build_phdshk_apkt(struct q_buf *wbuf, struct quic_conn *qc)
{
/* A pointer to the packet number fiel in <buf> */
/* A pointer to the packet number field in <buf> */
unsigned char *buf_pn;
unsigned char *beg, *end, *payload;
int64_t pn;
@ -4024,7 +4024,7 @@ static size_t quic_conn_from_buf(struct connection *conn, void *xprt_ctx, const
count -= ret;
done += ret;
/* A send succeeded, so we can consier ourself connected */
/* A send succeeded, so we can consider ourself connected */
conn->flags |= CO_FL_WAIT_L4L6;
/* if the system buffer is full, don't insist */
if (ret < try)
@ -4205,7 +4205,7 @@ static void __quic_conn_deinit(void)
/* Read all the QUIC packets found in <buf> with <len> as length (typically a UDP
* datagram), <ctx> being the QUIC I/O handler context, from QUIC connections,
* calling <func> function;
* Return the number of bytes read if succeded, -1 if not.
* Return the number of bytes read if succeeded, -1 if not.
*/
static ssize_t quic_dgram_read(char *buf, size_t len, void *owner,
struct sockaddr_storage *saddr, qpkt_read_func *func)