picoquic/frames.c
uint8_t* picoquic_decode_retire_connection_id_frame(picoquic_cnx_t* cnx, uint8_t* bytes, const uint8_t* bytes_max, uint64_t current_time, picoquic_path_t * path_x)
{
    /* store the connection ID in order to support migration. */
    uint64_t sequence;

    if ((bytes = picoquic_frames_varint_decode(bytes + 1, bytes_max, &sequence)) == NULL) {
        picoquic_connection_error(cnx, PICOQUIC_TRANSPORT_FRAME_FORMAT_ERROR,
            picoquic_frame_type_retire_connection_id);
    }
    else if (sequence >= cnx->local_cnxid_sequence_next) {
        /* If there is no matching path, trigger an error */
        picoquic_connection_error(cnx, PICOQUIC_TRANSPORT_PROTOCOL_VIOLATION,
            picoquic_frame_type_retire_connection_id);
        bytes = NULL;
    }
    else if (path_x->p_local_cnxid != NULL &&
        sequence == path_x->p_local_cnxid->sequence) {
        /* Cannot delete the path through which it arrives */
        picoquic_connection_error(cnx, PICOQUIC_TRANSPORT_PROTOCOL_VIOLATION,
            picoquic_frame_type_retire_connection_id);
        bytes = NULL;
    }
    else {
        /* Go through the list of paths to find the connection ID */
        picoquic_retire_local_cnxid(cnx, sequence);
    }

    return bytes;
}
/*
 * Decode retire connection ID frame.
 * Mark the corresponding paths as retired. This should trigger resending a new connection ID.
 * Applications MAY note an error if the connection ID does not exist, but then they
 * MUST be damn sure that this not just a repeat of a previous retire connection ID message...
 */
Decode retire connection ID frame.
Mark the corresponding paths as retired. This should trigger resending a new connection ID.
Applications MAY note an error if the connection ID does not exist, but then they
MUST be damn sure that this not just a repeat of a previous retire connection ID message
Decode retire connection ID frame . Mark the corresponding paths as retired . This should trigger resending a new connection ID . Applications MAY note an error if the connection ID does not exist but then they MUST be damn sure that this not just a repeat of a previous retire connection ID message
uint8_t* picoquic_decode_retire_connection_id_frame(picoquic_cnx_t* cnx, uint8_t* bytes, const uint8_t* bytes_max, uint64_t current_time, picoquic_path_t * path_x)
{
    uint64_t sequence;
    if ((bytes = picoquic_frames_varint_decode(bytes + 1, bytes_max, &sequence)) == NULL) {
        picoquic_connection_error(cnx, PICOQUIC_TRANSPORT_FRAME_FORMAT_ERROR,
            picoquic_frame_type_retire_connection_id);
    }
    else if (sequence >= cnx->local_cnxid_sequence_next) {
        picoquic_connection_error(cnx, PICOQUIC_TRANSPORT_PROTOCOL_VIOLATION,
            picoquic_frame_type_retire_connection_id);
        bytes = NULL;
    }
    else if (path_x->p_local_cnxid != NULL &&
        sequence == path_x->p_local_cnxid->sequence) {
        picoquic_connection_error(cnx, PICOQUIC_TRANSPORT_PROTOCOL_VIOLATION,
            picoquic_frame_type_retire_connection_id);
        bytes = NULL;
    }
    else {
        picoquic_retire_local_cnxid(cnx, sequence);
    }
    return bytes;
}
uint8_t * picoquic_decode_retire_connection_id_frame ( picoquic_cnx_t * cnx , uint8_t * bytes , const uint8_t * bytes_max , uint64_t current_time , picoquic_path_t * path_x ) { uint64_t sequence ; if ( ( bytes = picoquic_frames_varint_decode ( bytes + 1 , bytes_max , & sequence ) ) == NULL ) { picoquic_connection_error ( cnx , PICOQUIC_TRANSPORT_FRAME_FORMAT_ERROR , picoquic_frame_type_retire_connection_id ) ; } else if ( sequence >= cnx -> local_cnxid_sequence_next ) { picoquic_connection_error ( cnx , PICOQUIC_TRANSPORT_PROTOCOL_VIOLATION , picoquic_frame_type_retire_connection_id ) ; bytes = NULL ; } else if ( path_x -> p_local_cnxid != NULL && sequence == path_x -> p_local_cnxid -> sequence ) { picoquic_connection_error ( cnx , PICOQUIC_TRANSPORT_PROTOCOL_VIOLATION , picoquic_frame_type_retire_connection_id ) ; bytes = NULL ; } else { picoquic_retire_local_cnxid ( cnx , sequence ) ; } return bytes ; }
Decode retire connection ID frame.
Decode retire connection ID frame .
/* store the connection ID in order to support migration. */ /* If there is no matching path, trigger an error */ /* Cannot delete the path through which it arrives */ /* Go through the list of paths to find the connection ID */