Some amendment:
delete datalen_accu and datelen_temp from ipPacket structure.