public class BgpRouteEntry extends RouteEntry
| Modifier and Type | Class and Description |
|---|---|
static class |
BgpRouteEntry.AsPath
A class to represent AS Path.
|
static class |
BgpRouteEntry.PathSegment
A class to represent AS Path Segment.
|
| Constructor and Description |
|---|
BgpRouteEntry(BgpSession bgpSession,
org.onlab.packet.IpPrefix prefix,
org.onlab.packet.IpAddress nextHop,
byte origin,
BgpRouteEntry.AsPath asPath,
long localPref)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Compares whether two objects are equal.
|
BgpRouteEntry.AsPath |
getAsPath()
Gets the route AS path.
|
BgpSession |
getBgpSession()
Gets the BGP Session the route was received on.
|
long |
getLocalPref()
Gets the route local preference.
|
long |
getMultiExitDisc()
Gets the route MED (Multi-Exit Discriminator).
|
byte |
getOrigin()
Gets the route origin: 0=IGP, 1=EGP, 2=INCOMPLETE.
|
int |
hashCode()
Computes the hash code.
|
String |
toString() |
createBinaryString, isIp4, isIp6, nextHop, prefix, versionpublic BgpRouteEntry(BgpSession bgpSession, org.onlab.packet.IpPrefix prefix, org.onlab.packet.IpAddress nextHop, byte origin, BgpRouteEntry.AsPath asPath, long localPref)
bgpSession - the BGP Session the route was received onprefix - the prefix of the routenextHop - the next hop of the routeorigin - the route origin: 0=IGP, 1=EGP, 2=INCOMPLETEasPath - the AS pathlocalPref - the route local preferencepublic BgpSession getBgpSession()
public byte getOrigin()
public BgpRouteEntry.AsPath getAsPath()
public long getLocalPref()
public long getMultiExitDisc()
public boolean equals(Object other)
NOTE: The bgpSession field is excluded from the comparison.
equals in class RouteEntrypublic int hashCode()
NOTE: We return the base class hash code to avoid expensive computation
hashCode in class RouteEntrypublic String toString()
toString in class RouteEntry