- java.lang.Object
-
- org.pcap4j.packet.LlcControlInformation
-
- All Implemented Interfaces:
java.io.Serializable,LlcPacket.LlcControl
public final class LlcControlInformation extends java.lang.Object implements LlcPacket.LlcControl
The Control field of an LLC header in I-format.0 1 2 3 4 5 6 7 +-----+-----+-----+-----+-----+-----+-----+-----+ | receive sequence number | P/F | +-----+-----+-----+-----+-----+-----+-----+-----+ | send sequence number | 0 | +-----+-----+-----+-----+-----+-----+-----+-----+- Since:
- pcap4j 1.6.5
- See Also:
- IEEE 802.2, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLlcControlInformation.Builder
-
Field Summary
Fields Modifier and Type Field Description private booleanpfBitprivate bytereceiveSequenceNumberprivate bytesendSequenceNumberprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description privateLlcControlInformation(short value)privateLlcControlInformation(LlcControlInformation.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)LlcControlInformation.BuildergetBuilder()booleangetPfBit()byte[]getRawData()bytegetReceiveSequenceNumber()intgetReceiveSequenceNumberAsInt()bytegetSendSequenceNumber()intgetSendSequenceNumberAsInt()inthashCode()intlength()static LlcControlInformationnewInstance(short value)java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
receiveSequenceNumber
private final byte receiveSequenceNumber
-
pfBit
private final boolean pfBit
-
sendSequenceNumber
private final byte sendSequenceNumber
-
-
Constructor Detail
-
LlcControlInformation
private LlcControlInformation(short value) throws IllegalRawDataException- Throws:
IllegalRawDataException
-
LlcControlInformation
private LlcControlInformation(LlcControlInformation.Builder builder)
-
-
Method Detail
-
newInstance
public static LlcControlInformation newInstance(short value) throws IllegalRawDataException
- Parameters:
value- value- Returns:
- a new LlcControlInformation object.
- Throws:
IllegalRawDataException- if parsing the value fails.
-
getReceiveSequenceNumber
public byte getReceiveSequenceNumber()
- Returns:
- receiveSequenceNumber
-
getReceiveSequenceNumberAsInt
public int getReceiveSequenceNumberAsInt()
- Returns:
- receiveSequenceNumber
-
getPfBit
public boolean getPfBit()
- Returns:
- true if the P/F bit is set to 1; otherwise false.
-
getSendSequenceNumber
public byte getSendSequenceNumber()
- Returns:
- sendSequenceNumber
-
getSendSequenceNumberAsInt
public int getSendSequenceNumberAsInt()
- Returns:
- sendSequenceNumber
-
length
public int length()
- Specified by:
lengthin interfaceLlcPacket.LlcControl- Returns:
- length
-
getRawData
public byte[] getRawData()
- Specified by:
getRawDatain interfaceLlcPacket.LlcControl- Returns:
- raw data
-
getBuilder
public LlcControlInformation.Builder getBuilder()
- Returns:
- a new Builder object populated with this object's fields.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-