@Override
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof DHCPPacket)) {
            return false;
        }

        DHCPPacket p = (DHCPPacket) o;
        boolean    b;

        b  = (this.comment.equals(p.comment));
        b &= (this.op    == p.op);
        b &= (this.htype == p.htype);
        b &= (this.hlen  == p.hlen);
        b &= (this.hops  == p.hops);
        b &= (this.xid   == p.xid);
        b &= (this.secs  == p.secs);
        b &= (this.flags == p.flags);
        b &= (Arrays.equals(this.ciaddr, p.ciaddr));
        b &= (Arrays.equals(this.yiaddr, p.yiaddr));
        b &= (Arrays.equals(this.siaddr, p.siaddr));
        b &= (Arrays.equals(this.giaddr, p.giaddr));
        b &= (Arrays.equals(this.chaddr, p.chaddr));
        b &= (Arrays.equals(this.sname,  p.sname));
        b &= (Arrays.equals(this.file,   p.file));
        b &= (this.options.equals(p.options));
        b &= (this.isDhcp == p.isDhcp);
        // we deliberately ignore "truncated" since it is reset when cloning
        b &= (Arrays.equals(this.padding, p.padding));
        b &= (equalsStatic (this.address, p.address));
        b &= (this.port == p.port);

        return b;
    }