| 165 | /* if ((pftmp->fieldType==9)||(pftmp->fieldType==29)){ */ |
| 166 | /* agCache.maskS = *((unsigned char*)&buffer1); */ |
| 167 | /* } */ |
| 168 | /* if ((pftmp->fieldType==13)||(pftmp->fieldType==30)){ */ |
| 169 | /* agCache.maskD = *((unsigned char*)&buffer1); */ |
| 170 | /* } */ |
| 171 | /* if (pftmp->fieldType==60){ */ |
| 172 | /* agCache.ipProt = *((unsigned char*)&buffer1); */ |
| 173 | /* } */ |
| 174 | /* if (pftmp->fieldType==4){ */ |
| 175 | /* agCache.tProt = *((unsigned char*)&buffer1); */ |
| 176 | /* } */ |
| 177 | /* if (pftmp->fieldType==61){ */ |
| 178 | /* agCache.sens = *((unsigned char*)&buffer1); */ |
| 179 | /* } */ |
| 180 | /* if (pftmp->fieldType==5){ */ |
| 181 | /* agCache.dscp = *((unsigned char*)&buffer1); */ |
| 182 | /* } */ |
| 183 | /* end aggregation */ |
| 184 | /* CRI */ |
135 | | agCache.maskD = *((unsigned char*)&buffer1); |
136 | | } |
137 | | if (pftmp->fieldType==60){ |
138 | | agCache.ipProt = *((unsigned char*)&buffer1); |
139 | | } |
140 | | if (pftmp->fieldType==4){ |
141 | | agCache.tProt = *((unsigned char*)&buffer1); |
142 | | } |
143 | | if (pftmp->fieldType==61){ |
144 | | agCache.sens = *((unsigned char*)&buffer1); |
145 | | } |
146 | | if (pftmp->fieldType==5){ |
147 | | agCache.dscp = *((unsigned char*)&buffer1); |
148 | | } |
149 | | /* end aggregation */ |
| 189 | ipFirstCache.maskD = *((unsigned char*)&buffer1); |
| 190 | } |
| 191 | if (pftmp->fieldType==60){ |
| 192 | ipFirstCache.ipProt = *((unsigned char*)&buffer1); |
| 193 | mplsFirstCache.ipProt = *((unsigned char*)&buffer1); |
| 194 | } |
| 195 | if (pftmp->fieldType==4){ |
| 196 | ipFirstCache.tProt = *((unsigned char*)&buffer1); |
| 197 | } |
| 198 | /* end CRI */ |
188 | | if ((pftmp->fieldType==8)){ |
189 | | agCache.v4AdS = *((unsigned long*)&buffer4); |
190 | | } |
191 | | if ((pftmp->fieldType==12)){ |
192 | | agCache.v4AdD = *((unsigned long*)&buffer4); |
| 256 | /* if ((pftmp->fieldType==8)){ */ |
| 257 | /* agCache.v4AdS = *((unsigned long*)&buffer4); */ |
| 258 | /* } */ |
| 259 | /* if ((pftmp->fieldType==12)){ */ |
| 260 | /* agCache.v4AdD = *((unsigned long*)&buffer4); */ |
| 261 | /* } */ |
| 262 | /* if (pftmp->fieldType==1){ */ |
| 263 | /* agCache.bytes = *((unsigned long*)&buffer4); */ |
| 264 | /* } */ |
| 265 | /* if (pftmp->fieldType==2){ */ |
| 266 | /* agCache.pkts = *((unsigned long*)&buffer4); */ |
| 267 | /* } */ |
| 268 | /* end aggregation */ |
| 269 | /* CRI */ |
| 270 | if (pftmp->fieldType==8){ |
| 271 | ipFirstCache.v4AdS = *((unsigned long*)&buffer4); |
| 272 | } |
| 273 | if (pftmp->fieldType==12){ |
| 274 | ipFirstCache.v4AdD = *((unsigned long*)&buffer4); |
| 441 | /* if ((pftmp->fieldType==9)||(pftmp->fieldType==29)){ */ |
| 442 | /* agCache.maskS = *((unsigned char*)&buffer1); */ |
| 443 | /* } */ |
| 444 | /* if ((pftmp->fieldType==13)||(pftmp->fieldType==30)){ */ |
| 445 | /* agCache.maskD = *((unsigned char*)&buffer1); */ |
| 446 | /* } */ |
| 447 | /* if (pftmp->fieldType==60){ */ |
| 448 | /* agCache.ipProt = *((unsigned char*)&buffer1); */ |
| 449 | /* } */ |
| 450 | /* if (pftmp->fieldType==4){ */ |
| 451 | /* agCache.tProt = *((unsigned char*)&buffer1); */ |
| 452 | /* } */ |
| 453 | /* if (pftmp->fieldType==61){ */ |
| 454 | /* agCache.sens = *((unsigned char*)&buffer1); */ |
| 455 | /* } */ |
| 456 | /* if (pftmp->fieldType==5){ */ |
| 457 | /* agCache.dscp = *((unsigned char*)&buffer1); */ |
| 458 | /* } */ |
| 459 | /* end aggregation */ |
| 460 | /* CRI */ |
357 | | agCache.maskD = *((unsigned char*)&buffer1); |
358 | | } |
359 | | if (pftmp->fieldType==60){ |
360 | | agCache.ipProt = *((unsigned char*)&buffer1); |
361 | | } |
362 | | if (pftmp->fieldType==4){ |
363 | | agCache.tProt = *((unsigned char*)&buffer1); |
364 | | } |
365 | | if (pftmp->fieldType==61){ |
366 | | agCache.sens = *((unsigned char*)&buffer1); |
367 | | } |
368 | | if (pftmp->fieldType==5){ |
369 | | agCache.dscp = *((unsigned char*)&buffer1); |
370 | | } |
371 | | /* end aggregation */ |
| 465 | ipFirstCache.maskD = *((unsigned char*)&buffer1); |
| 466 | } |
| 467 | if (pftmp->fieldType==60){ |
| 468 | ipFirstCache.ipProt = *((unsigned char*)&buffer1); |
| 469 | mplsFirstCache.ipProt = *((unsigned char*)&buffer1); |
| 470 | } |
| 471 | if (pftmp->fieldType==4){ |
| 472 | ipFirstCache.tProt = *((unsigned char*)&buffer1); |
| 473 | } |
400 | | if ((pftmp->fieldType==8)){ |
401 | | bool = 1; |
402 | | agCache.v4AdS = *((unsigned long*)&buffer4); |
403 | | } else if ((pftmp->fieldType==12)){ |
404 | | agCache.v4AdD = *((unsigned long*)&buffer4); |
405 | | } else if (pftmp->fieldType==1){ |
406 | | agCache.bytes = *((unsigned long*)&buffer4); |
407 | | } else if (pftmp->fieldType==2){ |
408 | | agCache.pkts = *((unsigned long*)&buffer4); |
409 | | } |
| 517 | /* if ((pftmp->fieldType==8)){ */ |
| 518 | /* bool = 1; */ |
| 519 | /* agCache.v4AdS = *((unsigned long*)&buffer4); */ |
| 520 | /* } else if ((pftmp->fieldType==12)){ */ |
| 521 | /* agCache.v4AdD = *((unsigned long*)&buffer4); */ |
| 522 | /* } else if (pftmp->fieldType==1){ */ |
| 523 | /* agCache.bytes = *((unsigned long*)&buffer4); */ |
| 524 | /* } else if (pftmp->fieldType==2){ */ |
| 525 | /* agCache.pkts = *((unsigned long*)&buffer4); */ |
| 526 | /* } */ |
| 528 | /* CRI */ |
| 529 | if (pftmp->fieldType==8){ |
| 530 | ipFirstCache.v4AdS = *((unsigned long*)&buffer4); |
| 531 | } |
| 532 | if (pftmp->fieldType==12){ |
| 533 | ipFirstCache.v4AdD = *((unsigned long*)&buffer4); |
| 534 | } |
| 535 | if (pftmp->fieldType==1){ |
| 536 | ipFirstCache.bytes = *((unsigned long*)&buffer4); |
| 537 | } |
| 538 | if (pftmp->fieldType==2){ |
| 539 | ipFirstCache.pkts = *((unsigned long*)&buffer4); |
| 540 | } |
| 541 | if (pftmp->fieldType==22){ |
| 542 | firstTime = *((unsigned long*)&buffer4); |
| 543 | } |
| 544 | if (pftmp->fieldType==21){ |
| 545 | lastTime = *((unsigned long*)&buffer4); |
| 546 | } |
| 547 | /* end CRI */ |
| 570 | /* CRI */ |
| 571 | printf("!"); |
| 572 | if ( mplsFirstCache.mplsLabel1 == 0 ) { |
| 573 | (ipCache+(*ipCounter))->ipProt = ipFirstCache.ipProt; |
| 574 | ipFirstCache.ipProt = 0; |
| 575 | (ipCache+(*ipCounter))->bytes = ipFirstCache.bytes; |
| 576 | ipFirstCache.bytes = 0; |
| 577 | (ipCache+(*ipCounter))->pkts = ipFirstCache.pkts; |
| 578 | ipFirstCache.pkts = 0; |
| 579 | (ipCache+(*ipCounter))->inSnmp = ipFirstCache.inSnmp; |
| 580 | ipFirstCache.inSnmp = 0; |
| 581 | (ipCache+(*ipCounter))->outSnmp = ipFirstCache.outSnmp; |
| 582 | ipFirstCache.outSnmp = 0; |
| 583 | (ipCache+(*ipCounter))->v4AdS = ipFirstCache.v4AdS; |
| 584 | ipFirstCache.outSnmp = 0; |
| 585 | (ipCache+(*ipCounter))->v4AdD = ipFirstCache.v4AdD; |
| 586 | ipFirstCache.v4AdD = 0; |
| 587 | (ipCache+(*ipCounter))->tProt = ipFirstCache.tProt; |
| 588 | ipFirstCache.tProt = 0; |
| 589 | (ipCache+(*ipCounter))->sPort = ipFirstCache.sPort; |
| 590 | ipFirstCache.sPort = 0; |
| 591 | (ipCache+(*ipCounter))->dPort = ipFirstCache.dPort; |
| 592 | ipFirstCache.dPort = 0; |
| 593 | (ipCache+(*ipCounter))->maskD = ipFirstCache.maskD; |
| 594 | ipFirstCache.maskD = 0; |
| 595 | (ipCache+(*ipCounter))->maskS = ipFirstCache.maskS; |
| 596 | ipFirstCache.maskS = 0; |
| 597 | (ipCache+(*ipCounter))->routerAd = ipFirstCache.routerAd; |
| 598 | (ipCache+(*ipCounter))->liveTime = lastTime - firstTime; |
| 599 | firstTime = 0; lastTime = 0; |
| 600 | (*ipCounter)++; |
| 601 | } else { |
| 602 | printf("im\n"); |
| 603 | (mplsCache+(*mplsCounter))->ipProt = mplsFirstCache.ipProt; |
| 604 | mplsFirstCache.ipProt = 0; |
| 605 | (mplsCache+(*mplsCounter))->v4AdS = mplsFirstCache.v4AdS; |
| 606 | mplsFirstCache.v4AdS = 0; |
| 607 | (mplsCache+(*mplsCounter))->v4AdD = mplsFirstCache.v4AdD; |
| 608 | mplsFirstCache.v4AdD = 0; |
| 609 | (mplsCache+(*mplsCounter))->routerAd = mplsFirstCache.routerAd; |
| 610 | (mplsCache+(*mplsCounter))->mplsLabel1 = mplsFirstCache.mplsLabel1; |
| 611 | mplsFirstCache.mplsLabel1 = 0; |
| 612 | (*mplsCounter)++; |
| 613 | } |
| 614 | /* CRI */ |