public class BgpPathAttributes
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
EXTENDED_COMMUNITY_TYPE |
static int |
LINK_STATE_ATTRIBUTE_TYPE |
static int |
MPREACHNLRI_TYPE |
static int |
MPUNREACHNLRI_TYPE |
| Constructor and Description |
|---|
BgpPathAttributes()
Initialize parameter.
|
BgpPathAttributes(java.util.List<BgpValueType> pathAttribute)
Constructor to initialize parameters for BGP path attributes.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
checkMandatoryAttr(boolean isOrigin,
boolean isAsPath,
boolean isNextHop,
boolean isMpReach,
boolean isMpUnReach)
Checks mandatory attributes are presents, if not present throws exception.
|
java.util.List<BgpValueType> |
pathAttributes()
Returns list of path attributes.
|
static BgpPathAttributes |
read(org.jboss.netty.buffer.ChannelBuffer cb)
Reads from channelBuffer and parses BGP path attributes.
|
java.lang.String |
toString() |
int |
write(org.jboss.netty.buffer.ChannelBuffer cb)
Write path attributes to channelBuffer.
|
public static final int LINK_STATE_ATTRIBUTE_TYPE
public static final int MPREACHNLRI_TYPE
public static final int MPUNREACHNLRI_TYPE
public static final int EXTENDED_COMMUNITY_TYPE
public BgpPathAttributes()
public BgpPathAttributes(java.util.List<BgpValueType> pathAttribute)
pathAttribute - list of path attributespublic java.util.List<BgpValueType> pathAttributes()
public static BgpPathAttributes read(org.jboss.netty.buffer.ChannelBuffer cb) throws BgpParseException
cb - channelBufferBgpParseException - while parsing BGP path attributespublic int write(org.jboss.netty.buffer.ChannelBuffer cb)
throws BgpParseException
cb - channelBufferBgpParseException - while parsing BGP path attributespublic static void checkMandatoryAttr(boolean isOrigin,
boolean isAsPath,
boolean isNextHop,
boolean isMpReach,
boolean isMpUnReach)
throws BgpParseException
isOrigin - say whether origin attribute is presentisAsPath - say whether aspath attribute is presentisNextHop - say whether nexthop attribute is presentisMpReach - say whether mpreach attribute is presentisMpUnReach - say whether mpunreach attribute is presentBgpParseException - if mandatory path attribute is not presentpublic java.lang.String toString()
toString in class java.lang.Object