[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LanRouter & routing table



Tarik,

Whether you're using LANs or not, static routes are computed by
RouteLogic at the startup.  (Simulator::run -> RouteLogic::configure
-> Agent/rtProto/Static::init-all -> Simulator::compute-routes ->
 Simulator::compute-flat-routes -> RouteLogic::compute ->
 RouteLogic::compute_routes().  The last one being a C++ function in
route.cc.

LanRouter doesn't compute routes itself - it's a helper object which
by default goes off and asks RouteLogic for the next hop given the
destination.  You could change this behavior by deriving your own
LanRouter object from it.

  -Yuri

Tarik Alj <[email protected]> writes:

> I can't figure out how or when the routes are actually computed when using 
> vlan.tcl. I know there is a LanRouter object, but from LanRouter.cc all it does 
> is call lookup_flat (hier)(lanaddr_, adst, next_hopIP) from RouteLogic. That 
> implies the routing table is already computed. 
> 
> I would like to know how and where in the code that table is filled for the 
> LanRouter object. 
> 
> 
> Thanks. 
> 
> 
> Tarik