Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

TCP Retransmissions

Name: Anonymous 2009-01-04 23:05

Ordinarily, you're a terrible place to get code, /prog/, but I must yield.

I'm having trouble with AES encryption increasing on packet retransmissions, so I obviously must detect and discard retransmissions for encryption purposes. Since I'm using WinPcap, I figured that Ethereal would be a good place to go to see how it detects these events. I was wrong.

Example: http://pastebin.com/d165a8f15 [1]

I can't tell what the shit is going on with such ugly C code. Any of you have an enterprise-level solution to retransmission detection? Thanks for your time.

1: As accessed on 4 JAN 09 at 10 PM CST. It will evaporate within 24 hours.

Name: Anonymous 2009-01-07 4:21

>>66
I tried creating a class that contains 20 sequence numbers (arbitrary number that I figured was "good enough") and each time I receive a packet, I assign the sequence number to this array.

When I receive the 20th packet, it resets the index so it should be a rolling window.

However, when I check for matches of the current sequence number, it would seem that either it fails or somehow the code skips that if.

I've had it check to see if there's a match for the direction of the packet and I've had a single unit for sequence testing. Neither works. It's supposed to be: If a sequence number matches, then nothing happens until it gets the next packet.

What does happen is the encryption breaks nearly immediately. So either sequence numbers are matching when they aren't supposed to or they aren't matching when they are.

Logically, it's structured in the way that <capture device> <-> <session encryption/decryption/distribution> <-> <data interfacing>.

This means that it doesn't account for packets that don't get fed into the session. Ideas?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List