* have been generated by the ACKM. The fields in the structure are incremented
* by one every time the ACKM wants another probe of the given type to be sent.
* If the ACKM thinks two packets should be generated for a probe, it will
- * increment the field twice (TODO).
+ * increment the field twice.
*
* It is permissible for the caller to decrement or zero these fields to keep
* track of when it has generated a probe as asked. The returned structure
* This function should be called after calling e.g. ossl_ackm_on_timeout
* to determine if any probe requests have been generated.
*/
-OSSL_ACKM_PROBE_INFO *ossl_ackm_get_probe_request(OSSL_ACKM *ackm);
+OSSL_ACKM_PROBE_INFO *ossl_ackm_get0_probe_request(OSSL_ACKM *ackm);
int ossl_ackm_get_largest_unacked(OSSL_ACKM *ackm, int pkt_space, QUIC_PN *pn);
return ackm->loss_detection_deadline;
}
-OSSL_ACKM_PROBE_INFO *ossl_ackm_get_probe_request(OSSL_ACKM *ackm)
+OSSL_ACKM_PROBE_INFO *ossl_ackm_get0_probe_request(OSSL_ACKM *ackm)
{
return &ackm->pending_probe;
}
/* Do we need to send a PTO probe? */
if (a.allow_force_ack_eliciting) {
OSSL_ACKM_PROBE_INFO *probe_info
- = ossl_ackm_get_probe_request(txp->args.ackm);
+ = ossl_ackm_get0_probe_request(txp->args.ackm);
if ((enc_level == QUIC_ENC_LEVEL_INITIAL
&& probe_info->anti_deadlock_initial > 0)
OSSL_QTX_PKT pkt;
QUIC_STREAM *tmp_head = NULL, *stream;
OSSL_ACKM_PROBE_INFO *probe_info
- = ossl_ackm_get_probe_request(txp->args.ackm);
+ = ossl_ackm_get0_probe_request(txp->args.ackm);
if (!txp_get_archetype_data(enc_level, archetype, &a))
goto fatal_err;
goto err;
/* Should not have any probe requests yet. */
- probe = *ossl_ackm_get_probe_request(h.ackm);
+ probe = *ossl_ackm_get0_probe_request(h.ackm);
if (!TEST_int_eq(test_probe_counts(&probe, 0, 0, 0, 0, 0), 1))
goto err;
/* Should have a probe request. Not cleared by first call. */
for (i = 0; i < 3; ++i) {
- probe = *ossl_ackm_get_probe_request(h.ackm);
+ probe = *ossl_ackm_get0_probe_request(h.ackm);
if (i > 0)
- memset(ossl_ackm_get_probe_request(h.ackm), 0, sizeof(probe));
+ memset(ossl_ackm_get0_probe_request(h.ackm), 0, sizeof(probe));
if (i == 2) {
if (!TEST_int_eq(test_probe_counts(&probe, 0, 0, 0, 0, 0), 1))
/* 15. INITIAL, Anti-Deadlock Probe Simulation */
static int gen_probe_initial(struct helper *h)
{
- OSSL_ACKM_PROBE_INFO *probe = ossl_ackm_get_probe_request(h->args.ackm);
+ OSSL_ACKM_PROBE_INFO *probe = ossl_ackm_get0_probe_request(h->args.ackm);
/*
* Pretend the ACKM asked for an anti-deadlock Initial probe.
/* 16. HANDSHAKE, Anti-Deadlock Probe Simulation */
static int gen_probe_handshake(struct helper *h)
{
- OSSL_ACKM_PROBE_INFO *probe = ossl_ackm_get_probe_request(h->args.ackm);
+ OSSL_ACKM_PROBE_INFO *probe = ossl_ackm_get0_probe_request(h->args.ackm);
/*
* Pretend the ACKM asked for an anti-deadlock Handshake probe.
/* 17. 1-RTT, Probe Simulation */
static int gen_probe_1rtt(struct helper *h)
{
- OSSL_ACKM_PROBE_INFO *probe = ossl_ackm_get_probe_request(h->args.ackm);
+ OSSL_ACKM_PROBE_INFO *probe = ossl_ackm_get0_probe_request(h->args.ackm);
/*
* Pretend the ACKM asked for a 1-RTT PTO probe.