CSUM was an old thing I used in old version of tspeakfp for keeping the space for the 32 bits checksum.
In the recent versions the packets are built at runtime and the checksum is then calculated automatically through the tscrcseq function:
Code:
void tscrcseq(u_char *data, int len) {
int type;
get16(data, &type);
put32(data + 12, seq[type & 15]++);
if((type == 0xbef4) || (type == 0xbef1)) {
put32(data + 16, 0);
put32(data + 16, crc32(data, len));
} else {
put32(data + 20, 0);
put32(data + 20, crc32(data, len));
}
}
in short what this small experimental function does is just taking the type of the packet we have used and if it is 0xbef4 or 0xbef1 it will place the checksum at offset 16 of the packet otherwise offset 20.
Then put 4 zeroes at that offset and calculate the checksum on the entire packet, the resulted number will be placed where were placed the zeroes.