public class BPDU extends BasePacket
| Modifier and Type | Class and Description |
|---|---|
static class |
BPDU.BPDUType |
| Modifier and Type | Field and Description |
|---|---|
private long |
destMac |
private byte |
flags |
private short |
forwardDelay |
private short |
helloTime |
private LLC |
llcHeader |
private short |
maxAge |
private short |
messageAge |
private short |
portId |
private short |
protocolId |
private byte[] |
rootBridgeId |
private int |
rootPathCost |
private byte[] |
senderBridgeId |
private byte |
type |
private byte |
version |
parent, payload| Constructor and Description |
|---|
BPDU(BPDU.BPDUType type) |
| Modifier and Type | Method and Description |
|---|---|
IPacket |
deserialize(byte[] data,
int offset,
int length)
Deserializes this packet layer and all possible payloads
|
long |
getDestMac() |
byte[] |
serialize()
Sets all payloads parent packet if applicable, then serializes this
packet and all payloads
|
clone, equals, getParent, getPayload, hashCode, resetChecksum, setParent, setPayloadprivate final long destMac
private LLC llcHeader
private short protocolId
private byte version
private byte type
private byte flags
private byte[] rootBridgeId
private int rootPathCost
private byte[] senderBridgeId
private short portId
private short messageAge
private short maxAge
private short helloTime
private short forwardDelay
public BPDU(BPDU.BPDUType type)
public byte[] serialize()
IPacketpublic IPacket deserialize(byte[] data, int offset, int length)
IPacketoffset - offset to start deserializing fromlength - length of the data to deserializepublic long getDestMac()