Show
Ignore:
Timestamp:
04/23/07 11:37:38 (16 years ago)
Author:
andreu
Message:

now, only subnets rrd files from routers who are seeing will be created - new scripts in tool

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/routers_mgmt.c

    r30 r31  
    5252 
    5353RouterPtr addRouter(RouterPtr routersList, unsigned long address,  
    54                 unsigned long spled)  
     54                unsigned long spled, struct PrefixV4 *V4PTab,  
     55                 size_t nbPV4, struct MyPtrs *myPtrs)  
    5556{ 
     57  int i = 0; 
    5658  RouterPtr tmp = (RouterPtr) malloc(sizeof(struct Router)); 
    5759  if (tmp==NULL) { 
     
    6769    if (routersList!=NULL) { routersList->prev = tmp;} 
    6870    tmp->prev = NULL; 
     71    /* initialization of the subnets which depend on this routers, aim: to create the rrd files */ 
     72    for (i=0; i<nbPV4; i++) { 
     73      if ( tmp->IpAddress == myPtrs->routersID[V4PTab[i].routerNb]) { 
     74        V4PTab[i].sampling = 1; 
     75        myPtrs->secondV4Tab[i].sampling = 1;  
     76      } 
     77    } 
    6978    return tmp; 
    7079  }