Assuming you're writing the packets yourself, make sure to match the byte ordering in the global header magic number and the length fields in the packet header.