-
Notifications
You must be signed in to change notification settings - Fork 6
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
Added a transformer that injects byte sequences #279
Conversation
Review status: 0 of 1 files reviewed at latest revision, 9 unresolved discussions, all commit checks successful. src/fancy-transformers/byteSequenceShaper.ts, line 9 [r1] (raw file): src/fancy-transformers/byteSequenceShaper.ts, line 60 [r1] (raw file): src/fancy-transformers/byteSequenceShaper.ts, line 67 [r1] (raw file): public setKey = (key:ArrayBuffer) : void => {
throw new Error('setKey unimplemented');
} src/fancy-transformers/byteSequenceShaper.ts, line 76 [r1] (raw file): src/fancy-transformers/byteSequenceShaper.ts, line 87 [r1] (raw file): src/fancy-transformers/byteSequenceShaper.ts, line 92 [r1] (raw file): src/fancy-transformers/byteSequenceShaper.ts, line 100 [r1] (raw file): src/fancy-transformers/byteSequenceShaper.ts, line 113 [r1] (raw file): src/fancy-transformers/byteSequenceShaper.ts, line 145 [r1] (raw file): Comments from the review on Reviewable.io |
…usly) not a SequenceConfig
…tion outputAndIncrement_
Just a couple of things, then 👍. Review status: 0 of 1 files reviewed at latest revision, 3 unresolved discussions, all commit checks successful. src/fancy-transformers/byteSequenceShaper.ts, line 37 [r2] (raw file): src/fancy-transformers/byteSequenceShaper.ts, line 152 [r2] (raw file): src/fancy-transformers/byteSequenceShaper.ts, line 165 [r2] (raw file): return {
index: model.index,
offset: model.offset,
// ...
}; Comments from the review on Reviewable.io |
Review status: 0 of 1 files reviewed at latest revision, 3 unresolved discussions, all commit checks successful. src/fancy-transformers/byteSequenceShaper.ts, line 31 [r2] (raw file): src/fancy-transformers/byteSequenceShaper.ts, line 150 [r2] (raw file): src/fancy-transformers/byteSequenceShaper.ts, line 163 [r2] (raw file): Comments from the review on Reviewable.io |
Still 👍 . Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from the review on Reviewable.io |
Added a transformer that injects byte sequences
This transformer has a list of byte sequences to add and another list to remove.
Each sequence also has an index into the packet stream, an offset into the packet, and a target packet length.
So for instance, packet #4 could have a byte sequence injected at the 17th byte of a packet of length 118.
An injectable packet is constructed by placing the byte sequence at the specified offset in the packet and then filling in the rest with random bytes in order to generate a packet of the target length.
As the index of the packet is also specified, injected packets will always be sent in a specified order, interleaves with real data packets.
On the receiving end, packets may have been reordered. Therefore, the receiver determines which packets to remove by matching byte sequences to offsets and ignoring the index. Since there are no constraints on the injected byte sequences, false positives are possible. For instance, a packet could be injected where the first byte is 0. This is a common value for the first byte, so based on sequence matching a non-injected packet may be dropped. In this case, SCTP retransmission should be sufficient to recover. False positives are unlikely to occur in practice using real settings for the byte sequences to inject.