tts@ttank.ttank.com (Karl Bunch) (02/06/91)
I am trying to analyze a stream of data between two hosts (via modem). I would like to figure out a clean way to calculate the check sum that seems to be in use so I can simulate the local host's software (using C code). Each packet (out going to remote host) looks like this: 0000 02 02 29 2b 28 2f 32 20 20 20 20 20 20 20 20 20 ..)+(/2 0010 03 03 0d Basicly: STX, STX, 4 byte header, Data, ETX, ETX, CR The header seems just to be a check sum, however I can't seem to figure out how to calculate it. Here are some examples: 2924272f "1 ", 292b282f "2 ", 252e2d2e "3 ", 2824262f "4 ", 2421232e "5 ", 242e2c2e "6 ", 282b292f "7 ", 2b2b2a2f "8 ", 272e2f2e "9 ", 2c2b2d2f "# ", 2e242022 "*01 ", 20202020 "" From the local to the remote host the sum seems to have 0x20 or'd into each byte. In the opposite direction the remote host seems to drop the 0x20 out of it's sums. (Maybe to avoid echo confusion??) (Most of these packets are very large, but if you want to help I can mail you some samples). Anyway, any ideas would be appreciated. Thanks in advance, Karl -- % ---------------------------------------------------------------------------- % Karl Bunch ||| UUCP: ..!uunet!zardoz!ttank!karl % Think Tank Software ||| INTERNET: karl@ttank.com % "...you'd be suprised how far a hug will go with Geordi, even Worf!" -- Riker