lsquic_packet_ietf.h revision 5392f7a3
1/* Copyright (c) 2017 - 2019 LiteSpeed Technologies Inc. See LICENSE. */ 2#ifndef LSQUIC_PACKET_IETF_H 3#define LSQUIC_PACKET_IETF_H 1 4 5#define IQUIC_MAX_IPv4_PACKET_SZ 1252 6#define IQUIC_MAX_IPv6_PACKET_SZ 1232 7 8#define iquic_packno_bits2len(b) ((b) + 1) 9 10/* [draft-ietf-quic-transport-22] Section 7.2: 11 " 12 When an Initial packet is sent by a client that has not previously 13 received an Initial or Retry packet from the server, it populates the 14 Destination Connection ID field with an unpredictable value. This 15 MUST be at least 8 bytes in length. 16 " 17 * Because the server always generates 8-byte CIDs, the DCID length cannot be 18 * smaller than 8 even if the client received an Initial or Retry packet from 19 * us. 20 */ 21#define MIN_INITIAL_DCID_LEN 8 22 23#endif 24