jist.swans.route
Interface RouteInterface.Zrp.Iarp

All Superinterfaces:
Protocol
All Known Implementing Classes:
RouteZrpIarp, RouteZrpZdp
Enclosing interface:
RouteInterface.Zrp

public static interface RouteInterface.Zrp.Iarp
extends Protocol

IntrAzone Routing (sub)Protocol interface.

Since:
SWANS1.0
Version:
$Id: RouteInterface.java,v 1.48 2004/04/06 16:07:50 barr Exp $
Author:
Rimon Barr <barr+jist@cs.cornell.edu>

Method Summary
 java.util.Set computeCoverage(NetAddress src, int depth)
          Find the set of nodes within a given distance of source.
 java.util.Enumeration getLinks(NetAddress src)
          Return iterator of links from given source address.
 int getNumLinks()
          Return number of intra-zone links.
 int getNumRoutes()
          Return number of intra-zone routes.
 java.util.Collection getPeripheral()
          Return all peripheral nodes.
 NetAddress[] getRoute(NetAddress dst)
          Return intra-zone route.
 boolean hasRoute(NetAddress dst)
          Return whether node is within zone (if IARP has route to it).
 void linkinfo(Link link, boolean drop)
          Notify IARP of link state change.
 void receive(RouteInterface.Zrp.MessageIarp msg, NetAddress from)
          Process incoming IARP packet.
 void showLinks()
          Display all intra-zone links known at node.
 void showRoutes()
          Display all intra-zone routes known at node.
 
Methods inherited from interface jist.swans.misc.Protocol
start
 

Method Detail

receive

void receive(RouteInterface.Zrp.MessageIarp msg,
             NetAddress from)
Process incoming IARP packet.

Parameters:
msg - iarp packet
from - source of iarp packet

linkinfo

void linkinfo(Link link,
              boolean drop)
Notify IARP of link state change.

Parameters:
link - link that has changed
drop - whether link has failed (or been created)

getNumLinks

int getNumLinks()
Return number of intra-zone links.

Returns:
number of intra-zone links

getLinks

java.util.Enumeration getLinks(NetAddress src)
Return iterator of links from given source address.

Parameters:
src - link source address
Returns:
iterator of known link destination addresses

hasRoute

boolean hasRoute(NetAddress dst)
Return whether node is within zone (if IARP has route to it).

Parameters:
dst - destination node
Returns:
whether node is within zone

getRoute

NetAddress[] getRoute(NetAddress dst)
Return intra-zone route.

Parameters:
dst - destination node
Returns:
route to node, or NullPointerException if dst not in zone

getNumRoutes

int getNumRoutes()
Return number of intra-zone routes.

Returns:
number of intra-zone routes

getPeripheral

java.util.Collection getPeripheral()
Return all peripheral nodes.

Returns:
set of peripheral nodes

computeCoverage

java.util.Set computeCoverage(NetAddress src,
                              int depth)
Find the set of nodes within a given distance of source.

Parameters:
src - source node
depth - radius
Returns:
set of node addresses within distance of source

showLinks

void showLinks()
Display all intra-zone links known at node.


showRoutes

void showRoutes()
Display all intra-zone routes known at node.