Skip to content

Commit

Permalink
use variant instead of struct variant
Browse files Browse the repository at this point in the history
Per Watson Ladd's suggestion at IETF 120 PPM session.
  • Loading branch information
tgeoghegan committed Jul 26, 2024
1 parent 28fac09 commit 294c978
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions draft-ietf-ppm-dap.md
Original file line number Diff line number Diff line change
Expand Up @@ -666,10 +666,10 @@ struct {
~~~

Then we describe the specific variant of `ExampleStruct` where `type == number`
with a `struct variant` block like so:
with a `variant` block like so:

~~~
struct variant {
variant {
/* Field exists regardless of variant */
uint32 always_present;
ExampleEnum type = number;
Expand Down Expand Up @@ -701,7 +701,7 @@ struct {
The protocol text might include a description like:

~~~
struct variant {
variant {
FailureReason failure_reason = something;
opaque another_field<0..256>;
} FailedOperation;
Expand Down Expand Up @@ -1564,7 +1564,7 @@ For any report that was rejected, the Helper sets the outbound preparation
response to

~~~
struct variant {
variant {
ReportID report_id;
PrepareRespState prepare_resp_state = reject;
PrepareError prepare_error;
Expand Down Expand Up @@ -1597,7 +1597,7 @@ initial `outbound` message to send in response to the Leader. If `state` is of
type `Rejected`, then the Helper responds with

~~~
struct variant {
variant {
ReportID report_id;
PrepareRespState prepare_resp_state = reject;
PrepareError prepare_error = vdaf_prep_error;
Expand All @@ -1607,7 +1607,7 @@ struct variant {
Otherwise the Helper responds with

~~~
struct variant {
variant {
ReportID report_id;
PrepareRespState prepare_resp_state = continue;
opaque payload<0..2^32-1> = outbound;
Expand Down Expand Up @@ -1883,7 +1883,7 @@ denote the payload of the prep step. The Helper computes the following:
If `state == Rejected()`, then the Helper's response is

~~~
struct variant {
variant {
ReportID report_id;
PrepareRespState prepare_resp_state = reject;
PrepareError prepare_error = vdaf_prep_error;
Expand All @@ -1893,7 +1893,7 @@ struct variant {
Otherwise, if `outbound != None`, then the Helper's response is

~~~
struct variant {
variant {
ReportID report_id;
PrepareRespState prepare_resp_state = continue;
opaque payload<0..2^32-1> = outbound;
Expand All @@ -1903,7 +1903,7 @@ struct variant {
Otherwise, if `outbound == None`, then the Helper's response is

~~~
struct variant {
variant {
ReportID report_id;
PrepareRespState prepare_resp_state = finished;
} PrepareResp;
Expand Down

0 comments on commit 294c978

Please sign in to comment.