MarketSquare / MarketSquare/Rammbock

Protocol definition with conditional segments

Open
#23 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
64
Forks
48
PR merge metrics
No merged PRs in 30d

Description

New Feature request - adding conditional segments to protocol template.
With such functionality there will be possibility to test protocols with dynamic structure (multiple segment types with variable length and fields).

Implementation may be as follows:

```
New Protocol ConditionalProtocol
u8 control
u16 session 0x0102
u8 extensions 0x00
Conditional Segment control == (0|1|2|3) data_segment
u8 data 0x00
u8 lenght
pdu lenght
End Conditional Segment
Conditional Segment control == (4|5|6|7) report_segment
u8 report
End Conditional Segment
End Protocol

(...)
New Message Data ConditionalProtocol header:control:0x03

(...)
Server Receives Message header:control:0x05
```

Example protocol (http://tools.ietf.org/html/rfc5326) with varied segments decoded by Wireshark. Please notice that length of pdu is located outside of static header.
1. Data

```
Licklider Transmission Protocol
LTP Header
LTP Version: 0
LTP Type: 3 (Red data, Checkpoint, EORP, EOB)
Session ID
Session originator: 1
Session number: 3
Header Extension Count: 0
Trailer Extension Count: 0
Data Segment
Client service ID: 1
Offset: 0
Length: 60
Checkpoint serial number: 202
Report serial number: 0
Data[1]
```
1. Report

```
Licklider Transmission Protocol
LTP Header
LTP Version: 0
LTP Type: 8 (Report segment)
Session ID
Session originator: 1
Session number: 3
Header Extension Count: 0
Trailer Extension Count: 0
Report Segment
Report serial number: 10656
Checkpoint serial number: 202
Upper bound: 60
Lower bound: 0
Reception claim count: 1
Reception claims
Offset[0] : 0
Length[0] : 60
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the protocol-template parsing and message encoding/decoding entry points, then compare them with the conditional-segment examples in this issue. Done means conditional segments can be selected by a control field and variable-length data can be decoded and tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.