jist.swans.route
Class RouteZrpBrpFlood

java.lang.Object
  extended by jist.swans.route.RouteZrpBrpFlood
All Implemented Interfaces:
Protocol, Timer, RouteInterface.Zrp.Brp

public class RouteZrpBrpFlood
extends java.lang.Object
implements RouteInterface.Zrp.Brp, Timer

Zone Routing Protocol: Bordercast Resolution (sub)Protocol: Naive flooding.

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

Nested Class Summary
private static class RouteZrpBrpFlood.MessageBrpFlood
          Query flooding packet.
 
Field Summary
static long COVERAGE_LIFETIME
          query coverage expiration.
static long COVERAGE_REFRESH
          query coverage refresh timer (check for expiration).
static long JITTER
          brp delivery jitter.
static org.apache.log4j.Logger logBRPFlood
          logger for BRP events.
private  java.util.HashMap queryCoverage
          bordercast supression table: QueryKey - QueryCoverageEntry.
private  RouteZrp zrp
          reference to zrp routing framework.
 
Constructor Summary
RouteZrpBrpFlood(RouteZrp zrp)
          Create new "default" BRP (ZRP sub-protocol) handler.
RouteZrpBrpFlood(RouteZrp zrp, java.lang.String config)
          Create new "default" BRP (ZRP sub-protocol) handler.
 
Method Summary
private  RouteZrpBrp.QueryCoverageEntry getQueryCoverageEntry(NetAddress src, short seq)
          Return query coverage entry for given source and identifier.
 void receive(RouteInterface.Zrp.MessageBrp msg, NetAddress from)
          Process incoming BRP packet.
 void send(RouteInterface.Zrp.MessageIerp msg)
          Bordercast a query.
 void start()
          Start running protocol.
 void timeout()
          Timer expiration processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logBRPFlood

public static final org.apache.log4j.Logger logBRPFlood
logger for BRP events.


COVERAGE_LIFETIME

public static final long COVERAGE_LIFETIME
query coverage expiration.

See Also:
Constant Field Values

COVERAGE_REFRESH

public static final long COVERAGE_REFRESH
query coverage refresh timer (check for expiration).

See Also:
Constant Field Values

JITTER

public static final long JITTER
brp delivery jitter.

See Also:
Constant Field Values

zrp

private RouteZrp zrp
reference to zrp routing framework.


queryCoverage

private java.util.HashMap queryCoverage
bordercast supression table: QueryKey - QueryCoverageEntry.

Constructor Detail

RouteZrpBrpFlood

public RouteZrpBrpFlood(RouteZrp zrp)
Create new "default" BRP (ZRP sub-protocol) handler.

Parameters:
zrp - object reference to zrp routing framework

RouteZrpBrpFlood

public RouteZrpBrpFlood(RouteZrp zrp,
                        java.lang.String config)
Create new "default" BRP (ZRP sub-protocol) handler.

Parameters:
zrp - object reference to zrp routing framework
config - configuration string
Method Detail

getQueryCoverageEntry

private RouteZrpBrp.QueryCoverageEntry getQueryCoverageEntry(NetAddress src,
                                                             short seq)
Return query coverage entry for given source and identifier. Create a new query coverage entry if one does not exist.

Parameters:
src - query source address
seq - query source identifier
Returns:
query coverage

start

public void start()
Start running protocol.

Specified by:
start in interface Protocol

receive

public void receive(RouteInterface.Zrp.MessageBrp msg,
                    NetAddress from)
Process incoming BRP packet.

Specified by:
receive in interface RouteInterface.Zrp.Brp
Parameters:
msg - brp packet
from - source of incoming brp packet

send

public void send(RouteInterface.Zrp.MessageIerp msg)
Bordercast a query.

Specified by:
send in interface RouteInterface.Zrp.Brp
Parameters:
msg - query to bordercast

timeout

public void timeout()
Timer expiration processing.

Specified by:
timeout in interface Timer