Switched ip packer to integer from long. Int is sufficient size and avoids headache of masking bits when assembling packet.