Changeset 94 for trunk/src/renetcol.c

Show
Ignore:
Timestamp:
02/06/09 16:58:57 (14 years ago)
Author:
andreu
Message:

IPv6 aggregation : prefix reading

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/renetcol.c

    r88 r94  
    44 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 2006 2007 GIP RENATER  
     6 * Copyright (C) 2005 - 2009 GIP RENATER  
    77 */ 
    88 
     
    106106  fprintf(stderr, "renetcol compilation and execution with IPv4 Aggregation feature enable based on SNMP ID in %s file.\n", INTERFACES_TYPE_LIST); 
    107107#endif 
     108#if defined(IPV6AGGIDSNMP) 
     109  fprintf(stderr, "renetcol compilation and execution with IPv6 Aggregation feature enable based on SNMP ID in %s file.\n", INTERFACES_TYPE_LIST); 
     110#endif 
    108111   
    109112  openlog(argv[0], LOG_PID, LOG_USER); 
     
    158161    exit(1); 
    159162  } 
     163#if defined(IPV6AGGIDSNMP) 
     164  if ( (shmForAgg->v6PrefixNb =  
     165        getPrefixV6(SUBNETS_V6_LIST,  
     166                    &(shmForAgg->prefixV6Tab[0][0]) 
     167                    )) < 1){ 
     168    fprintf(stderr, "renetcol: Error in %s\n", SUBNETS_V6_LIST); 
     169  } else { 
     170    fprintf(stderr, "We have found %hu IPv6 prefixes from %s\n",  
     171            shmForAgg->v6PrefixNb, 
     172            SUBNETS_V6_LIST); 
     173  } 
     174  if ( (shmForAgg->v6PrefixNb =  
     175        getPrefixV6(SUBNETS_V6_LIST,  
     176                    &(shmForAgg->prefixV6Tab[1][0]) 
     177                    )) < 1){ 
     178    fprintf(stderr, "renetcol: Error in %s\n", SUBNETS_V6_LIST); 
     179    exit(1); 
     180  } 
     181#endif 
     182 
    160183/*   for (i=0; i<shmForAgg->v4PrefixNb; i++){ */ 
    161184/*    fprintf(stderr, "SUPERNET : %lu, %hu\n",shmForAgg->prefixV4Tab[0][i].beginning, shmForAgg->prefixV4Tab[0][i].hasSubnet); */