/** */ @Override public String valueAsString() { return String.valueOf(value() & 0xFF); }
/** * @param value value * @return a Dot11FrameType object. */ public static Dot11FrameType getInstance(Byte value) { if (registry.containsKey(value)) { return registry.get(value); } else { return new Dot11FrameType(value, "unknown"); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Dot11FrameControl other = (Dot11FrameControl) obj; if (fromDs != other.fromDs) return false; if (moreData != other.moreData) return false; if (moreFragments != other.moreFragments) return false; if (order != other.order) return false; if (powerManagement != other.powerManagement) return false; if (protectedFrame != other.protectedFrame) return false; if (protocolVersion != other.protocolVersion) return false; if (retry != other.retry) return false; if (toDs != other.toDs) return false; if (!type.equals(other.type)) return false; return true; }
Dot11FrameType type = Dot11FrameType.getInstance( (byte) (((payload[0] << 2) & 0x30) | ((payload[0] >> 4) & 0x0F)) ); switch (type.value()) { case 0: // assoc-req associationRequestFrameHandler.handle(payload, r.getHeader().getRawData(), meta); break; default: LOG.warn("Not handling frame type [{}].", type.value()); LOG.info("Type: {}, Header: {} bytes, Payload: {} bytes", type.value(), r.getHeader().getRawData().length, payload.length);
Dot11FrameType.getInstance((byte) (((firstByte << 2) & 0x30) | ((firstByte >> 4) & 0x0F))); byte secondByte = rawData[offset + 1]; this.toDs = (secondByte & 0x01) != 0;
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (fromDs ? 1231 : 1237); result = prime * result + (moreData ? 1231 : 1237); result = prime * result + (moreFragments ? 1231 : 1237); result = prime * result + (order ? 1231 : 1237); result = prime * result + (powerManagement ? 1231 : 1237); result = prime * result + (protectedFrame ? 1231 : 1237); result = prime * result + ((protocolVersion == null) ? 0 : protocolVersion.hashCode()); result = prime * result + (retry ? 1231 : 1237); result = prime * result + (toDs ? 1231 : 1237); result = prime * result + ((type == null) ? 0 : type.hashCode()); return result; }
Dot11FrameType.getInstance((byte) (((firstByte << 2) & 0x30) | ((firstByte >> 4) & 0x0F))); byte secondByte = rawData[offset + 1]; this.toDs = (secondByte & 0x01) != 0;
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (fromDs ? 1231 : 1237); result = prime * result + (moreData ? 1231 : 1237); result = prime * result + (moreFragments ? 1231 : 1237); result = prime * result + (order ? 1231 : 1237); result = prime * result + (powerManagement ? 1231 : 1237); result = prime * result + (protectedFrame ? 1231 : 1237); result = prime * result + ((protocolVersion == null) ? 0 : protocolVersion.hashCode()); result = prime * result + (retry ? 1231 : 1237); result = prime * result + (toDs ? 1231 : 1237); result = prime * result + ((type == null) ? 0 : type.hashCode()); return result; }
/** * @param number number * @return a Dot11FrameType object. */ public static Dot11FrameType register(Dot11FrameType number) { return registry.put(number.value(), number); }
/** * @param value value * @return a Dot11FrameType object. */ public static Dot11FrameType getInstance(Byte value) { if (registry.containsKey(value)) { return registry.get(value); } else { return new Dot11FrameType(value, "unknown"); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Dot11FrameControl other = (Dot11FrameControl) obj; if (fromDs != other.fromDs) return false; if (moreData != other.moreData) return false; if (moreFragments != other.moreFragments) return false; if (order != other.order) return false; if (powerManagement != other.powerManagement) return false; if (protectedFrame != other.protectedFrame) return false; if (protocolVersion != other.protocolVersion) return false; if (retry != other.retry) return false; if (toDs != other.toDs) return false; if (!type.equals(other.type)) return false; return true; }
/** * @param number number * @return a Dot11FrameType object. */ public static Dot11FrameType register(Dot11FrameType number) { return registry.put(number.value(), number); }
/** */ @Override public String valueAsString() { return String.valueOf(value() & 0xFF); }