Changed u_int* types to uint* for portability.
Fixed void pointer arithmetic portability problems.