Changeset 28 for trunk/src

Show
Ignore:
Timestamp:
04/11/07 14:55:42 (15 years ago)
Author:
andreu
Message:

debug mode in compilation option - Wno-long-long - copyright update

Location:
trunk/src
Files:
33 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/V9Header_mgmt.c

    r8 r28  
    22 * File: V9Header_mgmt.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/V9Header_mgmt.h

    r2 r28  
    22 * File: V9Header_mgmt.h 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/dataFlowSet.c

    r27 r28  
    44 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
     
    812812    (*myPtrs->offsetV9Ptr)+=(data_length-4); 
    813813    (*myPtrs->currentFlowsetNumberPtr) = myPtrs->currentHeaderV9Ptr->count; 
    814     fprintf(stderr, "\n unknown template \n"); 
     814#ifdef DEBUG 
     815    fprintf(stderr, " U, r: %lu.%lu.%lu.%lu, sourceId: %lu, TID: %hu", 
     816            (myPtrs->pcktPtr->ipH->srcAdd>>24), 
     817            (myPtrs->pcktPtr->ipH->srcAdd<<8>>24), 
     818            (myPtrs->pcktPtr->ipH->srcAdd<<16>>24), 
     819            (myPtrs->pcktPtr->ipH->srcAdd<<24>>24), 
     820            myPtrs->currentHeaderV9Ptr->sourceId,  
     821            (*myPtrs->currentFlowsetIdPtr) 
     822            ); 
     823#endif 
    815824  } 
    816825  while ( ((*myPtrs->offsetV9Ptr)-48-shift) < data_length ) { 
    817826    (*myPtrs->offsetV9Ptr)++; /* if padding */ 
    818827    paddingCounter++; 
    819     fprintf(stderr, "\n padding \n"); 
    820828    if ( paddingCounter > 8 ) { 
     829#ifdef DEBUG 
     830    fprintf(stderr," padding too high: %d ", paddingCounter); 
     831#endif 
    821832      syslog(LOG_INFO,"padding too high: %d ", paddingCounter); 
    822833      return (-1); 
     
    827838    crazyCounter++; 
    828839  } 
     840#ifdef DEBUG 
     841  if (crazyCounter != 0){ 
     842    fprintf(stderr," crazyCounter: %d ", crazyCounter); 
     843  } 
     844#endif 
    829845  if (crazyCounter!=0) { syslog(LOG_INFO,"crazyCounter: %d ", crazyCounter);} 
    830846  return (data_length+shift); 
  • trunk/src/dataFlowSet.h

    r27 r28  
    44 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/fields_mgmt.c

    r27 r28  
    22 * File: fields_mgmt.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2004 GIP RENATER  
     6 * Copyright (C) 2004 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/fields_mgmt.h

    r27 r28  
    22 * File: fields_mgmt.h 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/get_conf.c

    r27 r28  
    22 * File: get_conf.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/get_conf.h

    r27 r28  
    44 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/headers_mgmt.c

    r8 r28  
    22 * File: headers_mgmt.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/headers_mgmt.h

    r8 r28  
    22 * File: headers_mgmt.h 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/msg_mgmt.c

    r8 r28  
    22 * File: msg_mgmt.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/msg_mgmt.h

    r27 r28  
    22 * File: msg_mgmt.h 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/output_file.c

    r18 r28  
    22 * File: output_file.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/output_file.h

    r18 r28  
    44 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/prefix_mgmt.c

    r25 r28  
    44 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/prefix_mgmt.h

    r25 r28  
    44 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/remote_output.c

    r8 r28  
    22 * File: remote_output.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/remote_output.h

    r8 r28  
    22 * File: remote_output.h 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/renetcol.c

    r27 r28  
    22 * File: renetcol.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
    5  * 
    6  * Copyright (C) 2005 GIP RENATER  
     4 * Authors: ANDREU Francois-Xavier  
     5 * 
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
     
    395395  lastIPOutput = now; 
    396396  do { 
    397     fprintf (stderr, "socket loop \n"); 
     397#ifdef DEBUG     
     398    fprintf (stderr, "["); 
     399#endif 
    398400    if ( ((tmPtr->tm_min)%STEP == 0) && (currentIntervalle != tmPtr->tm_min)){ 
    399401      currentIntervalle = tmPtr->tm_min; 
     
    442444                                             myPtrs.currentFlowsetNumberPtr, 
    443445                                             myQueue)) < 0 ) { 
    444             fprintf(stderr, "\nShift < 0 \n"); 
     446#ifdef DEBUG     
     447            fprintf (stderr, "w>\n"); 
     448#endif 
    445449            currentFlowsetNumber = myPtrs.currentHeaderV9Ptr->count + 1; 
    446450          }; 
     
    451455                                      curTplOptionPtr, 
    452456                                            myPtrs.currentFlowsetNumberPtr) ) < 0 ) { 
    453             fprintf(stderr, "\nShift Option < 0 \n"); 
     457#ifdef DEBUG     
     458            fprintf (stderr, "wo>\n"); 
     459#endif 
    454460            currentFlowsetNumber = myPtrs.currentHeaderV9Ptr->count + 1; 
    455461          } 
     
    461467                                         (size_t) shmForAgg->v4PrefixNb 
    462468                                         ) ) < 0 ) { 
    463             fprintf(stderr, "\nShift check < 0 \n"); 
     469#ifdef DEBUG     
     470            fprintf (stderr, "wd>\n"); 
     471#endif 
    464472            currentFlowsetNumber = myPtrs.currentHeaderV9Ptr->count + 1; 
    465473          } 
     
    478486      break; 
    479487    } 
    480     if (loopNb  > 100 ){ 
     488    if (loopNb  > 1000 ){ 
    481489      /* FIXME perhaps call this function via the compilation options */ 
    482490      writeAllTplFlSet(); 
    483       fprintf(stderr, " loop %d \n", loopNb); 
     491#ifdef DEBUG     
     492      fprintf(stderr, "W");  
     493#endif 
    484494      loopNb = 0; 
    485495    } 
     
    571581    now = time((time_t *)NULL); 
    572582    tmPtr = localtime(&now); 
     583#ifdef DEBUG     
     584    fprintf (stderr, "]\n"); 
     585#endif 
    573586  } while (1); 
    574587} 
     
    756769  } 
    757770  fclose(TPLFILE); 
    758   fprintf (stderr, "end write file def template \n"); 
    759 } 
     771} 
  • trunk/src/renetcol.h

    r27 r28  
    22 * File: renetcol.h 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/renetcolAgg.c

    r27 r28  
    227227      } 
    228228      now2 = time((time_t *)NULL); 
     229#ifdef DEBUG 
    229230      fprintf(stderr, "IPv4 subnet managment (rrd update) : \n %d sec, %d files updated, %d errors, total %d\n %d rrd file already created, %d errors in creation, %d new rrd file creations", 
    230231              now2-now, 
     
    235236              rrd_create_er_ct, 
    236237              rrd_create_ok_ct); 
     238#endif 
    237239      rrd_update_ok_ct = 0; 
    238240      rrd_update_er_ct = 0; 
  • trunk/src/renetcolAgg.h

    r27 r28  
    44 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2007 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/renetcolMsgCtl.c

    r2 r28  
    22 * File: renetcolMsgCtl.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/renetcolSender.c

    r23 r28  
    22 * File: renetcolSender.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/renetcolSender.h

    r8 r28  
    22 * File: renetcolSender.h 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/routers_mgmt.c

    r27 r28  
    22 * File: routers_mgmt.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/routers_mgmt.h

    r2 r28  
    22 * File: routers_mgmt.h 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/rules_mgmt.c

    r27 r28  
    22 * File: rules_mgmt.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/rules_mgmt.h

    r10 r28  
    22 * File: rules_mgmt.h 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/template.c

    r27 r28  
    22 * File: template.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
    5  * 
    6  * Copyright (C) 2005 GIP RENATER  
     4 * Authors: ANDREU Francois-Xavier  
     5 * 
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
     
    8585  length = *((unsigned short*)&buffer2); 
    8686  do { 
    87     fprintf (stderr, " TD \n"); 
     87#ifdef DEBUG     
     88    fprintf (stderr, "<\n"); 
     89    fprintf (stderr, "length %d \n", length);   
     90#endif 
    8891    badFieldNumber = 0; 
    8992    badFieldLength = 0; 
     
    160163          return (-1); 
    161164        } 
    162         fprintf (stderr, "t for new \n"); 
    163165      } 
    164166    } else { /*update*/ 
     
    236238          return (-1);     
    237239        } 
    238         fprintf (stderr, "t for up \n"); 
    239240      } 
    240241    } /* end if template creation or update */ 
     
    279280    (*cFNPtr)++;     
    280281  } while ( (cpt) < (length-2) ); /*length-2*/ 
     282#ifdef DEBUG 
     283  fprintf (stderr, "length returned %d, cpt=%d\n", length, cpt);   
     284  fprintf (stderr, ">\n"); 
     285#endif 
    281286  return length; 
    282287} 
     
    293298{ 
    294299  int i; 
    295   static int cpt = 0;  
    296   static unsigned short getFlowsetId = 0; 
    297   static unsigned short length = 0; 
     300  int cpt = 0;  
     301  unsigned short getFlowsetId = 0; 
     302  unsigned short length = 0; 
    298303  unsigned char buffer2[2]; 
    299304  TplOptionPtr ptplotmp; 
     
    309314  length = *((unsigned short*)&buffer2); 
    310315  do { 
    311     fprintf (stderr, " TO \n"); 
     316#ifdef DEBUG     
     317    fprintf (stderr, "<o\n"); 
     318#endif 
    312319    badFieldNumber = 0; 
    313320    badFieldLength = 0; 
     
    353360          syslog (LOG_INFO,  
    354361                  "in option template function: too many fields, bug collector or wrong template def in template update"); 
     362#ifdef DEBUG 
    355363          fprintf(stderr, 
    356364                  "\nin option template function: too many fields, bug collector or wrong template def in template update\n"); 
     365#endif 
    357366          ptplotmp = cTOPtr; 
    358367          if (ptplotmp->prev == NULL) { 
     
    371380          return (-1); 
    372381        } 
    373         fprintf (stderr, "to for new \n"); 
    374382      } 
    375383      while ((*offV9)%4 != 0) { 
    376384        (*offV9)++; cpt++; 
    377         fprintf (stderr, " TO new padding \n"); 
    378385      } /*padding case*/ 
    379386    } else { /*update */ 
     
    428435          syslog (LOG_INFO,  
    429436                  "in update option tpl function: too many fields, bug collector or wrong template def in template update"); 
     437#ifdef DEBUG 
    430438          fprintf(stderr, 
    431439                  "\nin update option tpl function: too many fields, bug collector or wrong template def in template update\n"); 
     440#endif 
    432441          ptplotmp = cTOPtr; 
    433442          if (ptplotmp->prev == NULL) { 
     
    446455          return (-1); 
    447456        } 
    448         fprintf (stderr, "to for up \n"); 
    449457      } 
    450458      while ((*offV9)%4 != 0) { 
    451459        (*offV9)++; cpt++; 
    452         fprintf (stderr, " TO update padding \n"); 
    453460      } /*padding case*/ 
    454461    } 
     
    456463  } while ((cpt) < (length-2)); 
    457464/*   show_all_tplFlSet(); */ 
    458   fprintf (stderr, "to return %d \n", length); 
     465#ifdef DEBUG 
     466  fprintf (stderr, "length returned %d, cpt=%d\n", length, cpt);   
     467  fprintf (stderr, ">\n"); 
     468#endif 
    459469  return length; 
    460470} 
  • trunk/src/template.h

    r27 r28  
    22 * File: template.h 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/tplflset_mgmt.c

    r2 r28  
    22 * File: tplflset_mgmt.c 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88 
  • trunk/src/tplflset_mgmt.h

    r2 r28  
    22 * File: tplflset_mgmt.h 
    33 *  
    4  * Authors: ANDREU François-Xavier  
     4 * Authors: ANDREU Francois-Xavier  
    55 * 
    6  * Copyright (C) 2005 GIP RENATER  
     6 * Copyright (C) 2005 2006 2007 GIP RENATER  
    77 */ 
    88