public class BgpHeader extends Object
| Modifier and Type | Field and Description |
|---|---|
static short |
DEFAULT_HEADER_LENGTH |
protected static org.slf4j.Logger |
log |
static int |
MARKER_LENGTH |
| Constructor and Description |
|---|
BgpHeader()
Reset fields.
|
BgpHeader(byte[] marker,
short length,
byte type)
Constructors to initialize parameters.
|
| Modifier and Type | Method and Description |
|---|---|
short |
getLength()
Returns message length.
|
byte[] |
getMarker()
Returns message marker.
|
byte |
getType()
Returns message type.
|
static BgpHeader |
read(org.jboss.netty.buffer.ChannelBuffer cb)
Read from channel buffer and Returns BGP header.
|
void |
setLength(short value)
Sets message length.
|
void |
setMarker(byte[] value)
Sets marker field.
|
void |
setType(byte value)
Sets message type.
|
int |
write(org.jboss.netty.buffer.ChannelBuffer cb)
Writes Byte stream of BGP header to channel buffer.
|
protected static final org.slf4j.Logger log
public static final int MARKER_LENGTH
public static final short DEFAULT_HEADER_LENGTH
public BgpHeader()
public BgpHeader(byte[] marker,
short length,
byte type)
marker - field in BGP headerlength - message lengthtype - message typepublic void setMarker(byte[] value)
value - marker fieldpublic void setType(byte value)
value - message typepublic void setLength(short value)
value - message lengthpublic short getLength()
public byte[] getMarker()
public byte getType()
public int write(org.jboss.netty.buffer.ChannelBuffer cb)
cb - ChannelBufferpublic static BgpHeader read(org.jboss.netty.buffer.ChannelBuffer cb)
cb - ChannelBufferCopyright © 2016. All rights reserved.