public abstract class BGP4TLVFormat extends Object
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Value (variable) | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Figure 4: TLV format The Length field defines the length of the value portion in octets (thus a TLV with no value portion would have a length of zero). The TLV is not padded to four-octet alignment; Unrecognized types are ignored.
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
protected byte[] |
tlv_bytes |
protected int |
TLVType |
protected int |
TLVValueLength |
protected int |
TotalTLVLength |
Constructor and Description |
---|
BGP4TLVFormat() |
BGP4TLVFormat(byte[] bytes,
int offset) |
Modifier and Type | Method and Description |
---|---|
abstract void |
encode() |
protected void |
encodeHeader() |
byte[] |
getTlv_bytes() |
static int |
getTLVLength(byte[] bytes,
int offset) |
int |
getTLVType() |
int |
getTLVValueLength() |
int |
getTotalTLVLength() |
static int |
getTotalTLVLength(byte[] bytes,
int offset) |
static int |
getType(byte[] bytes,
int offset) |
protected void |
setTlv_bytes(byte[] tlv_bytes) |
protected void |
setTLVType(int tLVType) |
protected void |
setTLVValueLength(int TLVValueLength)
Sets the lenght of the VALUE of the TLV.
|
protected int TLVType
protected int TLVValueLength
protected int TotalTLVLength
protected byte[] tlv_bytes
protected static final org.slf4j.Logger log
public BGP4TLVFormat()
public BGP4TLVFormat(byte[] bytes, int offset)
protected void encodeHeader()
public int getTLVValueLength()
public int getTotalTLVLength()
public static int getTotalTLVLength(byte[] bytes, int offset)
public static int getTLVLength(byte[] bytes, int offset)
public static int getType(byte[] bytes, int offset)
public int getTLVType()
protected void setTLVType(int tLVType)
public byte[] getTlv_bytes()
protected void setTlv_bytes(byte[] tlv_bytes)
protected void setTLVValueLength(int TLVValueLength)
TLVValueLength
- public abstract void encode()
Copyright © 2016. All rights reserved.