diff options
author | Dimitri Staessens <[email protected]> | 2018-06-07 23:35:14 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2018-06-08 10:26:07 +0200 |
commit | b74980761cdcd9a706760ae9a4efb3806ca9bee2 (patch) | |
tree | 7619284e1ceb8044c9e5bf1b8fcea6729aead825 /src/lib/qoscube.c | |
parent | 7d51ff3e5a4e42f21c9e5e89e5ea8493b7737161 (diff) | |
download | ouroboros-b74980761cdcd9a706760ae9a4efb3806ca9bee2.tar.gz ouroboros-b74980761cdcd9a706760ae9a4efb3806ca9bee2.zip |
lib: Add a data qos cube
This adds a data qos cube that is reliable. Reliable qos can be
selected by setting the loss parameter of the qosspec to 0.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/lib/qoscube.c')
-rw-r--r-- | src/lib/qoscube.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/qoscube.c b/src/lib/qoscube.c index 12f7c277..5dfa35ad 100644 --- a/src/lib/qoscube.c +++ b/src/lib/qoscube.c @@ -27,7 +27,9 @@ qoscube_t qos_spec_to_cube(qosspec_t qs) { - if (qs.delay <= qos_voice.delay && + if (qs.loss == 0) + return QOS_CUBE_DATA; + else if (qs.delay <= qos_voice.delay && qs.bandwidth <= qos_voice.bandwidth && qs.availability >= qos_voice.availability && qs.maximum_interruption <= qos_voice.maximum_interruption) @@ -52,6 +54,8 @@ qosspec_t qos_cube_to_spec(qoscube_t qc) return qos_video; case QOS_CUBE_BE: return qos_best_effort; + case QOS_CUBE_DATA: + return qos_data; default: return qos_raw; } |