private UInt16 ComputeChecksum(byte[] packet, int length) { UInt16 sum = 0; int i; for (i = 0; i < length; i++) { sum += packet[i]; } return sum; }