root/trunk/src/dataFlowSet.c @ 73

Revision 73, 33.8 KB (checked in by andreu, 15 years ago)

last changes before next release

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