|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--SSF.OS.BGP4.PeerEntry
This class encapsulates the data that a BGP speaker would keep for one of its peers. The member data are generally named and explained from the point of view of a BGPSession instance.
| Field Summary | |
java.util.HashMap |
adv_nlri
A table of NLRI recently advertised to this peer, used only when rate limiting is done on a per-peer, per-destination basis. |
java.lang.String |
as_nh
The NHI address prefix of the AS in which this peer resides. |
BGPSession |
bgp
The BGPSession to which this peer information applies. |
IPaddress |
bgp_id
The BGP ID of this peer. |
static byte |
CLIENT_FLAG
The value of the flag bit which indicates if this peer is a route reflector client. |
static byte |
CONNECTED_FLAG
The value of the flag bit which indicates whether or not a connection with this (potential) peer has been established yet. |
byte |
connection_state
The state that the local BGP speaker is in for this peer. |
EventTimer |
crt
The ConnectRetry Timer, for spacing out attempts to establish a connection with this peer. |
boolean |
down_initialized
Whether or not the down phase of a certain type of experiment has yet begun. |
static java.lang.Boolean |
FALSE
Indicates a null value which is treated as the boolean 'false'. |
static byte |
FIRSTCONNECT_FLAG
The value of the flag bit which indicates whether or not a socket connection has yet been attempted with this peer. |
byte |
flags
Flags for indicating several attributes of this peer, including whether or not is internal; whether or not it is a route reflector client; and what state its write socket is in. |
long |
hold_timer_interval
The maximum amount of time (in clock ticks) which can elapse without any BGP message being received from this peer before the connection is broken. |
EventTimer |
ht
The Hold Timer, for timing out connections with peers. |
NIC |
iface
The physical interface on the local router through which outgoing messages to this peer travel. |
Rule |
in_policy
The policy rule to be applied for filtering inbound routes. |
static byte |
INTERNAL_FLAG
The value of the flag bit which indicates if this is an internal (IBGP) peer. |
int |
inupdates
The number of updates received from this peer during the current session. |
IPaddress |
ip_addr
The IP address of the interface on the peer's router which is linked to an interface on the local router. |
EventTimer |
ka
The KeepAlive Timer, for helping to ensure this peer doesn't time out its connection with us. |
long |
keep_alive_interval
The maximum amount of time (in clock ticks) which can elapse between messages sent to this peer (or else there's a risk that the peer could break the connection). |
double |
keephold_ratio
The ratio between the configured values of the Keep Alive and Hold Timer Intervals. |
java.util.HashMap |
last_sent
Keeps track of the routes most recently sent to this peer for each destination. |
int |
latest_sent_burst_id
The ID of the latest burst of updates which were sent. |
long |
mrai
The Minimum Route Advertisement Interval. |
java.util.HashMap |
mrais
A table of Minimum Route Advertisement Interval Timers. |
EventTimer |
mraiTimer
The Minimum Route Advertisement Interval Timer used when per-peer rate-limiting only (no per-destination) is in use. |
java.lang.String |
nh
The NH part of the NHI address of this peer. |
java.lang.String |
nhi
The NHI address of this peer. |
boolean |
noticeUpdateWaiting
Whether or not a NoticeUpdate event from this peer is waiting in the WeightedInBuffer after another non-NoticeUpdate event. |
Rule |
out_policy
The policy rule to be applied for filtering outbound routes. |
int |
outupdates
The number of updates sent to this peer during the current session. |
tcpSocket |
readsocket
The socket for receiving messages from this peer. |
boolean |
reset_flag
A flag to indicate that as soon as a new write socket is established with this peer, a Notification should be sent to reset on it. |
IPaddress |
return_ip
The local IP address that this peer uses as a destination when sending packets here. |
AdjRIBIn |
rib_in
The section of Adj-RIBs-In associated with this peer. |
AdjRIBOut |
rib_out
The section of Adj-RIBs-Out associated with this peer. |
static java.lang.Boolean |
TRUE
Indicates a non-null value which is treated as the boolean 'true'. |
java.util.HashMap |
waiting_adv
A table of prefixes that are waiting to be advertised to this peer. |
java.util.HashMap |
waiting_wds
A table of prefixes which are waiting to be withdrawn from this peer. |
java.util.HashMap |
wdn_nlri
A table of NLRI recently withdrawn from this peer, used only when rate limiting is done on a per-peer, per-destination basis. |
static byte |
WRITECONNECTED_FLAG
The value of the flag bit which indicates whether or not an outgoing socket connection has been established. |
static byte |
WRITECONNECTING_FLAG
The value of the flag bit which, if set, indicates that either the outgoing socket connection has been established, or there is an attempt currently underway to establish it. |
java.util.ArrayList |
writeq
A queue of writes waiting to be performed on the write socket. |
tcpSocket |
writesocket
The socket for sending message to this peer. |
static byte |
WRITING_FLAG
The value of the flag bit which indicates whether or not the socket used for sending messages to this peer is busy. |
| Constructor Summary | |
PeerEntry(BGPSession b)
Constructs a special peer entry which represents the local BGP speaker. |
|
PeerEntry(BGPSession b,
boolean in,
boolean cli,
int ind)
Constructs a peer entry with a reference to the associated BGP protocol session as well as type information. |
|
PeerEntry(BGPSession b,
java.lang.String nhipre,
int ind)
Constructs a peer entry with a reference to the associated BGP protocol session and the NHI prefix of the peer. |
|
| Method Summary | |
java.lang.String |
addr(boolean usenhi)
Returns the address of the interface on the peer's router to which the local router has a point-to-point connection (whether virtual or not). |
void |
cancel_timers()
Cancels all timers associated with this peer. |
boolean |
client()
Returns whether or not the peer is a route reflector client. |
void |
close()
Close socket connections with this peer, but not immediately. |
void |
connect()
Attempts to establish a socket connection with this peer. |
boolean |
connected()
Returns whether or not a connection with this (potential) peer has been established yet. |
void |
doclose()
Close socket connections with this peer (both read and write). |
void |
doclose(boolean closeRead,
boolean closeWrite)
Close socket connections with this peer. |
boolean |
equals(java.lang.Object pe)
Determines whether two peer entries are equal. |
boolean |
firstconnect()
Returns whether or not a socket connection has yet been attempted with this peer. |
int |
hashCode()
Returns a hash code value which can be used if a peer entry is used as a key in a hash table. |
boolean |
internal()
Returns whether or not the peer is internal (IBGP). |
boolean |
reading(tcpSocket rsock)
Returns whether or not the socket used for receiving messages from this peer is busy. |
void |
receive()
Receives BGP messages from the socket connection with this peer. |
void |
reset()
Resets peer to initial state (when a peering session is terminated, for example). |
void |
send(Message msg)
Attempt to send a message to this peer. |
void |
set_client(boolean b)
Sets whether or not the peer is a route reflector client. |
void |
set_connected(boolean b)
Sets whether or not a connection with this (potential) peer has been established yet. |
void |
set_firstconnect(boolean b)
Sets whether or not a socket connection has yet been attempted with this peer. |
void |
set_internal(boolean b)
Sets whether or not the peer is internal (IBGP). |
void |
set_reading(tcpSocket rsock,
boolean b)
Sets whether or not the socket used for receiving messages from this peer is busy |
void |
set_writeconnected(tcpSocket wsock,
boolean b)
Sets whether or not an outgoing socket connection has been established. |
void |
set_writeconnecting(tcpSocket wsock,
boolean b)
Sets a flag which, if true, indicates that either the outgoing socket connection has been established, or there is an attempt currently underway to establish it. |
void |
set_writing(tcpSocket wsock,
boolean b)
Sets whether or not the socket used for sending messages to this peer is busy. |
void |
write_close(tcpSocket wsocket)
Close write socket connection with this peer. |
boolean |
writeconnected(tcpSocket wsock)
Returns whether or not an outgoing socket connection has been established. |
boolean |
writeconnecting(tcpSocket wsock)
If either the outgoing socket connection has been established, or there is an attempt currently underway to establish it, then true is
returned. |
boolean |
writing(tcpSocket wsock)
Returns whether or not the socket used for sending messages to this peer is busy. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final byte INTERNAL_FLAG
public static final byte CLIENT_FLAG
flags,
Constant Field Valuespublic static final byte CONNECTED_FLAG
flags,
Constant Field Valuespublic static final byte FIRSTCONNECT_FLAG
flags,
Constant Field Valuespublic static final byte WRITING_FLAG
flags,
Constant Field Valuespublic static final byte WRITECONNECTING_FLAG
flags,
Constant Field Valuespublic static final byte WRITECONNECTED_FLAG
flags,
Constant Field Valuespublic BGPSession bgp
public byte flags
INTERNAL_FLAG,
CLIENT_FLAG,
CONNECTED_FLAG,
FIRSTCONNECT_FLAG,
WRITING_FLAG,
WRITECONNECTING_FLAG,
WRITECONNECTED_FLAGpublic java.lang.String nhi
public java.lang.String nh
public IPaddress return_ip
public IPaddress ip_addr
public IPaddress bgp_id
public java.lang.String as_nh
public NIC iface
public byte connection_state
public tcpSocket readsocket
public tcpSocket writesocket
public java.util.ArrayList writeq
public long hold_timer_interval
public long keep_alive_interval
public long mrai
public double keephold_ratio
public EventTimer crt
public EventTimer ht
public EventTimer ka
public java.util.HashMap mrais
public EventTimer mraiTimer
public java.util.HashMap adv_nlri
public java.util.HashMap wdn_nlri
adv_nlri, to be used when the Minimum Route Advertisement
restriction is being applied to withdrawals. The NLRI is used as both
key and value in the table.
public java.util.HashMap waiting_adv
public java.util.HashMap waiting_wds
waiting_adv field, and is only used
when the option to apply the Minimum Route Advertisement Interval
restriction to withdrawals is in use. The prefix is used as both key and
value in the table.
public Rule out_policy
public Rule in_policy
public AdjRIBIn rib_in
public AdjRIBOut rib_out
public java.util.HashMap last_sent
public boolean noticeUpdateWaiting
public int inupdates
public int outupdates
public boolean down_initialized
public boolean reset_flag
public int latest_sent_burst_id
public static final java.lang.Boolean FALSE
public static final java.lang.Boolean TRUE
| Constructor Detail |
public PeerEntry(BGPSession b,
boolean in,
boolean cli,
int ind)
b - The BGP protocol session with which this peer entry is
associated.in - A boolean indicating if the peer is internal.cli - A boolean indicating if the peer is a route reflector client.
public PeerEntry(BGPSession b,
java.lang.String nhipre,
int ind)
b - The BGP protocol session with which this peer entry is
associated.nhipre - The NHI prefix of the peer.public PeerEntry(BGPSession b)
b - The BGP protocol session at the local router.| Method Detail |
public boolean equals(java.lang.Object pe)
equals in class java.lang.Objectpe - The peer entry with which to make the comparison.
public int hashCode()
hashCode in class java.lang.Objectpublic boolean internal()
public void set_internal(boolean b)
b - Whether or not the peer is internal.public boolean client()
public void set_client(boolean b)
b - Whether or not the peer is a route reflector client.public boolean connected()
public void set_connected(boolean b)
b - Whether or not there is a connection established with this peer.public boolean firstconnect()
public void set_firstconnect(boolean b)
b - Whether or not a socket connection has yet been attempted.public boolean reading(tcpSocket rsock)
public void set_reading(tcpSocket rsock,
boolean b)
b - Whether or not the read socket is busy.public boolean writing(tcpSocket wsock)
public void set_writing(tcpSocket wsock,
boolean b)
b - Whether or not the socket used for sending messages to this peer
is busypublic boolean writeconnecting(tcpSocket wsock)
true is
returned. The two cases can be distinguished by the corresponding
writeconnecting() method.
public void set_writeconnecting(tcpSocket wsock,
boolean b)
b - Whether or not the flag should be set.public boolean writeconnected(tcpSocket wsock)
public void set_writeconnected(tcpSocket wsock,
boolean b)
b - Whether or not an outgoing socket connection has been establishedpublic final java.lang.String addr(boolean usenhi)
usenhi - Whether or not the address should be given in NHI form.
public final void connect()
public final void receive()
public final void send(Message msg)
msg - A BGP message to be sent to the peer.public final void close()
public final void doclose()
public final void doclose(boolean closeRead,
boolean closeWrite)
closeRead - Whether or not to close the read socket.closeWrite - Whether or not to close the write socket.public final void write_close(tcpSocket wsocket)
public void reset()
public void cancel_timers()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||