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

Variable Index

 o first_gateway
address of the node to forward packet to get to the destination
 o laddr
address of the remote node represented by this entry
 o metric
the hop distance of the destination node
 o timer
update/timeout interval for this entry

Constructor Index

 o TableEntry()
class constructor

Method Index

 o exec()
checks and updates entry belonging to the active node that sent this
 o getmetric()
get the number of hops to the destination
 o getnexthop()
getnexthop returns the firstgateway address
 o gettimer()
get the value of timer (when was it last updated)
 o printDetails()
print contents
 o setmetric(int)
set the value of the number of hops to dest
 o setnexthop(String)
set the first gateway address
 o settimer(int)
set the value of the timer

Variables

 o laddr
 String laddr
address of the remote node represented by this entry

 o first_gateway
 String first_gateway
address of the node to forward packet to get to the destination

 o metric
 int metric
the hop distance of the destination node

 o timer
 int timer
update/timeout interval for this entry

Constructors

 o TableEntry
 public TableEntry()
class constructor

Methods

 o exec
 public void exec()
checks and updates entry belonging to the active node that sent this

Overrides:
exec in class KUSmartPacketV2
 o getnexthop
 public String getnexthop()
getnexthop returns the firstgateway address

Returns:
name of active node
 o setnexthop
 public void setnexthop(String hadr)
set the first gateway address

Parameters:
hadr - name of active node
 o getmetric
 public int getmetric()
get the number of hops to the destination

Returns:
number of hops
 o setmetric
 public void setmetric(int met)
set the value of the number of hops to dest

Parameters:
met - number of hops
 o gettimer
 public int gettimer()
get the value of timer (when was it last updated)

Returns:
timer value
 o settimer
 public void settimer(int fl)
set the value of the timer

Parameters:
fl - the timer value
 o printDetails
 public void printDetails()
print contents


All Packages  Class Hierarchy  This Package  Previous  Next  Index
1