|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--SSF.OS.BGP4.Route
Information describing a single route. A route is described as a unit of information that pairs a destination with the attributes of a path to that destination. In other words, route = destination + path attributes.
| Field Summary | |
short |
as1
If using the Global.linked_aspaths AS path optimization, this is the first AS in the AS path. |
short[] |
aspath
If using the Global.flat_aspaths AS path optimization, this array of short integers will be used instead of an ASpath object in the 'pas' Attribute array. |
static java.lang.String[] |
attrib_dmlnames
The DML string names of route attributes other than path attributes. |
static java.lang.String[] |
attrib_nhidmlnames
The NHI versions of the DML string names of route attributes other than path attributes. |
static int |
MAX_TYPECODE
The maximum route attribute type code for non- path attributes. |
static int |
MIN_TYPECODE
The minimum route attribute type code for non- path attributes. |
Route |
next_rte
If using the Global.linked_aspaths AS path optimization, this is a link to the route which holds the next AS in the AS path. |
IPaddress |
nlri
The destination of the route. |
static int |
NLRI_TYPECODE
A route attribute "type code" value for NLRI. |
Attribute[] |
pas
An array of path attributes which describe the path to the destination. |
static java.lang.String |
undefined
For undefined string values. |
| Constructor Summary | |
Route()
Default initializer. |
|
Route(Route rte)
Constructs a new route based on an existing one. |
|
| Method Summary | |
Aggregator |
aggregator()
Returns the aggregator path attribute. |
void |
append_cluster(long cnum)
Appends a cluster number to the cluster list attribute. |
int |
aspath_bytecount()
Returns the number of octets (bytes) needed to represent this AS path attribute in an update message. |
boolean |
aspath_contains(java.lang.String asnh)
Determines whether or not a given AS NHI occurs in the AS path. |
int |
aspath_length()
Returns the number of ASes in the AS path attribute. |
java.lang.String |
aspath_toMinString()
Returns the AS path as a string, leaving out set/sequence information. |
java.lang.String |
aspath_toMinString(char sepchar,
boolean usenhi)
Returns the AS path as a string, leaving out set/sequence information. |
ClusterList |
cluster_list()
Returns the cluster list path attribute. |
boolean |
equal_attribs(Route r)
Returns true only if the two routes have equivalent path attributes. |
boolean |
equals(java.lang.Object rte)
Returns true only if the two routes have the same NLRI and path attributes. |
boolean |
has_aggregator()
Returns whether or not the aggregator attribute exists. |
boolean |
has_aspath()
Returns whether or not the AS path path attribute exists. |
boolean |
has_atomicagg()
Returns whether or not the atomic aggregate attribute exists. |
boolean |
has_cluster_list()
Returns whether or not the cluster list attribute exists. |
boolean |
has_localpref()
Returns whether or not the local preference path attribute exists. |
boolean |
has_med()
Returns whether or not the multiple exit discriminator path attribute exists. |
boolean |
has_nexthop()
Returns whether or not the next hop path attribute exists. |
boolean |
has_orig_id()
Returns whether or not the originator ID attribute exists. |
void |
incorporate_route(Route r)
Incorporates the given route into this one (aggregates the two). |
int |
localpref_bytecount()
Returns the number of octets (bytes) needed to represent this local preference path attribute in an update message. |
int |
localpref()
Returns the value of the local preference attribute. |
int |
med()
Returns the value of the multiple exit discriminator attribute. |
int |
nexthop_bytecount()
Returns the number of octets (bytes) needed to represent this next hop path attribute in an update message. |
IPaddress |
nexthop()
Returns the value of the next hop path attribute. |
IPaddress |
orig_id()
Returns the value of the originator ID attribute. |
int |
origin()
Returns the value of the origin path attribute. |
void |
prepend_as(java.lang.String asnh)
Prepends an AS NHI prefix address to the AS path attribute. |
void |
prepend_as(java.lang.String asnh,
Route r)
Prepends an AS NHI prefix address to the AS path attribute. |
void |
readExternal(java.io.DataInput in)
Reads the contents of this object from a serialization stream. |
void |
readExternal(java.io.ObjectInput in)
|
void |
remove_attrib(int typ)
Removes a path attribute from the route. |
void |
set_aggregator(java.lang.String nh,
IPaddress ipa)
Sets the value of the aggregator path attribute. |
void |
set_atomicagg()
Adds the atomic aggregate path attribute to the route. |
void |
set_localpref(int pref)
Sets the value of the local preference path attribute. |
void |
set_med(int v)
Sets the value of the multiple exit discriminator path attribute. |
void |
set_nexthop(IPaddress nhop)
Sets the next hop path attribute for this route. |
void |
set_nlri(IPaddress ipa)
Sets the value of the NLRI. |
void |
set_orig_id(IPaddress orig_id)
Sets the value of the originator ID path attribute. |
void |
set_origin(int t)
Sets the value of the origin path attribute. |
void |
writeExternal(java.io.DataOutput out)
Writes the contents of this object to a serialization stream. |
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String undefined
public static final java.lang.String[] attrib_dmlnames
public static final java.lang.String[] attrib_nhidmlnames
public static final int MAX_TYPECODE
public static final int MIN_TYPECODE
public static final int NLRI_TYPECODE
public IPaddress nlri
public Attribute[] pas
public short[] aspath
public short as1
public Route next_rte
| Constructor Detail |
public Route()
public Route(Route rte)
rte - The existing route on which to base the new one.| Method Detail |
public final void set_nlri(IPaddress ipa)
ipa - The value to use for the NLRI.public final int origin()
public final void set_origin(int t)
t - An origin type code.public final boolean has_aspath()
public final int aspath_length()
public final boolean aspath_contains(java.lang.String asnh)
public final int aspath_bytecount()
public int nexthop_bytecount()
public int localpref_bytecount()
public final java.lang.String aspath_toMinString()
public final java.lang.String aspath_toMinString(char sepchar,
boolean usenhi)
sepchar - The character used to separate AS numbers in the list.usenhi - Whether or not to show AS numbers as NHI address prefixes.
public final void prepend_as(java.lang.String asnh)
asnh - The AS NHI prefix address to prepend to the AS path.
public final void prepend_as(java.lang.String asnh,
Route r)
asnh - The AS NHI prefix address to prepend to the AS path.r - The Route to link the AS path to.public final boolean has_nexthop()
public final IPaddress nexthop()
public final void set_nexthop(IPaddress nhop)
public final boolean has_med()
public final int med()
public final void set_med(int v)
v - The value to use for the MED.public final boolean has_localpref()
public final int localpref()
public final void set_localpref(int pref)
pref - The value to use for the local preference attribute.public final boolean has_atomicagg()
public final void set_atomicagg()
public final boolean has_aggregator()
public final Aggregator aggregator()
public final void set_aggregator(java.lang.String nh,
IPaddress ipa)
nh - The AS NHI address prefix of the aggregating BGP speaker.ipa - The IP address of the aggregating BGP speaker.public final boolean has_orig_id()
public final IPaddress orig_id()
public final void set_orig_id(IPaddress orig_id)
public final boolean has_cluster_list()
public final ClusterList cluster_list()
public final void append_cluster(long cnum)
cnum - The cluster number to add to the cluster list.public final void remove_attrib(int typ)
typ - The type code of the path attribute to remove.public final boolean equals(java.lang.Object rte)
equals in class java.lang.Objectrte - The route to compare with this one.
public final boolean equal_attribs(Route r)
public final void incorporate_route(Route r)
r - The route to be aggregated into this one.
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void writeExternal(java.io.DataOutput out)
throws java.io.IOException
java.io.IOException - if there's an error writing the data
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
public void readExternal(java.io.DataInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException - if there's an error reading in the data
java.lang.ClassNotFoundException - if a class name is unrecognized
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||