added conversion to little-endian of ip-addresses in checksum
calculation