root/trunk/src/dataFlowSet.c @ 61

Revision 61, 33.7 KB (checked in by andreu, 15 years ago)

tickets 12,19 & 20 closed

  • Property svn:eol-style set to native
Line 
1/*
2 * File: dataFlowSet.c
3 *
4 * Authors: ANDREU Francois-Xavier
5 *
6 * Copyright (C) 2005 2006 2007 GIP RENATER
7 */
8
9/*  This file is part of renetcol.
10 *
11 *  renetcol is free software; you can redistribute it and/or modify
12 *  it under the terms of the GNU General Public License as published by
13 *  the Free Software Foundation; either version 2 of the License, or
14 *  (at your option) any later version.
15 *
16 *  renetcol is distributed in the hope that it will be useful,
17 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 *  GNU General Public License for more details.
20 *
21 *  You should have received a copy of the GNU General Public License
22 *  along with renetcol; if not, write to the Free Software
23 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
24 */
25
26#include "dataFlowSet.h"
27
28/*
29 * Check Data FlowSet
30 *
31 */
32short 
33checkDataFlowSet(short shift,
34                 struct MyPtrs *myPtrs,
35                 int myQueue,
36                 struct PrefixV4 *V4PTab,
37                 size_t nbPV4,
38                 struct PrefixV4 *V4STab,
39                 size_t nbSV4
40                 )
41{
42  TplFlowSetPtr tmp = NULL;
43  TplOptionPtr tmpOpt = NULL;
44  FieldPtr pftmp = NULL;
45  FieldPtr secondPftmp = NULL;
46  unsigned short data_length = 0;
47  unsigned short flow_size = 0;
48  unsigned short oldOffset = *myPtrs->offsetV9Ptr;
49  unsigned short secondOffset = 0;
50  unsigned short secondOldOffset = 0;
51  int moreIsNecessary = 1;
52  int field_size = 0;
53  int cpt = 0;
54  int secondCpt = 0;
55  int overflow = 0;
56  int noEnd = 1;
57  int i = 0;
58  int j = 0;
59  int pos = 0;
60  unsigned char buffer1; 
61  unsigned char buffer2[2];
62  unsigned char buffer4[4];
63  RulesPtr tmpRuleList = myPtrs->rulesListPtr;
64  RulesPtr tmpRL = myPtrs->rulesListPtr;
65  msgType myMsg;
66  char *msgTextIndex;
67
68  unsigned short tplMsgType = 11;
69  struct PrefixV4 prefixKey, *res, *res2, *resSub; /* for bsearch */
70#if defined(IPV4AGGIDSNMP)
71  struct PrefixV4 *res3;
72#endif
73#ifdef ASACC
74  struct AS asKey, *asres; /* for bsearch */
75#endif
76  struct AggCache agCache;
77  int bool = 0; /* in IPV4 Agg mode enabled, we need to now if it's an IPv4 */
78                /* flow, we test on the field and then put bool at 1 */
79  int isMplsFlow = 0;
80  int paddingCounter = 0;
81  int crazyCounter = 0;
82
83  buffer2[1] = *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
84  (*myPtrs->offsetV9Ptr)++;
85  buffer2[0] = *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
86  (*myPtrs->offsetV9Ptr)++;
87  (*myPtrs->currentFlowsetIdPtr) = *((unsigned short*)&buffer2);
88  buffer2[1] = *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
89  (*myPtrs->offsetV9Ptr)++;
90  buffer2[0] = *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
91  (*myPtrs->offsetV9Ptr)++;
92  data_length = *((unsigned short*)&buffer2);
93
94  if ( (tmp=existTplId(myPtrs->currentRouterPtr,
95                       myPtrs->currentHeaderV9Ptr->sourceId,
96                       (*myPtrs->currentFlowsetIdPtr)))!=NULL ) {
97#ifdef DEBUG
98    fprintf(stderr,
99            "{d id: %hu, lg %hu",
100            (*myPtrs->currentFlowsetIdPtr),
101            data_length);
102    if ( (*myPtrs->currentFlowsetIdPtr) > TRESHOLD_TEMPLATE_ID ) {
103/*      fprintf(stderr,"Bad TID from router: %lu.%lu.%lu.%lu\n", */
104/*              (*myPtrs->currentFlowsetIdPtr), */
105/*              (myPtrs->pcktPtr->ipH->srcAdd>>24), */
106/*              (myPtrs->pcktPtr->ipH->srcAdd<<8>>24), */
107/*              (myPtrs->pcktPtr->ipH->srcAdd<<16>>24), */
108/*              (myPtrs->pcktPtr->ipH->srcAdd<<24>>24)); */
109/*      fprintf(stderr," Bytes : \n"); */
110/*      while ( ( myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr) ) > (myPtrs->ptr_buffer+1416) ){ */
111/*        buffer1= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));(*myPtrs->offsetV9Ptr)++; */
112/*        tmp = *((unsigned char*)&buffer1); */
113/*        fprintf (stderr, " %s ", tmp); */
114/*      } */
115/*      exit(-1); */
116      return (data_length+shift);
117    }
118#endif
119    pftmp = tmp->lastField;
120    for (; pftmp; pftmp = pftmp->prev) {
121      flow_size += pftmp->fieldLength;
122    }
123    if ( data_length%flow_size >= 9 ) {
124      (*myPtrs->currentFlowsetNumberPtr) = myPtrs->currentHeaderV9Ptr->count;
125      syslog(LOG_INFO, "data flowset length not match with length from template definition, wrong template definition suspected; all next informations of this data flowset are not considered! flowset ID: %hu, from router: %lu.%lu.%lu.%lu",
126             (*myPtrs->currentFlowsetIdPtr),
127             (myPtrs->pcktPtr->ipH->srcAdd>>24),
128             (myPtrs->pcktPtr->ipH->srcAdd<<8>>24),
129             (myPtrs->pcktPtr->ipH->srcAdd<<16>>24),
130             (myPtrs->pcktPtr->ipH->srcAdd<<24>>24));
131      return (data_length+shift);
132    }
133    if ( data_length >= 1452 ) {
134      syslog(LOG_INFO, "data flowset length too raised; all next informations of this data flowset are not considered! flowset ID: %hu, from router: %lu.%lu.%lu.%lu",
135             (*myPtrs->currentFlowsetIdPtr),
136             (myPtrs->pcktPtr->ipH->srcAdd>>24),
137             (myPtrs->pcktPtr->ipH->srcAdd<<8>>24),
138             (myPtrs->pcktPtr->ipH->srcAdd<<16>>24),
139             (myPtrs->pcktPtr->ipH->srcAdd<<24>>24));
140      return (-1);
141    }
142#if defined(IPV4AGGIDR) || defined(IPV4AGGIDSNMP)
143    agCache.routerAd = myPtrs->pcktPtr->ipH->srcAdd;
144#endif
145
146    pftmp = tmp->lastField;
147    secondPftmp = tmp->lastField;   
148    secondOffset = *myPtrs->offsetV9Ptr;
149    secondOldOffset = secondOffset;
150    while ( (((*myPtrs->offsetV9Ptr)-48-shift) <= data_length)
151            && (overflow!=1) ) {
152      /*
153       * progression in a data flow Set
154       * notes:
155       *   48=header ip + header netf
156       *   shift = shift if there is a template declaration
157       */
158      cpt++;
159      j = 0;
160      pos = (pftmp->fieldType)*MAX_RULES_PER_FIELD+j;
161      field_size = (int) pftmp->fieldLength;
162     
163      /* special case: check yes on all flows from one router */
164      /* (phantom field nb 0) */
165      /* FIXME : this code is repeated, perhaps past before */
166      while ( ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+j))) != NULL ) {
167        if ( (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+j)))->value->stor.lvalue)
168              == myPtrs->pcktPtr->ipH->srcAdd )
169          {
170            ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+j)))->check = 1;
171          }     
172        j++;
173      }   
174      j = 0;
175     
176      /*
177       * Comparaison between the field value and the rules
178       * ... if one rule exist
179       * FIXME : warning, if no rules, no accounting ?
180       */
181      if (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos))) != NULL) {
182        oldOffset = *myPtrs->offsetV9Ptr;
183        while (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos))) != NULL){
184          /*
185           * while on one cache table line
186           */
187          *myPtrs->offsetV9Ptr = oldOffset;
188          switch ((int)
189                  (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->operator)){
190          case 2:
191            /* operator: "=" */ 
192            switch (field_size) {
193            case 1:
194              buffer1 = *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
195              (*myPtrs->offsetV9Ptr)++;
196              /* rule check */
197              if (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.cvalue
198                  == *((unsigned char*)&buffer1)) {
199                ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 1;
200              }
201              /* end rule check */
202#if defined(IPV4AGGIDR) || defined(IPV4AGGIDSNMP)
203              if ((pftmp->fieldType==9)||(pftmp->fieldType==29)){
204                agCache.maskS = *((unsigned char*)&buffer1);
205              }
206              if ((pftmp->fieldType==13)||(pftmp->fieldType==30)){
207                agCache.maskD = *((unsigned char*)&buffer1);
208              }
209              if (pftmp->fieldType==60){
210                agCache.ipProt = *((unsigned char*)&buffer1);
211              }
212              if (pftmp->fieldType==4){
213                agCache.tProt = *((unsigned char*)&buffer1);
214              }
215              if (pftmp->fieldType==61){
216                agCache.sens = *((unsigned char*)&buffer1);
217              }
218              if (pftmp->fieldType==5){
219                agCache.dscp = *((unsigned char*)&buffer1);
220              }
221#endif       
222              break;
223            case 2:
224              buffer2[1]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
225              (*myPtrs->offsetV9Ptr)++;
226              buffer2[0]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
227              (*myPtrs->offsetV9Ptr)++;
228              if (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.svalue
229                  == *((unsigned short*)&buffer2))
230                ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 1;
231#if defined(IPV4AGGIDR) || defined(IPV4AGGIDSNMP)
232              if (pftmp->fieldType==10){
233                agCache.inputSnmp = *((unsigned short*)&buffer2);
234              }
235              if (pftmp->fieldType==14){
236                agCache.outputSnmp = *((unsigned short*)&buffer2);
237              }
238#endif
239#ifdef ASACC
240              if (pftmp->fieldType==16){
241                agCache.asS = *((unsigned short*)&buffer2);
242              }   
243              if (pftmp->fieldType==17){
244                agCache.asD = *((unsigned short*)&buffer2);
245              }
246#endif
247              break;
248            case 3:
249              buffer4[3]= 0;
250              buffer4[2]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
251              (*myPtrs->offsetV9Ptr)++;
252              buffer4[1]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
253              (*myPtrs->offsetV9Ptr)++;
254              buffer4[0]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
255              (*myPtrs->offsetV9Ptr)++;
256              if (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.lvalue
257                  == *((unsigned long*)&buffer4))
258                ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 1;
259              /* aggregation */
260              /* end aggregation */
261              if (pftmp->fieldType==70){
262                isMplsFlow = 1;
263              }
264              break;
265            case 4:
266              buffer4[3]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
267              (*myPtrs->offsetV9Ptr)++;
268              buffer4[2]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
269              (*myPtrs->offsetV9Ptr)++;
270              buffer4[1]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
271              (*myPtrs->offsetV9Ptr)++;
272              buffer4[0]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
273              (*myPtrs->offsetV9Ptr)++;
274              /* FIXME : here , add a check on the field type */
275              if ((pftmp->fieldType==8)||(pftmp->fieldType==12)){
276                if ((((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.lvalue)
277                    == (*((unsigned long*)&buffer4))>>(32-((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask)<<(32-((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask) )
278                  {
279                    ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 1;
280                  }
281              }
282              if (pftmp->fieldType==1){
283                agCache.bytes = *((unsigned long*)&buffer4);
284                if (
285                    ((unsigned long)((((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.lvalue) + ( (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.lvalue)*10/100))
286                     >= (*((unsigned long*)&buffer4)))
287                    &&
288                    ( (unsigned long)((((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.lvalue) - ( (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.lvalue)*10/100))
289                      <= (*((unsigned long*)&buffer4)) )
290                    )
291                  {
292                    ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 1;
293                  }
294              }
295#if defined(IPV4AGGIDR) || defined(IPV4AGGIDSNMP)
296              if ((pftmp->fieldType==8)){
297                bool = 1; /* very important, test if we have an IPv4 flow for Agg */
298                agCache.v4AdS = *((unsigned long*)&buffer4);
299              }
300              if ((pftmp->fieldType==12)){
301                agCache.v4AdD = *((unsigned long*)&buffer4);
302              }
303              if (pftmp->fieldType==1){
304                agCache.bytes = *((unsigned long*)&buffer4);
305              }
306              if (pftmp->fieldType==2){
307                agCache.pkts = *((unsigned long*)&buffer4);
308              }
309#endif
310              break;
311            case 16:
312              for (i=0; i<4; i++) {
313                buffer4[3]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
314                (*myPtrs->offsetV9Ptr)++;
315                buffer4[2]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
316                (*myPtrs->offsetV9Ptr)++;
317                buffer4[1]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
318                (*myPtrs->offsetV9Ptr)++;
319                buffer4[0]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
320                (*myPtrs->offsetV9Ptr)++;
321                if (1==moreIsNecessary){
322                  switch(i){
323                  case 0:
324                    if (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask <= 32){
325                      if (ntohl(((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.tabAdd6[i])
326                          ==
327                          (*((unsigned long*)&buffer4))>>(32-((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask)<<(32-((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask)
328                          )
329                        {
330                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 1;
331                          moreIsNecessary = 0;
332                        } else {
333                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 0;
334                          moreIsNecessary = 0;
335                        }
336                    } else {
337                      if (ntohl(((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.tabAdd6[i])
338                          ==
339                          (*((unsigned long*)&buffer4))
340                          )
341                        {
342                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 1;
343                        } else {
344                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 0;
345                          moreIsNecessary = 0;
346                        }
347                    }
348                    break;
349                  case 1:
350                    if (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask <= 64){
351                      if (ntohl(((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.tabAdd6[i])
352                          ==
353                          (*((unsigned long*)&buffer4))>>(64-((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask)<<(64-((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask)
354                          )
355                        {
356                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check =
357                            ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check && 1;
358                          moreIsNecessary = 0;
359                        } else {
360                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 0;
361                          moreIsNecessary = 0;
362                        }
363                    } else {
364                      if (ntohl(((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.tabAdd6[i])
365                          ==
366                          (*((unsigned long*)&buffer4))
367                          )
368                        {
369                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check =
370                            ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check && 1;
371                        } else {
372                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 0;
373                          moreIsNecessary = 0;
374                        }
375                    }
376                    break;
377                  case 2:
378                    if (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask <= 96){
379                      if (ntohl(((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.tabAdd6[i])
380                          ==
381                          (*((unsigned long*)&buffer4))>>(96-((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask)<<(96-((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask)
382                          )
383                        {
384                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check =
385                            ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check && 1;
386                          moreIsNecessary = 0;
387                        } else {
388                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 0;
389                          moreIsNecessary = 0;
390                        }
391                    } else {
392                      if (ntohl(((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.tabAdd6[i])
393                          ==
394                          (*((unsigned long*)&buffer4))
395                          )
396                        {
397                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check =
398                            ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check && 1;
399                        } else {
400                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 0;
401                          moreIsNecessary = 0;
402                        }
403                    }
404                    break;
405                  case 3:
406                    if (((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask <= 128){
407                      if (ntohl(((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.tabAdd6[i])
408                          ==
409                          (*((unsigned long*)&buffer4))>>(128-((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask)<<(128-((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->mask)
410                          )
411                        {
412                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check =
413                            ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check && 1;
414                        } else {
415                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 0;
416                          moreIsNecessary = 0;
417                        }
418                    } else {
419                      if (ntohl(((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->value->stor.tabAdd6[i])
420                          ==
421                          (*((unsigned long*)&buffer4))
422                          )
423                        {
424                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check =
425                            ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check && 1;
426                        } else {
427                          ((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->check = 0;
428                          moreIsNecessary = 0;
429                        }
430                    }
431                    break;
432                  default:
433                    break;
434                  } /* end of switch(i) */
435                } /* end of if moreIsNecessary */
436              }
437              moreIsNecessary = 1;
438              /* aggregation for IPv6 flows */
439             
440              /* end aggregation */
441              break;
442            default:
443              syslog(LOG_INFO, "Field size not known: %d\n", field_size);
444              for (i=0; i<field_size; i++){
445                (*myPtrs->offsetV9Ptr)++;
446              }
447              break;
448            }
449            break;
450          default:
451            syslog(LOG_INFO, "Operator not known: %d\n",
452                   (int)(((RuleDefPtr)(*(myPtrs->rulesAddressPtr+pos)))->operator));
453            break;
454          }
455          j++;
456          pos = (pftmp->fieldType)*10+j;
457        } /* end while myPtrs->rulesAddressPtr */
458      } else {
459        /*
460         * no rule within this field type, but we must read the value
461         */
462        switch (field_size) {
463        case 1:
464          buffer1 = *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
465          (*myPtrs->offsetV9Ptr)++;
466#if defined(IPV4AGGIDR) || defined(IPV4AGGIDSNMP)
467          if ((pftmp->fieldType==9)||(pftmp->fieldType==29)){
468            agCache.maskS = *((unsigned char*)&buffer1);
469          }
470          if ((pftmp->fieldType==13)||(pftmp->fieldType==30)){
471            agCache.maskD = *((unsigned char*)&buffer1);
472          }
473          if (pftmp->fieldType==60){
474            agCache.ipProt = *((unsigned char*)&buffer1);
475          }
476          if (pftmp->fieldType==4){
477            agCache.tProt = *((unsigned char*)&buffer1);
478          }
479          if (pftmp->fieldType==61){
480            agCache.sens = *((unsigned char*)&buffer1);
481          }
482          if (pftmp->fieldType==5){
483            agCache.dscp = *((unsigned char*)&buffer1);
484          }       
485#endif
486          break;
487        case 2:
488          buffer2[1]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
489          (*myPtrs->offsetV9Ptr)++;
490          buffer2[0]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
491          (*myPtrs->offsetV9Ptr)++;
492#if defined(IPV4AGGIDR) || defined(IPV4AGGIDSNMP)
493          if (pftmp->fieldType==10){
494            agCache.inputSnmp = *((unsigned short*)&buffer2);
495          }       
496          if (pftmp->fieldType==14){
497            agCache.outputSnmp = *((unsigned short*)&buffer2);
498          }       
499#endif
500#ifdef ASACC
501          if (pftmp->fieldType==16){
502            agCache.asS = *((unsigned short*)&buffer2);
503          }       
504          if (pftmp->fieldType==17){
505            agCache.asD = *((unsigned short*)&buffer2);
506          }
507#endif
508          break;
509        case 3:
510          buffer4[3]= 0;
511          buffer4[2]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
512          (*myPtrs->offsetV9Ptr)++;
513          buffer4[1]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
514          (*myPtrs->offsetV9Ptr)++;
515          buffer4[0]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
516          (*myPtrs->offsetV9Ptr)++;
517          /* aggregation */
518          /* end aggregation */
519          if (pftmp->fieldType==70){
520            isMplsFlow = 1;
521          }
522          break;
523        case 4:
524          buffer4[3]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
525          (*myPtrs->offsetV9Ptr)++;
526          buffer4[2]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
527          (*myPtrs->offsetV9Ptr)++;
528          buffer4[1]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
529          (*myPtrs->offsetV9Ptr)++;
530          buffer4[0]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
531          (*myPtrs->offsetV9Ptr)++;
532#if defined(IPV4AGGIDR) || defined(IPV4AGGIDSNMP)
533          if ((pftmp->fieldType==8)){
534            bool = 1;
535            agCache.v4AdS = *((unsigned long*)&buffer4);
536          } else if ((pftmp->fieldType==12)){
537            agCache.v4AdD = *((unsigned long*)&buffer4);
538          } else if (pftmp->fieldType==1){
539            agCache.bytes = *((unsigned long*)&buffer4);
540          } else if (pftmp->fieldType==2){
541            agCache.pkts = *((unsigned long*)&buffer4);
542          }
543#endif
544          break;
545        case 16:
546          for (i=0; i<4; i++) {
547            buffer2[1]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
548            (*myPtrs->offsetV9Ptr)++;
549            buffer2[0]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
550            (*myPtrs->offsetV9Ptr)++;
551            buffer2[1]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
552            (*myPtrs->offsetV9Ptr)++;
553            buffer2[0]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr));
554            (*myPtrs->offsetV9Ptr)++;
555          }
556          /* aggregation IPv6 */         
557          /* end aggregation */
558          break;
559        default:
560          syslog(LOG_INFO,"UNKNOWN FIELDS LENGTH: %d ", field_size);
561          for (i=0; i<field_size; i++){
562            (*myPtrs->offsetV9Ptr)++;
563          }
564        }
565      } /* end if one cache table line existence */
566      if (cpt==tmp->fieldCount) {
567        /*
568         * end of one flow (not the flowset)
569         */
570
571        /* put aggregation cache information to IPv4 Prefixes table */
572        /* Aggregation mode must be enable in ./configure options   */
573        /* first we must know if the address belong to our prefix   */
574        /*
575         * AS ACCOUNTING
576         */
577#if defined(ASACC) && defined(IPV4AGGIDSNMP)
578        if ( (bool == 1) && (isMplsFlow == 0) ){
579          asKey.as = agCache.asS;
580          asres = bsearch(&asKey, myPtrs->currentASTab, myPtrs->asNb, sizeof(struct AS), asGlobalCmp);
581          if (asres != NULL) {
582            if ( myPtrs->currentRouterPtr->snmpIndexList[agCache.inputSnmp] == 1  ) {         
583              if (myPtrs->currentRouterPtr->sampled != 0 ){
584                /* OUT ("traffic from the AS")  */
585                asres->bytesNbOUT += agCache.bytes;
586                asres->pktsNbOUT += agCache.pkts;
587                (asres->flowNbOUT)++;
588              }
589              if (asres->sampling == 0
590                  && myPtrs->currentRouterPtr->sampled != 0){
591                asres->sampling = myPtrs->currentRouterPtr->sampled;
592              }
593              asres = NULL;
594              asKey.as = agCache.asD;
595              asres = bsearch(&asKey, myPtrs->currentASTab, myPtrs->asNb, sizeof(struct AS), asGlobalCmp);
596              if (asres!=NULL){
597                if (myPtrs->currentRouterPtr->sampled != 0 ){
598                  /* IN ("traffic to the AS")  */
599                  asres->bytesNbIN += agCache.bytes;
600                  asres->pktsNbIN += agCache.pkts;
601                  (asres->flowNbIN)++;
602                }
603                if (asres->sampling == 0
604                    && myPtrs->currentRouterPtr->sampled != 0){
605                  asres->sampling = myPtrs->currentRouterPtr->sampled;
606                }
607                asres = NULL;
608              }
609            }
610          } else {
611            asres = NULL;
612            asKey.as = agCache.asD;
613            asres = bsearch(&asKey, myPtrs->currentASTab, myPtrs->asNb, sizeof(struct AS), asGlobalCmp);
614            if (asres!=NULL){
615              if ( myPtrs->currentRouterPtr->snmpIndexList[agCache.inputSnmp] == 1  ) {
616                if (myPtrs->currentRouterPtr->sampled != 0 ){
617                  /* IN ("traffic to the AS")  */
618                  asres->bytesNbIN += agCache.bytes;
619                  asres->pktsNbIN += agCache.pkts;
620                  (asres->flowNbIN)++;
621                }
622                if (asres->sampling == 0
623                    && myPtrs->currentRouterPtr->sampled != 0){
624                  asres->sampling = myPtrs->currentRouterPtr->sampled;
625                }
626              }
627            }
628          }
629        }
630#endif
631        /*
632         * PREFIX &/or MATRIX ACCOUNTING
633         */
634#if defined(IPV4AGGIDR) || defined(IPV4AGGIDSNMP)
635        if ( (bool == 1) && (isMplsFlow == 0) ){
636          prefixKey.beginning = agCache.v4AdS>>(32-agCache.maskS)<<(32-agCache.maskS);
637          res = bsearch(&prefixKey, V4PTab, nbPV4,
638                        sizeof(struct PrefixV4), prefGlobalCmp);
639          if (res!=NULL){
640            /* res is supernet or subnet ? */
641            if (res->hasSubnet == 1) {
642              resSub = NULL;
643              resSub = bsearch(&prefixKey, V4STab, nbSV4,
644                               sizeof(struct PrefixV4), prefGlobalCmp);
645              if (resSub != NULL) {
646                res = resSub;
647                resSub = NULL;
648              }
649            }
650#if defined(IPV4AGGIDR)
651            if ( myPtrs->routersID[res->routerNb] == agCache.routerAd  ) {
652#elif defined(IPV4AGGIDSNMP)
653            if ( myPtrs->currentRouterPtr->snmpIndexList[agCache.inputSnmp] == 1  ) {         
654#endif
655              if (myPtrs->currentRouterPtr->sampled != 0 ){
656                /* OUT ("traffic from the prefix/subnet")  */
657                res->bytesNbOUT += agCache.bytes;
658                res->pktsNbOUT += agCache.pkts;
659                (res->flowNbOUT)++;
660              }
661              if (res->sampling == 0
662                  && myPtrs->currentRouterPtr->sampled != 0){
663                res->sampling = myPtrs->currentRouterPtr->sampled;
664              }
665#if defined(IPV4AGGIDSNMP)
666              prefixKey.beginning = agCache.v4AdD>>(32-agCache.maskD)<<(32-agCache.maskD);
667              res3 = bsearch(&prefixKey, V4PTab, nbPV4,
668                             sizeof(struct PrefixV4), prefGlobalCmp);
669              if (res3!=NULL){
670                /* res is supernet or subnet ? */
671                if (res3->hasSubnet == 1) {
672                  resSub = NULL;
673                  resSub = bsearch(&prefixKey, V4STab, nbSV4,
674                                   sizeof(struct PrefixV4), prefGlobalCmp);
675                  if (resSub != NULL) {
676                    res3 = resSub;
677                    resSub = NULL;
678                  }
679                }
680                if (myPtrs->currentRouterPtr->sampled != 0 ){
681                  /* IN ("traffic to the prefix/subnet")  */
682                  res3->bytesNbIN += agCache.bytes;
683                  res3->pktsNbIN += agCache.pkts;
684                  (res3->flowNbIN)++;
685                }
686                if (res3->sampling == 0
687                    && myPtrs->currentRouterPtr->sampled != 0){
688                  res3->sampling = myPtrs->currentRouterPtr->sampled;
689                }
690              }
691#endif
692#if defined(MATRIX) && defined(IPV4AGGIDR)
693              /* inter-pop matrix Accounting */
694              prefixKey.beginning = agCache.v4AdD>>(32-agCache.maskD)<<(32-agCache.maskD);
695              res2 = bsearch(&prefixKey, V4PTab, nbPV4,
696                             sizeof(struct PrefixV4), prefGlobalCmp);
697              if (res2!=NULL){         
698                ((struct POP *)((myPtrs->matrixPOP)
699                                +((res->routerNb)*ROUTER_INDEX_MAX)
700                                +((res2->routerNb))))->pktsNb += agCache.pkts;
701                ((struct POP *)((myPtrs->matrixPOP)
702                                +((res->routerNb)*ROUTER_INDEX_MAX)
703                                +((res2->routerNb))))->bytesNb += agCache.bytes;
704                ((struct POP *)((myPtrs->matrixPOP)
705                                +((res->routerNb)*ROUTER_INDEX_MAX)
706                                +((res2->routerNb))))->flowNb++;
707              } else {
708                (
709                 ((struct POP *)(myPtrs->matrixPOP)
710                  +((res->routerNb)*ROUTER_INDEX_MAX)
711                  +((ROUTER_INDEX_MAX-1))))->pktsNb += agCache.pkts;
712                (
713                 ((struct POP *)(myPtrs->matrixPOP)
714                  +((res->routerNb)*ROUTER_INDEX_MAX)
715                  +((ROUTER_INDEX_MAX-1))))->bytesNb += agCache.bytes;
716                (
717                 ((struct POP *)(myPtrs->matrixPOP)
718                  +((res->routerNb)*ROUTER_INDEX_MAX)
719                  +((ROUTER_INDEX_MAX-1))))->flowNb++;
720              }
721              /* end interpop matrix accounting */
722#endif /* matrix */
723            } else {
724                /* doublon or bad reference in prefix list */
725            }
726          } else { /* res==NULL, the prefix in source don't exist in your prefix list */
727            prefixKey.beginning = agCache.v4AdD>>(32-agCache.maskD)<<(32-agCache.maskD);
728            res = bsearch(&prefixKey, V4PTab, nbPV4,
729                          sizeof(struct PrefixV4), prefGlobalCmp);
730            if (res!=NULL){
731              /* res is supernet or subnet ? */
732              if (res->hasSubnet == 1) {
733                resSub = NULL;
734                resSub = bsearch(&prefixKey, V4STab, nbSV4,
735                                 sizeof(struct PrefixV4), prefGlobalCmp);
736                if (resSub != NULL) {
737                  res = resSub;
738                  resSub = NULL;
739                }
740              }
741              if ( myPtrs->currentRouterPtr->snmpIndexList[agCache.inputSnmp] == 1  ) {
742                if (myPtrs->currentRouterPtr->sampled != 0 ){
743                  /* IN ("traffic to the prefix/subnet")  */
744                  res->bytesNbIN += agCache.bytes;
745                  res->pktsNbIN += agCache.pkts;
746                  (res->flowNbIN)++;
747                }
748#if defined(IPV4AGGIDR)
749              if ( myPtrs->routersID[res->routerNb] == agCache.routerAd  ) {
750                if (myPtrs->currentRouterPtr->sampled != 0 ){
751                  /* IN ("traffic to the prefix")  */
752                  res->bytesNbIN += agCache.bytes;
753                  res->pktsNbIN += agCache.pkts;
754                  (res->flowNbIN)++;
755                }
756#endif
757                if (res->sampling == 0
758                    && myPtrs->currentRouterPtr->sampled != 0 ){
759                  res->sampling = myPtrs->currentRouterPtr->sampled;
760                }
761              } else {
762                /* doublon or bad reference in prefix list */
763              }
764            } else {
765              /* UNKNOW SUBNET CASE                                        */
766              /*                                                           */
767              /* HERE : we are in the cases of the address/mask don't      */
768              /*        belong to a prefix listed in the IPv4 prefix file  */
769              /* possibilities :                                           */
770              /*     -  prefix not referenced but allowed to be routed     */
771              /*     -  prefix not referenced but not allowed to be routed */
772              /*     -  spoofing                                           */
773#ifdef PRINTUNKNOWNSUBNET 
774              fprintf(stderr, "%lu.%lu.%lu.%lu/%hu -> %lu.%lu.%lu.%lu/%hu (R:%lu.%lu.%lu.%lu) \n",
775                      (agCache.v4AdS>>24),
776                      (agCache.v4AdS<<8>>24),
777                      (agCache.v4AdS<<16>>24),
778                      (agCache.v4AdS<<24>>24),
779                      (agCache.maskS),
780                      (agCache.v4AdD>>24),
781                      (agCache.v4AdD<<8>>24),
782                      (agCache.v4AdD<<16>>24),
783                      (agCache.v4AdD<<24>>24),
784                      (agCache.maskD),
785                      (myPtrs->pcktPtr->ipH->srcAdd>>24),
786                      (myPtrs->pcktPtr->ipH->srcAdd<<8>>24),
787                      (myPtrs->pcktPtr->ipH->srcAdd<<16>>24),
788                      (myPtrs->pcktPtr->ipH->srcAdd<<24>>24)
789                      );
790#endif /* PRINTUNKNOWNSUBNET */
791            }
792          }
793        }
794        bool = 0;
795        isMplsFlow = 0;
796#endif /* (IPV4AGGIDR) || (IPV4AGGIDSNMP) */
797        /*
798         *
799         * SOCKET OUTPUT TO A REMOTE CLIENT
800         *
801         * switch the rules definition (check & fieldToRecord),
802         * we send the flow or a part of the flow to a remote host or a file.
803         * In a first time (until release 0.0.7, the information was sent via
804         * the process renetcolSender with an IPC message queue. But, the perf
805         * of IPC Msg was very bad with a default system compilation.
806         * So, now, we send information directly from here.
807         */
808        tmpRuleList = myPtrs->rulesListPtr;
809        tmpRL = myPtrs->rulesListPtr;
810        while (tmpRuleList){
811          RuleDefPtr tmpRuleDefList = tmpRuleList->def;
812          unsigned short check = 1;
813          int s=0;
814          secondOffset = secondOldOffset;
815          while (tmpRuleDefList){
816            check = check && tmpRuleDefList->check;
817            tmpRuleDefList->check = 0;
818            tmpRuleDefList = tmpRuleDefList->next;
819          }
820          if ( (tmpRuleList->def != NULL) && (check == 1)) {
821            /* msg building */
822            secondPftmp = tmp->lastField;
823            msgTextIndex = mempcpy(mempcpy(mempcpy(myMsg.text,   
824                                                   &tplMsgType,
825                                                   sizeof(unsigned short)
826                                                   ),
827                                           &tmpRuleList->id,
828                                           sizeof(tmpRuleList->id)
829                                           ),
830                                   &myPtrs->currentRouterPtr->IpAddress,
831                                   sizeof(unsigned long)
832                                   );
833            msgTextIndex = mempcpy(mempcpy(mempcpy(msgTextIndex,
834                                                   &tmp->sourceId,
835                                                   sizeof(unsigned long)
836                                                   ),
837                                           &tmp->templateFlowSetId,
838                                           sizeof(tmp->templateFlowSetId)
839                                           ),
840                                   myPtrs->ptr_buffer+secondOffset,
841                                   flow_size
842                                   );
843            myMsg.type = 1;
844
845
846            /* NEW transfert type */
847            for ( ; tmpRL; tmpRL=tmpRL->next){
848              if (tmpRL->id == tmpRuleList->id){       
849                s = sendMessage(tmpRL->host->sockId, myMsg.text, sizeof(myMsg.text),
850                                tmpRL->host->hostAddressPtr);
851              }
852            }
853            /* FIXME : perhaps check "s" */
854            noEnd = 1;
855            secondCpt=0;
856          } /* end if check */
857          tmpRuleList = tmpRuleList->next;
858          tmpRL = myPtrs->rulesListPtr; /* ticket #11 */
859          secondPftmp = tmp->lastField;
860        } /* end while tmpRuleList */
861        /*
862         * end redirection
863         */
864        secondOffset = *myPtrs->offsetV9Ptr;
865        secondOldOffset = secondOffset;
866        pftmp = tmp->lastField;
867        cpt=0;
868        (*myPtrs->currentFlowsetNumberPtr)++; /* pointer on the flows number */
869        if (((*myPtrs->offsetV9Ptr)-48-shift+flow_size) > data_length){
870          overflow = 1; /* buffer index not correct */
871        }
872      } else {
873        /* not the flow end, progress in field list */
874        pftmp = pftmp->prev;
875      }
876    } /* end of the while on one flow record */
877   
878    while ( ((*myPtrs->offsetV9Ptr)-48-shift) < data_length ) {
879      (*myPtrs->offsetV9Ptr)++; /* if padding */
880      paddingCounter++;
881      if ( paddingCounter > 8 ) {
882#ifdef DEBUG
883        fprintf(stderr," padding too high: %d ", paddingCounter);
884#endif
885        syslog(LOG_INFO,"padding too high: %d ", paddingCounter);
886        return (-1);
887      }
888    }
889    while ( (*myPtrs->offsetV9Ptr)-48-shift > data_length ) {
890      (*myPtrs->offsetV9Ptr)--; /* crazy loop (when bug appears in template def) */
891      crazyCounter++;
892    }
893#ifdef DEBUG
894    if (crazyCounter != 0){ fprintf(stderr," crazyCounter: %d ", crazyCounter); }
895#endif
896    if (crazyCounter!=0) { syslog(LOG_INFO,"crazyCounter: %d ", crazyCounter);}
897   
898#ifdef DEBUG
899    fprintf(stderr,"}");
900#endif
901
902    return (data_length+shift);
903    /* end new place */
904   
905  }else{
906    /*
907     *
908     *
909     *  OPTIONAL TEMPLATE
910     *
911     *
912     */
913    if ((tmpOpt=existTplOptId(myPtrs->currentRouterPtr, myPtrs->currentHeaderV9Ptr->sourceId,
914                              (*myPtrs->currentFlowsetIdPtr)))!=NULL) {       
915#ifdef DEBUG
916      fprintf(stderr,"<d id: %hu, lg %hu", (*myPtrs->currentFlowsetIdPtr), data_length);
917#endif     
918      for ( i=0; i<(tmpOpt->optionScopeLg/4); i++){
919        /* FIXME : today we skip the scope fields, it's bad :( */ 
920        if ((pftmp=tmpOpt->lastField)!=NULL) {
921          for (j=0; j<pftmp->fieldLength; j++) {
922            (*myPtrs->offsetV9Ptr)++;
923          }
924          pftmp = pftmp->prev;
925        }
926      }
927      while (pftmp != NULL) {
928        if (pftmp->fieldLength==1){
929          buffer1 = *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr)); (*myPtrs->offsetV9Ptr)++;
930        }
931        if (pftmp->fieldLength==2){
932          buffer2[1]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr)); (*myPtrs->offsetV9Ptr)++;
933          buffer2[0]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr)); (*myPtrs->offsetV9Ptr)++;
934        }
935        if (pftmp->fieldLength==4){
936          buffer4[3]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr)); (*myPtrs->offsetV9Ptr)++;
937          buffer4[2]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr)); (*myPtrs->offsetV9Ptr)++;
938          buffer4[1]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr)); (*myPtrs->offsetV9Ptr)++;
939          buffer4[0]= *(myPtrs->ptr_buffer+(*myPtrs->offsetV9Ptr)); (*myPtrs->offsetV9Ptr)++;
940          if (pftmp->fieldType==34){
941            if ((*((unsigned long*)&buffer4)==1)
942                || (*((unsigned long*)&buffer4)==10)
943                || (*((unsigned long*)&buffer4)==100)
944                || (*((unsigned long*)&buffer4)==1000)) {
945              if (myPtrs->currentRouterPtr->sampled != *((unsigned long*)&buffer4) ) {
946#ifdef DEBUGAGG
947                fprintf(stderr,"\n SV (p) %lu != %lu (r)", *((unsigned long*)&buffer4),
948                        myPtrs->currentRouterPtr->sampled);
949#endif                     
950                syslog(LOG_INFO,"Sampling value change for router : %lu.%lu.%lu.%lu, old: %lu, new: %lu",
951                       (myPtrs->pcktPtr->ipH->srcAdd>>24),
952                       (myPtrs->pcktPtr->ipH->srcAdd<<8>>24),
953                       (myPtrs->pcktPtr->ipH->srcAdd<<16>>24),
954                       (myPtrs->pcktPtr->ipH->srcAdd<<24>>24),
955                       myPtrs->currentRouterPtr->sampled,
956                       *((unsigned long*)&buffer4)
957                       );
958                myPtrs->currentRouterPtr->sampled = *((unsigned long*)&buffer4);
959              }
960            }else{
961              syslog(LOG_INFO,"Sampling value not standard for router : %lu.%lu.%lu.%lu, value : %lu",
962                     (myPtrs->pcktPtr->ipH->srcAdd>>24),
963                     (myPtrs->pcktPtr->ipH->srcAdd<<8>>24),
964                     (myPtrs->pcktPtr->ipH->srcAdd<<16>>24),
965                     (myPtrs->pcktPtr->ipH->srcAdd<<24>>24),
966                     *((unsigned long*)&buffer4)
967                     );
968            }
969          }
970        }       
971        pftmp = pftmp->prev;
972      }
973      if ( pftmp == NULL ) {
974        while ((*myPtrs->offsetV9Ptr)%4 != 0) {
975          (*myPtrs->offsetV9Ptr)++;
976#ifdef DEBUG
977          fprintf(stderr," p ");
978#endif
979        }
980      } else {
981        fprintf(stderr,"PB ");
982      }
983#ifdef DEBUG
984      fprintf(stderr,">");
985#endif
986      return (data_length+shift);
987    } else {
988      /*
989       * template unknown, we skip this all the data
990       */
991      (*myPtrs->offsetV9Ptr)+=(data_length-4);
992      (*myPtrs->currentFlowsetNumberPtr) = myPtrs->currentHeaderV9Ptr->count;
993#ifdef DEBUG
994      fprintf(stderr, " U, r: %lu.%lu.%lu.%lu, sourceId: %lu, TID: %hu",
995              (myPtrs->pcktPtr->ipH->srcAdd>>24),
996              (myPtrs->pcktPtr->ipH->srcAdd<<8>>24),
997              (myPtrs->pcktPtr->ipH->srcAdd<<16>>24),
998              (myPtrs->pcktPtr->ipH->srcAdd<<24>>24),
999              myPtrs->currentHeaderV9Ptr->sourceId,
1000              (*myPtrs->currentFlowsetIdPtr)
1001              );
1002#endif
1003      return (data_length+shift);
1004    }
1005  }
1006}
Note: See TracBrowser for help on using the browser.