/** * @param builder builder * @param header header */ protected Dot11ManagementPacket(Builder builder, Dot11ManagementHeader header) { if (builder.correctChecksumAtBuild) { this.fcs = ByteArrays.calcCrc32Checksum(header.getRawData()); } else { this.fcs = builder.fcs; } }
/** @return true if this FCS is present and valid; false otherwise. */ public boolean hasValidFcs() { if (fcs == null) { return false; } return ByteArrays.calcCrc32Checksum(getHeader().getRawData()) == fcs.intValue(); }
/** * @param builder builder * @param header header */ protected Dot11ManagementPacket(Builder builder, Dot11ManagementHeader header) { if (builder.correctChecksumAtBuild) { this.fcs = ByteArrays.calcCrc32Checksum(header.getRawData()); } else { this.fcs = builder.fcs; } }
/** @return true if this FCS is present and valid; false otherwise. */ public boolean hasValidFcs() { if (fcs == null) { return false; } return ByteArrays.calcCrc32Checksum(getHeader().getRawData()) == fcs.intValue(); }