public class BgpOpenMsgVer4 extends Object implements BgpOpenMsg
| Modifier and Type | Class and Description |
|---|---|
static class |
BgpOpenMsgVer4.Reader
Reader class for reading BGP open message from channel buffer.
|
static class |
BgpOpenMsgVer4.Writer
Writer class for writing BGP open message to channel buffer.
|
| Modifier and Type | Field and Description |
|---|---|
static short |
AFI |
static short |
AS_TRANS |
static int |
DEFAULT_HOLD_TIME |
static BgpHeader |
DEFAULT_OPEN_HEADER |
static int |
FOUR_OCTET_AS_NUM_CAPA_TYPE |
protected static org.slf4j.Logger |
log |
static byte[] |
MARKER |
static int |
MARKER_LENGTH |
static int |
MSG_HEADER_LENGTH |
static BgpType |
MSG_TYPE |
static int |
OPEN_MSG_MINIMUM_LENGTH |
static int |
OPT_PARA_TYPE_CAPABILITY |
static byte |
PACKET_VERSION |
static BgpOpenMsgVer4.Reader |
READER |
static byte |
RES |
static byte |
SAFI |
static BgpOpenMsgVer4.Writer |
WRITER |
| Constructor and Description |
|---|
BgpOpenMsgVer4()
reset variables.
|
BgpOpenMsgVer4(BgpHeader bgpMsgHeader,
byte version,
long asNumber,
short holdTime,
int bgpId,
LinkedList<BgpValueType> capabilityTlv)
Constructor to initialize all variables of BGP Open message.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getAsNumber()
Returns AS Number of Open Message.
|
int |
getBgpId()
Returns BGP Identifier of Open Message.
|
LinkedList<BgpValueType> |
getCapabilityTlv()
Returns capabilities of Open Message.
|
BgpHeader |
getHeader()
Returns BGP Header of BGP Message.
|
short |
getHoldTime()
Returns hold time of Open Message.
|
BgpType |
getType()
Returns BGP Type of BGP Message.
|
BgpVersion |
getVersion()
Returns version of BGP Message.
|
protected int |
packCapabilityTlv(org.jboss.netty.buffer.ChannelBuffer cb,
BgpOpenMsgVer4 message)
returns length of capability tlvs.
|
protected static LinkedList<BgpValueType> |
parseCapabilityTlv(org.jboss.netty.buffer.ChannelBuffer cb)
Parsing capabilities.
|
String |
toString() |
void |
writeTo(org.jboss.netty.buffer.ChannelBuffer cb)
Writes byte streams of messages to channel buffer.
|
protected static final org.slf4j.Logger log
public static final byte PACKET_VERSION
public static final int OPEN_MSG_MINIMUM_LENGTH
public static final int MSG_HEADER_LENGTH
public static final int MARKER_LENGTH
public static final int DEFAULT_HOLD_TIME
public static final short AS_TRANS
public static final int OPT_PARA_TYPE_CAPABILITY
public static final BgpType MSG_TYPE
public static final short AFI
public static final byte SAFI
public static final byte RES
public static final int FOUR_OCTET_AS_NUM_CAPA_TYPE
public static final byte[] MARKER
public static final BgpHeader DEFAULT_OPEN_HEADER
public static final BgpOpenMsgVer4.Reader READER
public static final BgpOpenMsgVer4.Writer WRITER
public BgpOpenMsgVer4()
public BgpOpenMsgVer4(BgpHeader bgpMsgHeader, byte version, long asNumber, short holdTime, int bgpId, LinkedList<BgpValueType> capabilityTlv)
bgpMsgHeader - BGP Header in open messageversion - BGP version in open messageholdTime - hold time in open messageasNumber - AS number in open messagebgpId - BGP identifier in open messagecapabilityTlv - capabilities in open messagepublic BgpHeader getHeader()
BgpMessagegetHeader in interface BgpMessagegetHeader in interface BgpOpenMsgpublic BgpVersion getVersion()
BgpMessagegetVersion in interface BgpMessagegetVersion in interface BgpOpenMsgpublic BgpType getType()
BgpMessagegetType in interface BgpMessagegetType in interface BgpOpenMsgpublic short getHoldTime()
BgpOpenMsggetHoldTime in interface BgpOpenMsgpublic long getAsNumber()
BgpOpenMsggetAsNumber in interface BgpOpenMsgpublic int getBgpId()
BgpOpenMsggetBgpId in interface BgpOpenMsgpublic LinkedList<BgpValueType> getCapabilityTlv()
BgpOpenMsggetCapabilityTlv in interface BgpOpenMsgprotected static LinkedList<BgpValueType> parseCapabilityTlv(org.jboss.netty.buffer.ChannelBuffer cb) throws BgpParseException
cb - of type channel bufferBgpParseException - while parsing capabilitiespublic void writeTo(org.jboss.netty.buffer.ChannelBuffer cb)
WriteablewriteTo in interface BgpMessagewriteTo in interface Writeablecb - channelBufferprotected int packCapabilityTlv(org.jboss.netty.buffer.ChannelBuffer cb,
BgpOpenMsgVer4 message)
cb - of type channel buffermessage - of type BGPOpenMsgVer4