Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update protocol.md #4

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,35 @@ is mainly designed for sending files from a CPE or streaming data from the CPE,
and request response handling will need to be handled via events instead of the
simpler "Simple Request-Response" (msg_type = 3) message type.

The destination (dst) field of the Simple Event message must be in the following format:
```bnf
event:<application-name>/<stream-id>

<application-name> ::= <string>
<stream-id> ::= <string>
```
- `application-id`: A unique application identifier.
- `stream-id`: The unique stream identifier.

The wrp message headers field should contain the following control headers:

```bnf
<stream-id> ::= <string>
<stream-packet-number> ::= "0" | [1-9][0-9]*
<stream-packet-number> ::= [1-9][0-9]*
<stream-final-packet> ::= <string>
<stream-estimated-total-length> ::= [1-9][0-9]*
```

Any whitespace found is ignored as well as the case of the labels.

- `stream-packet-number`: **Required** The 0-index based packet reassembly order.
- `stream-final-packet`: **Required** Marks the final packet in the stream and
end of stream reason. Only present in the final packet.
- `stream-estimated-total-length`: **Optional** Indicates the estimated total
length if the stream is a known size. The value is informative only.

### String Grammar
The following grammar is used for above fields defined as <string>:
```bnf
<string> ::= <letter> | <digit> | <symbol> *
<letter> ::= "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" |
"K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" |
Expand All @@ -59,15 +80,6 @@ The wrp message headers field should contain the following control headers:
"\" | "]" | "_" | | "~"
```

Any whitespace found is ignored as well as the case of the labels.

- `stream-id`: **Required** The unique stream identifier.
- `stream-packet-number`: **Required** The 0-index based packet reassembly order.
- `stream-final-packet`: **Required** Marks the final packet in the stream and
end of stream reason. Only present in the final packet.
- `stream-estimated-total-length`: **Optional** Indicates the estimated total
length if the stream is a known size. The value is informative only.

## 3. Segmentation and Reassembly

Data should be segmented into smaller blocks and placed in the `payload` field
Expand Down Expand Up @@ -96,4 +108,4 @@ without modifications and thus has a few limitations.
### Lost Packets

Packet loss MAY happen. It is outside the scope of the protocol to address how
to handle this.
to handle this.