Lines Matching +full:frame +full:- +full:buffer
2 * Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
127 * QUIC Frame Logical Representations
131 /* QUIC Frame: ACK */
150 * being acknowledged and ack_ranges[num_ack_ranges-1].start is
153 * num_ack_ranges must be greater than zero, as an ACK frame must
164 /* Returns 1 if the given frame contains the given PN. */
167 /* QUIC Frame: STREAM */
176 * not. If zero, the len field is not encoded and it is assumed the frame
179 * On decode, this determines whether the frame had an explicitly encoded
180 * length. If not set, the frame runs to the end of the packet and len has
189 /* QUIC Frame: CRYPTO */
196 /* QUIC Frame: RESET_STREAM */
203 /* QUIC Frame: STOP_SENDING */
209 /* QUIC Frame: NEW_CONNECTION_ID */
217 /* QUIC Frame: CONNECTION_CLOSE */
220 uint64_t error_code; /* 62-bit transport or app error code */
222 char *reason; /* UTF-8 string, not necessarily zero-terminated */
235 * frame consumes one byte; num_bytes specifies the number of bytes of padding
241 * Encodes a QUIC PING frame to the packet writer. This frame type takes
247 * Encodes a QUIC ACK frame to the packet writer, given a logical representation
248 * of the ACK frame.
257 * which the ack->ack_delay field is be divided. This exponent value must match
265 * Encodes a QUIC RESET_STREAM frame to the packet writer, given a logical
266 * representation of the RESET_STREAM frame.
272 * Encodes a QUIC STOP_SENDING frame to the packet writer, given a logical
273 * representation of the STOP_SENDING frame.
279 * Encodes a QUIC CRYPTO frame header to the packet writer.
281 * To create a well-formed frame, the data written using this function must be
282 * immediately followed by f->len bytes of data.
289 * CRYPTO frame header. Does not include the payload bytes in the count.
295 * Encodes a QUIC CRYPTO frame to the packet writer.
297 * This function returns a pointer to a buffer of f->len bytes which the caller
298 * should fill however it wishes. If f->data is non-NULL, it is automatically
299 * copied to the target buffer, otherwise the caller must fill the returned
300 * buffer. Returns NULL on failure.
306 * Encodes a QUIC NEW_TOKEN frame to the packet writer.
313 * Encodes a QUIC STREAM frame's header to the packet writer. The f->stream_id,
314 * f->offset and f->len fields are the values for the respective Stream ID,
317 * If f->is_fin is non-zero, the frame is marked as the final frame in the
320 * If f->has_explicit_len is zerro, the frame is assumed to be the final frame
324 * To create a well-formed frame, the data written using this function must be
325 * immediately followed by f->len bytes of stream data.
332 * STREAM frame header. Does not include the payload bytes in the count.
339 * allocates space for f->len bytes of data after the header, creating a
340 * well-formed QUIC STREAM frame in one call.
343 * which the caller can fill however it wishes. If f->data is non-NULL,
344 * it is automatically copied to the target buffer, otherwise the caller
345 * must fill the returned buffer. Returns NULL on failure.
351 * Encodes a QUIC MAX_DATA frame to the packet writer.
357 * Encodes a QUIC MAX_STREAM_DATA frame to the packet writer.
364 * Encodes a QUIC MAX_STREAMS frame to the packet writer.
375 * Encodes a QUIC DATA_BLOCKED frame to the packet writer.
381 * Encodes a QUIC STREAM_DATA_BLOCKED frame to the packet writer.
387 * Encodes a QUIC STREAMS_BLOCKED frame to the packet writer.
398 * Encodes a QUIC NEW_CONNECTION_ID frame to the packet writer, given a logical
399 * representation of the NEW_CONNECTION_ID frame.
401 * The buffer pointed to by the conn_id field must be valid for the duration of
408 * Encodes a QUIC RETIRE_CONNECTION_ID frame to the packet writer.
414 * Encodes a QUIC PATH_CHALLENGE frame to the packet writer.
420 * Encodes a QUIC PATH_RESPONSE frame to the packet writer.
426 * Encodes a QUIC CONNECTION_CLOSE frame to the packet writer, given a logical
427 * representation of the CONNECTION_CLOSE frame.
430 * reason field is non-NULL, it must point to a valid UTF-8 string and
438 * Encodes a QUIC HANDSHAKE_DONE frame to the packet writer. This frame type
445 * The payload is an arbitrary buffer.
447 * If value is non-NULL, the value is copied into the packet.
449 * should fill the buffer using the returned pointer.
460 * The payload is a QUIC variable-length integer with the given value.
481 * - A frame decode function is called but the frame in the PACKET's buffer
484 * - A variable-length field in the encoded frame appears to exceed the bounds
485 * of the PACKET's buffer.
488 * frame (including the initial type field), and consume an entire frame
490 * already discerned the frame type using ossl_quic_wire_peek_frame_header().
494 * Decodes the type field header of a QUIC frame (without advancing the current
495 * position). This can be used to determine the frame type and determine which
496 * frame decoding function to call.
508 * Determines how many ranges are needed to decode a QUIC ACK frame.
519 * Decodes a QUIC ACK frame. The ack_ranges field of the passed structure should
523 * *total_ranges is written with the number of ranges in the decoded frame,
528 * number of ranges in the decoded frame. This is the number of entries in the
532 * If the number of ACK ranges in the decoded frame exceeds that in
537 * If ack is NULL, the frame is still decoded, but only *total_ranges is
543 * to encode the frame.
551 * Decodes a QUIC RESET_STREAM frame.
557 * Decodes a QUIC STOP_SENDING frame.
563 * Decodes a QUIC CRYPTO frame.
565 * f->data is set to point inside the packet buffer inside the PACKET, therefore
566 * it is safe to access for as long as the packet buffer exists. If nodata is
567 * set to 1 then reading the PACKET stops after the frame header and f->data is
574 * Decodes a QUIC NEW_TOKEN frame. *token is written with a pointer to the token
582 * Decodes a QUIC STREAM frame.
584 * If nodata is set to 1 then reading the PACKET stops after the frame header
585 * and f->data is set to NULL. In this case f->len will also be 0 in the event
588 * If the frame did not contain an offset field, f->offset is set to 0, as the
591 * If the frame contained a length field, f->has_explicit_len is set to 1 and
592 * the length of the data is placed in f->len. This function ensures that the
593 * length does not exceed the packet buffer, thus it is safe to access f->data.
595 * If the frame did not contain a length field, this means that the frame runs
596 * until the end of the packet. This function sets f->has_explicit_len to zero,
597 * and f->len to the amount of data remaining in the input buffer. Therefore,
601 * Note also that this means f->len is always valid after this function returns
602 * successfully, regardless of the value of f->has_explicit_len.
604 * f->data points inside the packet buffer inside the PACKET, therefore it is
605 * safe to access for as long as the packet buffer exists.
607 * f->is_fin is set according to whether the frame was marked as ending the
614 * Decodes a QUIC MAX_DATA frame. The Maximum Data field is written to
621 * Decodes a QUIC MAX_STREAM_DATA frame. The Stream ID is written to *stream_id
628 * Decodes a QUIC MAX_STREAMS frame. The Maximum Streams field is written to
632 * denoted by the frame type; the caller should examine the frame type to
639 * Decodes a QUIC DATA_BLOCKED frame. The Maximum Data field is written to
646 * Decodes a QUIC STREAM_DATA_BLOCKED frame. The Stream ID and Maximum Stream
654 * Decodes a QUIC STREAMS_BLOCKED frame. The Maximum Streams field is written to
658 * denoted by the frame type; the caller should examine the frame type to
666 * Decodes a QUIC NEW_CONNECTION_ID frame. The logical representation of the
667 * frame is written to *f.
670 * packet buffer; it is therefore valid for as long as the PACKET's buffer is
678 * Decodes a QUIC RETIRE_CONNECTION_ID frame. The Sequence Number field
685 * Decodes a QUIC PATH_CHALLENGE frame. The Data field is written to *data.
691 * Decodes a QUIC PATH_CHALLENGE frame. The Data field is written to *data.
697 * Decodes a QUIC CONNECTION_CLOSE frame. The logical representation
698 * of the frame is written to *f.
700 * The reason field is set to point to the UTF-8 reason string inside
701 * the packet buffer; it is therefore valid for as long as the PACKET's
702 * buffer is valid. The reason_len field is set to the length of the
705 * IMPORTANT: The reason string is not zero-terminated.
720 * Decodes a PING frame. The frame has no arguments.
725 * Decodes a HANDSHAKE_DONE frame. The frame has no arguments.
736 * Decodes a QUIC transport parameter TLV. A pointer to the value buffer is
737 * returned on success. This points inside the PACKET's buffer and is therefore
738 * valid as long as the PACKET's buffer is valid.
740 * The transport parameter ID is written to *id (if non-NULL) and the length of
750 * Decodes a QUIC transport parameter TLV containing a variable-length integer.
752 * The transport parameter ID is written to *id (if non-NULL) and the value is
762 * The transport parameter ID is written to *id (if non-NULL) and the value is