All Packages Class Hierarchy This Package Previous Next Index
Class magician.Node.TableEntry
java.lang.Object
|
+----magician.Node.KUSmartPacketV2
|
+----magician.Node.TableEntry
- public class TableEntry
- extends KUSmartPacketV2
The TableEntry is a Smartpacket extension used by the RIPRouting protocol.
Each one has a
the information about one entry in the router table and is sent to neighboring nodes.
Each entry is a 4-tuple containing information about a network node known by its
virtual name, the next hop to be used for forwarding to the destination, the hop
count to the node and the update interval for the entry. If the entry is not updated
within the given interval, it is automatically removed.
- See Also:
- RIPRouting
-
first_gateway
- address of the node to forward packet to get to the destination
-
laddr
- address of the remote node represented by this entry
-
metric
- the hop distance of the destination node
-
timer
- update/timeout interval for this entry
-
TableEntry()
- class constructor
-
exec()
- checks and updates entry belonging to the active node that sent this
-
getmetric()
- get the number of hops to the destination
-
getnexthop()
- getnexthop returns the firstgateway address
-
gettimer()
-
get the value of timer (when was it last updated)
-
printDetails()
- print contents
-
setmetric(int)
- set the value of the number of hops to dest
-
setnexthop(String)
- set the first gateway address
-
settimer(int)
- set the value of the timer
laddr
String laddr
- address of the remote node represented by this entry
first_gateway
String first_gateway
- address of the node to forward packet to get to the destination
metric
int metric
- the hop distance of the destination node
timer
int timer
- update/timeout interval for this entry
TableEntry
public TableEntry()
- class constructor
exec
public void exec()
- checks and updates entry belonging to the active node that sent this
- Overrides:
- exec in class KUSmartPacketV2
getnexthop
public String getnexthop()
- getnexthop returns the firstgateway address
- Returns:
- name of active node
setnexthop
public void setnexthop(String hadr)
- set the first gateway address
- Parameters:
- hadr - name of active node
getmetric
public int getmetric()
- get the number of hops to the destination
- Returns:
- number of hops
setmetric
public void setmetric(int met)
- set the value of the number of hops to dest
- Parameters:
- met - number of hops
gettimer
public int gettimer()
- get the value of timer (when was it last updated)
- Returns:
- timer value
settimer
public void settimer(int fl)
- set the value of the timer
- Parameters:
- fl - the timer value
printDetails
public void printDetails()
- print contents
All Packages Class Hierarchy This Package Previous Next Index