Lines Matching full:packet
22 /* QUIC logical packet type. These do not match wire values. */
31 * Determine encryption level from packet type. Returns QUIC_ENC_LEVEL_NUM if
32 * the packet is not of a type which is encrypted.
68 /* Determine if a packet type contains an encrypted payload. */
81 /* Determine if a packet type contains a PN field. */
86 * Currently a packet has a PN iff it is encrypted. This could change in ossl_quic_pkt_type_has_pn()
93 * Determine if a packet type can appear with other packets in a datagram. Some
94 * packet types must be the sole packet in a datagram.
100 * Currently only the encrypted packet types can share a datagram. This in ossl_quic_pkt_type_can_share_dgram()
107 * Determine if the packet type must come at the end of the datagram (due to the
114 * Any packet type which cannot share a datagram obviously must come last. in ossl_quic_pkt_type_must_be_last()
122 * Determine if the packet type has a version field.
131 * Determine if the packet type has a SCID field.
140 * Smallest possible QUIC packet size as per RFC (aside from version negotiation
150 * QUIC Packet Header Protection
153 * Functions to apply and remove QUIC packet header protection. A header
203 * Removes header protection from a packet. The packet payload must currently be
218 * Applies header protection to a packet. The packet payload must already have
220 * a packet). The function examines the header buffer to determine which bytes
231 * Removes header protection from a packet. The packet payload must currently
233 * determined which parts of the packet header need to be decrypted.
236 * The range of bytes in the packet to be used to generate the header
238 * remainder of the packet; this function will only use as many bytes as
242 * The first byte of the QUIC packet header to be decrypted.
267 * QUIC Packet Header
270 * This structure provides a logical representation of a QUIC packet header.
272 * QUIC packet formats fall into the following categories:
274 * Long Packets, which is subdivided into five possible packet types:
281 * Short Packets, which comprises only a single packet type (1-RTT).
283 * The packet formats vary and common fields are found in some packets but
285 * kinds of packet. * indicates header protection is applied.
295 * 1i0h * Packet Number Length
296 * i0hr? Long Packet Type
301 * 1i0h * Packet Number
319 * [S] Value of the Key Phase bit in the short packet.
325 * [1i0h] Length of packet number in bytes. This is the decoded value.
331 * [ALL] Set to 1 if this is a partial decode because the packet header
340 * other packet types (decode will fail if it is not set). Ignored when
341 * encoding unless encoding a Version Negotiation packet.
346 * The unused bits in the low 4 bits of a Retry packet header's first byte.
349 * This is necessary to validate Retry packet headers.
354 * The 'Reserved' bits in an Initial, Handshake, 0-RTT or 1-RTT packet
356 * that they are zero, as this must be done after packet protection is
374 * [1i0h] Relatively-encoded packet number in raw, encoded form. The correct
384 * [i] Token field in Initial packet. Points to memory inside the decoded
385 * PACKET, and therefore is valid for as long as the PACKET's buffer is
398 * packet header encoding and decoding routines to describe the payload
399 * length, regardless of whether the packet type encoded or decoded uses an
405 * Pointer to start of payload data in the packet. Points to memory inside
406 * the decoded PACKET, and therefore is valid for as long as the PACKET'S
412 * For Retry packets, points to the Retry packet payload, which comprises
415 * Regardless of whether a packet is a Version Negotiation packet (where the
416 * payload contains a list of supported versions), a Retry packet (where the
418 * packet type (where the payload contains frames), the payload is not
422 * the packet number field, rather than the protected payload, as the length
423 * of the packet number field is unknown. The len field reflects this in
431 * Extra information which can be output by the packet header decode functions
433 * needing to partially re-decode the packet header.
436 unsigned char *raw_start; /* start of packet */
448 * If partial is 1, reads the unprotected parts of a protected packet header
449 * from a PACKET, performing a partial decode.
457 * On success, the logical decode of the packet header is written to *hdr.
459 * performed. *ptrs is filled with pointers to various parts of the packet
466 * packet, but succeeds for long packets.
478 int ossl_quic_wire_decode_pkt_hdr(PACKET *pkt,
487 * Encodes a packet header. The packet is written to pkt.
489 * The length of the (encrypted) packet payload should be written to hdr->len
490 * and will be placed in the serialized packet header. The payload data itself
516 * If serializing a short packet and short_conn_id_len does not match the DCID
527 * Retrieves only the DCID from a packet header. This is intended for demuxer
528 * use. It avoids the need to parse the rest of the packet header twice.
530 * Information on packet length is not decoded, as this only needs to be used on
531 * the first packet in a datagram, therefore this takes a buffer and not a
532 * PACKET.
542 * Precisely predicts the encoded length of a packet header structure.
544 * May return 0 if the packet header is not valid, but the fact that this
552 * Packet Number Encoding
557 * Decode an encoded packet header QUIC PN.
560 * indicated by packet headers. largest_pn is the largest PN successfully
579 * Encode a PN for a packet header using the specified number of bytes, which
604 * Initial packet, as this is used to calculate the Retry Integrity Tag.
606 * Returns 0 if the tag is invalid, if called on any other type of packet or if
619 * Initial packet, as this is used to calculate the Retry Integrity Tag.
623 * Note that hdr->data must point to the Retry packet body, and hdr->len must
625 * easily fill in a tag in a Retry packet you are generating by calling this