View | Details | Raw Unified | Return to bug 216317 | Differences between
and this patch

Collapse All | Expand All

(-)lib/ftfil.c (-90 / +90 lines)
Lines 357-465 Link Here
357
static int parse_primitive_type_double(struct line_parser *lp,
357
static int parse_primitive_type_double(struct line_parser *lp,
358
  struct ftfil *ftfil);
358
  struct ftfil *ftfil);
359
static int parse_primitive_type_rate(struct line_parser *lp,
359
static int parse_primitive_type_rate(struct line_parser *lp,
360
  struct ftfil *ftfil);
360
  struct ftfil *ftfil);
361
361
362
inline int eval_match_src_as(struct ftfil_lookup_as *lookup, char *rec,
362
int eval_match_src_as(struct ftfil_lookup_as *lookup, char *rec,
363
  struct fts3rec_offsets *fo);
363
  struct fts3rec_offsets *fo);
364
inline int eval_match_dst_as(struct ftfil_lookup_as *lookup, char *rec,
364
int eval_match_dst_as(struct ftfil_lookup_as *lookup, char *rec,
365
  struct fts3rec_offsets *fo);
365
  struct fts3rec_offsets *fo);
366
inline int eval_match_engine_type(struct ftfil_lookup_engine *lookup,
366
int eval_match_engine_type(struct ftfil_lookup_engine *lookup,
367
  char *rec, struct fts3rec_offsets *fo);
367
  char *rec, struct fts3rec_offsets *fo);
368
inline int eval_match_engine_id(struct ftfil_lookup_engine *lookup,
368
int eval_match_engine_id(struct ftfil_lookup_engine *lookup,
369
  char *rec, struct fts3rec_offsets *fo);
369
  char *rec, struct fts3rec_offsets *fo);
370
inline int eval_match_dst_if_index(struct ftfil_lookup_if_index *lookup,
370
int eval_match_dst_if_index(struct ftfil_lookup_if_index *lookup,
371
  char *rec, struct fts3rec_offsets *fo);
371
  char *rec, struct fts3rec_offsets *fo);
372
inline int eval_match_src_if_index(struct ftfil_lookup_if_index *lookup,
372
int eval_match_src_if_index(struct ftfil_lookup_if_index *lookup,
373
  char *rec, struct fts3rec_offsets *fo); 
373
  char *rec, struct fts3rec_offsets *fo); 
374
inline int eval_match_ip_dst_port(struct ftfil_lookup_ip_port *lookup,
374
int eval_match_ip_dst_port(struct ftfil_lookup_ip_port *lookup,
375
  char *rec, struct fts3rec_offsets *fo);
375
  char *rec, struct fts3rec_offsets *fo);
376
inline int eval_match_ip_src_port(struct ftfil_lookup_ip_port *lookup,
376
int eval_match_ip_src_port(struct ftfil_lookup_ip_port *lookup,
377
  char *rec, struct fts3rec_offsets *fo);
377
  char *rec, struct fts3rec_offsets *fo);
378
inline int eval_match_ip_tcp_flags(struct ftfil_lookup_ip_tcp_flags *lookup,
378
int eval_match_ip_tcp_flags(struct ftfil_lookup_ip_tcp_flags *lookup,
379
  char *rec, struct fts3rec_offsets *fo);
379
  char *rec, struct fts3rec_offsets *fo);
380
inline int eval_match_ip_marked_tos(struct ftfil_lookup_ip_tos *lookup,
380
int eval_match_ip_marked_tos(struct ftfil_lookup_ip_tos *lookup,
381
  char *rec, struct fts3rec_offsets *fo);
381
  char *rec, struct fts3rec_offsets *fo);
382
inline int eval_match_ip_tos(struct ftfil_lookup_ip_tos *lookup,
382
int eval_match_ip_tos(struct ftfil_lookup_ip_tos *lookup,
383
  char *rec, struct fts3rec_offsets *fo);
383
  char *rec, struct fts3rec_offsets *fo);
384
inline int eval_match_ip_dst_prefix_len(struct ftfil_lookup_ip_prefix_len
384
int eval_match_ip_dst_prefix_len(struct ftfil_lookup_ip_prefix_len
385
  *lookup, char *rec, struct fts3rec_offsets *fo);
385
  *lookup, char *rec, struct fts3rec_offsets *fo);
386
inline int eval_match_ip_src_prefix_len(struct ftfil_lookup_ip_prefix_len
386
int eval_match_ip_src_prefix_len(struct ftfil_lookup_ip_prefix_len
387
  *lookup, char *rec, struct fts3rec_offsets *fo);
387
  *lookup, char *rec, struct fts3rec_offsets *fo);
388
inline int eval_match_ip_prot(struct ftfil_lookup_ip_prot *lookup, char *rec,
388
int eval_match_ip_prot(struct ftfil_lookup_ip_prot *lookup, char *rec,
389
  struct fts3rec_offsets *fo);
389
  struct fts3rec_offsets *fo);
390
inline int eval_match_flows(struct ftfil_lookup_counter *lookup, char *rec,
390
int eval_match_flows(struct ftfil_lookup_counter *lookup, char *rec,
391
  struct fts3rec_offsets *fo);
391
  struct fts3rec_offsets *fo);
392
inline int eval_match_octets(struct ftfil_lookup_counter *lookup, char *rec,
392
int eval_match_octets(struct ftfil_lookup_counter *lookup, char *rec,
393
  struct fts3rec_offsets *fo);
393
  struct fts3rec_offsets *fo);
394
inline int eval_match_packets(struct ftfil_lookup_counter *lookup, char *rec,
394
int eval_match_packets(struct ftfil_lookup_counter *lookup, char *rec,
395
  struct fts3rec_offsets *fo);
395
  struct fts3rec_offsets *fo);
396
inline int eval_match_xtra_packets(struct ftfil_lookup_counter *lookup,
396
int eval_match_xtra_packets(struct ftfil_lookup_counter *lookup,
397
  char *rec, struct fts3rec_offsets *fo);
397
  char *rec, struct fts3rec_offsets *fo);
398
inline int eval_match_duration(struct ftfil_lookup_counter *lookup, char *rec,
398
int eval_match_duration(struct ftfil_lookup_counter *lookup, char *rec,
399
  struct fts3rec_offsets *fo);
399
  struct fts3rec_offsets *fo);
400
400
401
inline int eval_match_start_time_date(struct ftfil_lookup_counter *lookup,
401
int eval_match_start_time_date(struct ftfil_lookup_counter *lookup,
402
  char *rec, struct fts3rec_offsets *fo);
402
  char *rec, struct fts3rec_offsets *fo);
403
inline int eval_match_end_time_date(struct ftfil_lookup_counter *lookup,
403
int eval_match_end_time_date(struct ftfil_lookup_counter *lookup,
404
  char *rec, struct fts3rec_offsets *fo);
404
  char *rec, struct fts3rec_offsets *fo);
405
405
406
inline int eval_match_start_time(struct ftfil_lookup_time *lookup,
406
int eval_match_start_time(struct ftfil_lookup_time *lookup,
407
  char *rec, struct fts3rec_offsets *fo);
407
  char *rec, struct fts3rec_offsets *fo);
408
inline int eval_match_end_time(struct ftfil_lookup_time *lookup,
408
int eval_match_end_time(struct ftfil_lookup_time *lookup,
409
  char *rec, struct fts3rec_offsets *fo);
409
  char *rec, struct fts3rec_offsets *fo);
410
410
411
inline int eval_match_src_tag_l(struct ftfil_lookup_tag_mask *lookup,
411
int eval_match_src_tag_l(struct ftfil_lookup_tag_mask *lookup,
412
  char *rec, struct fts3rec_offsets *fo);
412
  char *rec, struct fts3rec_offsets *fo);
413
inline int eval_match_src_tag_h(struct ftfil_lookup_tag *lookup,
413
int eval_match_src_tag_h(struct ftfil_lookup_tag *lookup,
414
  char *rec, struct fts3rec_offsets *fo);
414
  char *rec, struct fts3rec_offsets *fo);
415
inline int eval_match_dst_tag_l(struct ftfil_lookup_tag_mask *lookup,
415
int eval_match_dst_tag_l(struct ftfil_lookup_tag_mask *lookup,
416
  char *rec, struct fts3rec_offsets *fo);
416
  char *rec, struct fts3rec_offsets *fo);
417
inline int eval_match_dst_tag_h(struct ftfil_lookup_tag *lookup,
417
int eval_match_dst_tag_h(struct ftfil_lookup_tag *lookup,
418
  char *rec, struct fts3rec_offsets *fo);
418
  char *rec, struct fts3rec_offsets *fo);
419
419
420
inline int eval_match_ip_sc_addr_l(struct ftfil_lookup_ip_mask *lookup,
420
int eval_match_ip_sc_addr_l(struct ftfil_lookup_ip_mask *lookup,
421
  char *rec, struct fts3rec_offsets *fo);
421
  char *rec, struct fts3rec_offsets *fo);
422
inline int eval_match_ip_sc_addr_h(struct ftfil_lookup_ip_address *lookup,
422
int eval_match_ip_sc_addr_h(struct ftfil_lookup_ip_address *lookup,
423
  char *rec, struct fts3rec_offsets *fo);
423
  char *rec, struct fts3rec_offsets *fo);
424
inline int eval_match_ip_sc_addr_r(struct ftfil_lookup_ip_prefix *lookup,
424
int eval_match_ip_sc_addr_r(struct ftfil_lookup_ip_prefix *lookup,
425
  char *rec, struct fts3rec_offsets *fo);
425
  char *rec, struct fts3rec_offsets *fo);
426
426
427
inline int eval_match_ip_nexthop_addr_l(struct ftfil_lookup_ip_mask *lookup,
427
int eval_match_ip_nexthop_addr_l(struct ftfil_lookup_ip_mask *lookup,
428
  char *rec, struct fts3rec_offsets *fo);
428
  char *rec, struct fts3rec_offsets *fo);
429
inline int eval_match_ip_nexthop_addr_h(struct ftfil_lookup_ip_address *lookup,
429
int eval_match_ip_nexthop_addr_h(struct ftfil_lookup_ip_address *lookup,
430
  char *rec, struct fts3rec_offsets *fo);
430
  char *rec, struct fts3rec_offsets *fo);
431
inline int eval_match_ip_nexthop_addr_r(struct ftfil_lookup_ip_prefix *lookup,
431
int eval_match_ip_nexthop_addr_r(struct ftfil_lookup_ip_prefix *lookup,
432
  char *rec, struct fts3rec_offsets *fo);
432
  char *rec, struct fts3rec_offsets *fo);
433
433
434
inline int eval_match_ip_src_addr_l(struct ftfil_lookup_ip_mask *lookup,
434
int eval_match_ip_src_addr_l(struct ftfil_lookup_ip_mask *lookup,
435
  char *rec, struct fts3rec_offsets *fo);
435
  char *rec, struct fts3rec_offsets *fo);
436
inline int eval_match_ip_src_addr_h(struct ftfil_lookup_ip_address *lookup,
436
int eval_match_ip_src_addr_h(struct ftfil_lookup_ip_address *lookup,
437
  char *rec, struct fts3rec_offsets *fo);
437
  char *rec, struct fts3rec_offsets *fo);
438
inline int eval_match_ip_src_addr_r(struct ftfil_lookup_ip_prefix *lookup,
438
int eval_match_ip_src_addr_r(struct ftfil_lookup_ip_prefix *lookup,
439
  char *rec, struct fts3rec_offsets *fo);
439
  char *rec, struct fts3rec_offsets *fo);
440
440
441
inline int eval_match_ip_dst_addr_l(struct ftfil_lookup_ip_mask *lookup,
441
int eval_match_ip_dst_addr_l(struct ftfil_lookup_ip_mask *lookup,
442
  char *rec, struct fts3rec_offsets *fo);
442
  char *rec, struct fts3rec_offsets *fo);
443
inline int eval_match_ip_dst_addr_h(struct ftfil_lookup_ip_address *lookup,
443
int eval_match_ip_dst_addr_h(struct ftfil_lookup_ip_address *lookup,
444
  char *rec, struct fts3rec_offsets *fo);
444
  char *rec, struct fts3rec_offsets *fo);
445
inline int eval_match_ip_dst_addr_r(struct ftfil_lookup_ip_prefix *lookup,
445
int eval_match_ip_dst_addr_r(struct ftfil_lookup_ip_prefix *lookup,
446
  char *rec, struct fts3rec_offsets *fo);
446
  char *rec, struct fts3rec_offsets *fo);
447
447
448
inline int eval_match_ip_exporter_addr_l(struct ftfil_lookup_ip_mask *lookup,
448
int eval_match_ip_exporter_addr_l(struct ftfil_lookup_ip_mask *lookup,
449
  char *rec, struct fts3rec_offsets *fo);
449
  char *rec, struct fts3rec_offsets *fo);
450
inline int eval_match_ip_exporter_addr_h(struct ftfil_lookup_ip_address *lookup,
450
int eval_match_ip_exporter_addr_h(struct ftfil_lookup_ip_address *lookup,
451
  char *rec, struct fts3rec_offsets *fo);
451
  char *rec, struct fts3rec_offsets *fo);
452
inline int eval_match_ip_exporter_addr_r(struct ftfil_lookup_ip_prefix *lookup,
452
int eval_match_ip_exporter_addr_r(struct ftfil_lookup_ip_prefix *lookup,
453
  char *rec, struct fts3rec_offsets *fo);
453
  char *rec, struct fts3rec_offsets *fo);
454
454
455
inline int eval_match_pps(struct ftfil_lookup_double *lookup,
455
int eval_match_pps(struct ftfil_lookup_double *lookup,
456
  char *rec, struct fts3rec_offsets *fo);
456
  char *rec, struct fts3rec_offsets *fo);
457
inline int eval_match_bps(struct ftfil_lookup_double *lookup,
457
int eval_match_bps(struct ftfil_lookup_double *lookup,
458
  char *rec, struct fts3rec_offsets *fo);
458
  char *rec, struct fts3rec_offsets *fo);
459
459
460
inline int eval_match_random_sample(struct ftfil_lookup_rate *lookup,
460
int eval_match_random_sample(struct ftfil_lookup_rate *lookup,
461
  char *rec, struct fts3rec_offsets *fo);
461
  char *rec, struct fts3rec_offsets *fo);
462
462
463
static int resolve_primitives(struct ftfil *ftfil);
463
static int resolve_primitives(struct ftfil *ftfil);
464
464
465
#define NEXT_WORD(A,B)\
465
#define NEXT_WORD(A,B)\
Lines 545-555 Link Here
545
 * Evalute src_as
545
 * Evalute src_as
546
 *
546
 *
547
 * returns: FT_FIL_MODE_PERMIT
547
 * returns: FT_FIL_MODE_PERMIT
548
 *          FT_FIL_MODE_DENY
548
 *          FT_FIL_MODE_DENY
549
 */
549
 */
550
inline int eval_match_src_as(struct ftfil_lookup_as *lookup, char *rec,
550
int eval_match_src_as(struct ftfil_lookup_as *lookup, char *rec,
551
  struct fts3rec_offsets *fo)
551
  struct fts3rec_offsets *fo)
552
{
552
{
553
  u_int16 *src_as;
553
  u_int16 *src_as;
554
  int val;
554
  int val;
555
555
Lines 572-582 Link Here
572
 * Evalute dst_as
572
 * Evalute dst_as
573
 *
573
 *
574
 * returns: FT_FIL_MODE_PERMIT
574
 * returns: FT_FIL_MODE_PERMIT
575
 *          FT_FIL_MODE_DENY
575
 *          FT_FIL_MODE_DENY
576
 */
576
 */
577
inline int eval_match_dst_as(struct ftfil_lookup_as *lookup, char *rec,
577
int eval_match_dst_as(struct ftfil_lookup_as *lookup, char *rec,
578
  struct fts3rec_offsets *fo)
578
  struct fts3rec_offsets *fo)
579
{
579
{
580
  u_int16 *dst_as;
580
  u_int16 *dst_as;
581
  int val;
581
  int val;
582
582
Lines 600-610 Link Here
600
 * Evalute ip_prot
600
 * Evalute ip_prot
601
 *
601
 *
602
 * returns: FT_FIL_MODE_PERMIT
602
 * returns: FT_FIL_MODE_PERMIT
603
 *          FT_FIL_MODE_DENY
603
 *          FT_FIL_MODE_DENY
604
 */
604
 */
605
inline int eval_match_ip_prot(struct ftfil_lookup_ip_prot *lookup, char *rec,
605
int eval_match_ip_prot(struct ftfil_lookup_ip_prot *lookup, char *rec,
606
  struct fts3rec_offsets *fo)
606
  struct fts3rec_offsets *fo)
607
{
607
{
608
  u_int8 *ip_prot;
608
  u_int8 *ip_prot;
609
  int val;
609
  int val;
610
610
Lines 628-638 Link Here
628
 * Evalute ip_src_prefix_len
628
 * Evalute ip_src_prefix_len
629
 *
629
 *
630
 * returns: FT_FIL_MODE_PERMIT
630
 * returns: FT_FIL_MODE_PERMIT
631
 *          FT_FIL_MODE_DENY
631
 *          FT_FIL_MODE_DENY
632
 */
632
 */
633
inline int eval_match_ip_src_prefix_len(struct ftfil_lookup_ip_prefix_len *lookup,
633
int eval_match_ip_src_prefix_len(struct ftfil_lookup_ip_prefix_len *lookup,
634
  char *rec, struct fts3rec_offsets *fo)
634
  char *rec, struct fts3rec_offsets *fo)
635
{
635
{
636
  u_int8 *src_mask;
636
  u_int8 *src_mask;
637
  int val;
637
  int val;
638
638
Lines 656-666 Link Here
656
 * Evalute ip_dst_prefix_len
656
 * Evalute ip_dst_prefix_len
657
 *
657
 *
658
 * returns: FT_FIL_MODE_PERMIT
658
 * returns: FT_FIL_MODE_PERMIT
659
 *          FT_FIL_MODE_DENY
659
 *          FT_FIL_MODE_DENY
660
 */
660
 */
661
inline int eval_match_ip_dst_prefix_len(struct ftfil_lookup_ip_prefix_len *lookup,
661
int eval_match_ip_dst_prefix_len(struct ftfil_lookup_ip_prefix_len *lookup,
662
  char *rec, struct fts3rec_offsets *fo)
662
  char *rec, struct fts3rec_offsets *fo)
663
{
663
{
664
  u_int8 *dst_mask;
664
  u_int8 *dst_mask;
665
  int val;
665
  int val;
666
666
Lines 684-694 Link Here
684
 * Evalute ip_tos
684
 * Evalute ip_tos
685
 *
685
 *
686
 * returns: FT_FIL_MODE_PERMIT
686
 * returns: FT_FIL_MODE_PERMIT
687
 *          FT_FIL_MODE_DENY
687
 *          FT_FIL_MODE_DENY
688
 */
688
 */
689
inline int eval_match_ip_tos(struct ftfil_lookup_ip_tos *lookup,
689
int eval_match_ip_tos(struct ftfil_lookup_ip_tos *lookup,
690
  char *rec, struct fts3rec_offsets *fo)
690
  char *rec, struct fts3rec_offsets *fo)
691
{
691
{
692
  u_int8 tos;
692
  u_int8 tos;
693
  int val;
693
  int val;
694
694
Lines 712-722 Link Here
712
 * Evalute marked_ip_tos
712
 * Evalute marked_ip_tos
713
 *
713
 *
714
 * returns: FT_FIL_MODE_PERMIT
714
 * returns: FT_FIL_MODE_PERMIT
715
 *          FT_FIL_MODE_DENY
715
 *          FT_FIL_MODE_DENY
716
 */
716
 */
717
inline int eval_match_ip_marked_tos(struct ftfil_lookup_ip_tos *lookup,
717
int eval_match_ip_marked_tos(struct ftfil_lookup_ip_tos *lookup,
718
  char *rec, struct fts3rec_offsets *fo)
718
  char *rec, struct fts3rec_offsets *fo)
719
{
719
{
720
  u_int8 marked_tos;
720
  u_int8 marked_tos;
721
  int val;
721
  int val;
722
722
Lines 741-751 Link Here
741
 * Evalute ip_tcp_flags
741
 * Evalute ip_tcp_flags
742
 *
742
 *
743
 * returns: FT_FIL_MODE_PERMIT
743
 * returns: FT_FIL_MODE_PERMIT
744
 *          FT_FIL_MODE_DENY
744
 *          FT_FIL_MODE_DENY
745
 */
745
 */
746
inline int eval_match_ip_tcp_flags(struct ftfil_lookup_ip_tcp_flags *lookup,
746
int eval_match_ip_tcp_flags(struct ftfil_lookup_ip_tcp_flags *lookup,
747
  char *rec, struct fts3rec_offsets *fo)
747
  char *rec, struct fts3rec_offsets *fo)
748
{
748
{
749
  u_int8 tcp_flags;
749
  u_int8 tcp_flags;
750
  int val;
750
  int val;
751
751
Lines 770-780 Link Here
770
 * Evalute ip_src_port
770
 * Evalute ip_src_port
771
 *
771
 *
772
 * returns: FT_FIL_MODE_PERMIT
772
 * returns: FT_FIL_MODE_PERMIT
773
 *          FT_FIL_MODE_DENY
773
 *          FT_FIL_MODE_DENY
774
 */
774
 */
775
inline int eval_match_ip_src_port(struct ftfil_lookup_ip_port *lookup,
775
int eval_match_ip_src_port(struct ftfil_lookup_ip_port *lookup,
776
  char *rec, struct fts3rec_offsets *fo)
776
  char *rec, struct fts3rec_offsets *fo)
777
{
777
{
778
  u_int16 *src_port;
778
  u_int16 *src_port;
779
  int val;
779
  int val;
780
780
Lines 797-807 Link Here
797
 * Evalute ip_dst_port
797
 * Evalute ip_dst_port
798
 *
798
 *
799
 * returns: FT_FIL_MODE_PERMIT
799
 * returns: FT_FIL_MODE_PERMIT
800
 *          FT_FIL_MODE_DENY
800
 *          FT_FIL_MODE_DENY
801
 */
801
 */
802
inline int eval_match_ip_dst_port(struct ftfil_lookup_ip_port *lookup,
802
int eval_match_ip_dst_port(struct ftfil_lookup_ip_port *lookup,
803
  char *rec, struct fts3rec_offsets *fo)
803
  char *rec, struct fts3rec_offsets *fo)
804
{
804
{
805
  u_int16 *dst_port;
805
  u_int16 *dst_port;
806
  int val;
806
  int val;
807
807
Lines 825-835 Link Here
825
 * Evalute src_if_index
825
 * Evalute src_if_index
826
 *
826
 *
827
 * returns: FT_FIL_MODE_PERMIT
827
 * returns: FT_FIL_MODE_PERMIT
828
 *          FT_FIL_MODE_DENY
828
 *          FT_FIL_MODE_DENY
829
 */
829
 */
830
inline int eval_match_src_if_index(struct ftfil_lookup_if_index *lookup,
830
int eval_match_src_if_index(struct ftfil_lookup_if_index *lookup,
831
  char *rec, struct fts3rec_offsets *fo)
831
  char *rec, struct fts3rec_offsets *fo)
832
{
832
{
833
  u_int16 *src_if_index;
833
  u_int16 *src_if_index;
834
  int val;
834
  int val;
835
835
Lines 852-862 Link Here
852
 * Evalute dst_if_index
852
 * Evalute dst_if_index
853
 *
853
 *
854
 * returns: FT_FIL_MODE_PERMIT
854
 * returns: FT_FIL_MODE_PERMIT
855
 *          FT_FIL_MODE_DENY
855
 *          FT_FIL_MODE_DENY
856
 */
856
 */
857
inline int eval_match_dst_if_index(struct ftfil_lookup_if_index *lookup,
857
int eval_match_dst_if_index(struct ftfil_lookup_if_index *lookup,
858
  char *rec, struct fts3rec_offsets *fo)
858
  char *rec, struct fts3rec_offsets *fo)
859
{
859
{
860
  u_int16 *dst_if_index;
860
  u_int16 *dst_if_index;
861
  int val;
861
  int val;
862
862
Lines 880-890 Link Here
880
 * Evalute engine_id
880
 * Evalute engine_id
881
 *
881
 *
882
 * returns: FT_FIL_MODE_PERMIT
882
 * returns: FT_FIL_MODE_PERMIT
883
 *          FT_FIL_MODE_DENY
883
 *          FT_FIL_MODE_DENY
884
 */
884
 */
885
inline int eval_match_engine_id(struct ftfil_lookup_engine *lookup,
885
int eval_match_engine_id(struct ftfil_lookup_engine *lookup,
886
  char *rec, struct fts3rec_offsets *fo)
886
  char *rec, struct fts3rec_offsets *fo)
887
{
887
{
888
  u_int8 *engine_id;
888
  u_int8 *engine_id;
889
  int val;
889
  int val;
890
890
Lines 908-918 Link Here
908
 * Evalute engine_type
908
 * Evalute engine_type
909
 *
909
 *
910
 * returns: FT_FIL_MODE_PERMIT
910
 * returns: FT_FIL_MODE_PERMIT
911
 *          FT_FIL_MODE_DENY
911
 *          FT_FIL_MODE_DENY
912
 */
912
 */
913
inline int eval_match_engine_type(struct ftfil_lookup_engine *lookup,
913
int eval_match_engine_type(struct ftfil_lookup_engine *lookup,
914
  char *rec, struct fts3rec_offsets *fo)
914
  char *rec, struct fts3rec_offsets *fo)
915
{
915
{
916
  u_int8 *engine_type;
916
  u_int8 *engine_type;
917
  int val;
917
  int val;
918
918
Lines 935-945 Link Here
935
 * Evalute flows
935
 * Evalute flows
936
 *
936
 *
937
 * returns: FT_FIL_MODE_PERMIT
937
 * returns: FT_FIL_MODE_PERMIT
938
 *          FT_FIL_MODE_DENY
938
 *          FT_FIL_MODE_DENY
939
 */
939
 */
940
inline int eval_match_flows(struct ftfil_lookup_counter *lookup, char *rec,
940
int eval_match_flows(struct ftfil_lookup_counter *lookup, char *rec,
941
  struct fts3rec_offsets *fo)
941
  struct fts3rec_offsets *fo)
942
{
942
{
943
  struct ftfil_lookup_counter_rec *ftflcr;
943
  struct ftfil_lookup_counter_rec *ftflcr;
944
  u_int32 *flows;
944
  u_int32 *flows;
945
  int t, match;
945
  int t, match;
Lines 1000-1010 Link Here
1000
 * Evalute octets
1000
 * Evalute octets
1001
 *
1001
 *
1002
 * returns: FT_FIL_MODE_PERMIT
1002
 * returns: FT_FIL_MODE_PERMIT
1003
 *          FT_FIL_MODE_DENY
1003
 *          FT_FIL_MODE_DENY
1004
 */
1004
 */
1005
inline int eval_match_octets(struct ftfil_lookup_counter *lookup, char *rec,
1005
int eval_match_octets(struct ftfil_lookup_counter *lookup, char *rec,
1006
  struct fts3rec_offsets *fo)
1006
  struct fts3rec_offsets *fo)
1007
{
1007
{
1008
  struct ftfil_lookup_counter_rec *ftflcr;
1008
  struct ftfil_lookup_counter_rec *ftflcr;
1009
  u_int32 *octets;
1009
  u_int32 *octets;
1010
  int t, match;
1010
  int t, match;
Lines 1065-1075 Link Here
1065
 * Evalute packets
1065
 * Evalute packets
1066
 *
1066
 *
1067
 * returns: FT_FIL_MODE_PERMIT
1067
 * returns: FT_FIL_MODE_PERMIT
1068
 *          FT_FIL_MODE_DENY
1068
 *          FT_FIL_MODE_DENY
1069
 */
1069
 */
1070
inline int eval_match_packets(struct ftfil_lookup_counter *lookup, char *rec,
1070
int eval_match_packets(struct ftfil_lookup_counter *lookup, char *rec,
1071
  struct fts3rec_offsets *fo)
1071
  struct fts3rec_offsets *fo)
1072
{
1072
{
1073
  struct ftfil_lookup_counter_rec *ftflcr;
1073
  struct ftfil_lookup_counter_rec *ftflcr;
1074
  u_int32 *packets;
1074
  u_int32 *packets;
1075
  int t, match;
1075
  int t, match;
Lines 1130-1140 Link Here
1130
 * Evalute xtra_packets
1130
 * Evalute xtra_packets
1131
 *
1131
 *
1132
 * returns: FT_FIL_MODE_PERMIT
1132
 * returns: FT_FIL_MODE_PERMIT
1133
 *          FT_FIL_MODE_DENY
1133
 *          FT_FIL_MODE_DENY
1134
 */
1134
 */
1135
inline int eval_match_xtra_packets(struct ftfil_lookup_counter *lookup,
1135
int eval_match_xtra_packets(struct ftfil_lookup_counter *lookup,
1136
  char *rec, struct fts3rec_offsets *fo)
1136
  char *rec, struct fts3rec_offsets *fo)
1137
{
1137
{
1138
  struct ftfil_lookup_counter_rec *ftflcr;
1138
  struct ftfil_lookup_counter_rec *ftflcr;
1139
  u_int32 *xtra_packets;
1139
  u_int32 *xtra_packets;
1140
  int t, match;
1140
  int t, match;
Lines 1195-1205 Link Here
1195
 * Evalute duration
1195
 * Evalute duration
1196
 *
1196
 *
1197
 * returns: FT_FIL_MODE_PERMIT
1197
 * returns: FT_FIL_MODE_PERMIT
1198
 *          FT_FIL_MODE_DENY
1198
 *          FT_FIL_MODE_DENY
1199
 */
1199
 */
1200
inline int eval_match_duration(struct ftfil_lookup_counter *lookup, char *rec,
1200
int eval_match_duration(struct ftfil_lookup_counter *lookup, char *rec,
1201
  struct fts3rec_offsets *fo)
1201
  struct fts3rec_offsets *fo)
1202
{
1202
{
1203
  struct ftfil_lookup_counter_rec *ftflcr;
1203
  struct ftfil_lookup_counter_rec *ftflcr;
1204
  u_int32 duration, *first, *last;
1204
  u_int32 duration, *first, *last;
1205
  int t, match;
1205
  int t, match;
Lines 1262-1272 Link Here
1262
 * Evalute start_time_date
1262
 * Evalute start_time_date
1263
 *
1263
 *
1264
 * returns: FT_FIL_MODE_PERMIT
1264
 * returns: FT_FIL_MODE_PERMIT
1265
 *          FT_FIL_MODE_DENY
1265
 *          FT_FIL_MODE_DENY
1266
 */
1266
 */
1267
inline int eval_match_start_time_date(struct ftfil_lookup_counter *lookup,
1267
int eval_match_start_time_date(struct ftfil_lookup_counter *lookup,
1268
  char *rec, struct fts3rec_offsets *fo)
1268
  char *rec, struct fts3rec_offsets *fo)
1269
{
1269
{
1270
  struct ftfil_lookup_counter_rec *ftflcr;
1270
  struct ftfil_lookup_counter_rec *ftflcr;
1271
  struct fttime ftt;
1271
  struct fttime ftt;
1272
  u_int32 *sysUpTime, *unix_secs, *unix_nsecs, *First;
1272
  u_int32 *sysUpTime, *unix_secs, *unix_nsecs, *First;
Lines 1333-1343 Link Here
1333
 * Evalute end_time_date
1333
 * Evalute end_time_date
1334
 *
1334
 *
1335
 * returns: FT_FIL_MODE_PERMIT
1335
 * returns: FT_FIL_MODE_PERMIT
1336
 *          FT_FIL_MODE_DENY
1336
 *          FT_FIL_MODE_DENY
1337
 */
1337
 */
1338
inline int eval_match_end_time_date(struct ftfil_lookup_counter *lookup,
1338
int eval_match_end_time_date(struct ftfil_lookup_counter *lookup,
1339
  char *rec, struct fts3rec_offsets *fo)
1339
  char *rec, struct fts3rec_offsets *fo)
1340
{
1340
{
1341
  struct ftfil_lookup_counter_rec *ftflcr;
1341
  struct ftfil_lookup_counter_rec *ftflcr;
1342
  struct fttime ftt;
1342
  struct fttime ftt;
1343
  u_int32 *sysUpTime, *unix_secs, *unix_nsecs, *Last;
1343
  u_int32 *sysUpTime, *unix_secs, *unix_nsecs, *Last;
Lines 1404-1414 Link Here
1404
 * Evalute start_time
1404
 * Evalute start_time
1405
 *
1405
 *
1406
 * returns: FT_FIL_MODE_PERMIT
1406
 * returns: FT_FIL_MODE_PERMIT
1407
 *          FT_FIL_MODE_DENY
1407
 *          FT_FIL_MODE_DENY
1408
 */
1408
 */
1409
inline int eval_match_start_time(struct ftfil_lookup_time *lookup,
1409
int eval_match_start_time(struct ftfil_lookup_time *lookup,
1410
  char *rec, struct fts3rec_offsets *fo)
1410
  char *rec, struct fts3rec_offsets *fo)
1411
{
1411
{
1412
  time_t t1, t2;
1412
  time_t t1, t2;
1413
  struct tm *tm;
1413
  struct tm *tm;
1414
  struct ftfil_lookup_time_rec *ftfltmer;
1414
  struct ftfil_lookup_time_rec *ftfltmer;
Lines 1494-1504 Link Here
1494
 * Evalute end_time
1494
 * Evalute end_time
1495
 *
1495
 *
1496
 * returns: FT_FIL_MODE_PERMIT
1496
 * returns: FT_FIL_MODE_PERMIT
1497
 *          FT_FIL_MODE_DENY
1497
 *          FT_FIL_MODE_DENY
1498
 */
1498
 */
1499
inline int eval_match_end_time(struct ftfil_lookup_time *lookup,
1499
int eval_match_end_time(struct ftfil_lookup_time *lookup,
1500
  char *rec, struct fts3rec_offsets *fo)
1500
  char *rec, struct fts3rec_offsets *fo)
1501
{
1501
{
1502
  time_t t1, t2;
1502
  time_t t1, t2;
1503
  struct tm *tm;
1503
  struct tm *tm;
1504
  struct ftfil_lookup_time_rec *ftfltmer;
1504
  struct ftfil_lookup_time_rec *ftfltmer;
Lines 1584-1594 Link Here
1584
 * Evalute src_tag as list
1584
 * Evalute src_tag as list
1585
 *
1585
 *
1586
 * returns: FT_FIL_MODE_PERMIT
1586
 * returns: FT_FIL_MODE_PERMIT
1587
 *          FT_FIL_MODE_DENY
1587
 *          FT_FIL_MODE_DENY
1588
 */
1588
 */
1589
inline int eval_match_src_tag_l(struct ftfil_lookup_tag_mask *lookup,
1589
int eval_match_src_tag_l(struct ftfil_lookup_tag_mask *lookup,
1590
  char *rec, struct fts3rec_offsets *fo)
1590
  char *rec, struct fts3rec_offsets *fo)
1591
{
1591
{
1592
  struct ftfil_lookup_tag_mask_rec *ftfltmr;
1592
  struct ftfil_lookup_tag_mask_rec *ftfltmr;
1593
  u_int32 *src_tag;
1593
  u_int32 *src_tag;
1594
  int match;
1594
  int match;
Lines 1622-1632 Link Here
1622
 * Evalute src_tag as hash
1622
 * Evalute src_tag as hash
1623
 *
1623
 *
1624
 * returns: FT_FIL_MODE_PERMIT
1624
 * returns: FT_FIL_MODE_PERMIT
1625
 *          FT_FIL_MODE_DENY
1625
 *          FT_FIL_MODE_DENY
1626
 */
1626
 */
1627
inline int eval_match_src_tag_h(struct ftfil_lookup_tag *lookup,
1627
int eval_match_src_tag_h(struct ftfil_lookup_tag *lookup,
1628
  char *rec, struct fts3rec_offsets *fo)
1628
  char *rec, struct fts3rec_offsets *fo)
1629
{
1629
{
1630
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
1630
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
1631
  u_int32 *src_tag, hash;
1631
  u_int32 *src_tag, hash;
1632
  int match;
1632
  int match;
Lines 1656-1666 Link Here
1656
 * Evalute dst_tag as hash
1656
 * Evalute dst_tag as hash
1657
 *
1657
 *
1658
 * returns: FT_FIL_MODE_PERMIT
1658
 * returns: FT_FIL_MODE_PERMIT
1659
 *          FT_FIL_MODE_DENY
1659
 *          FT_FIL_MODE_DENY
1660
 */
1660
 */
1661
inline int eval_match_dst_tag_h(struct ftfil_lookup_tag *lookup,
1661
int eval_match_dst_tag_h(struct ftfil_lookup_tag *lookup,
1662
  char *rec, struct fts3rec_offsets *fo)
1662
  char *rec, struct fts3rec_offsets *fo)
1663
{
1663
{
1664
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
1664
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
1665
  u_int32 *dst_tag, hash;
1665
  u_int32 *dst_tag, hash;
1666
  int match;
1666
  int match;
Lines 1690-1700 Link Here
1690
 * Evalute dst_tag as list
1690
 * Evalute dst_tag as list
1691
 *
1691
 *
1692
 * returns: FT_FIL_MODE_PERMIT
1692
 * returns: FT_FIL_MODE_PERMIT
1693
 *          FT_FIL_MODE_DENY
1693
 *          FT_FIL_MODE_DENY
1694
 */
1694
 */
1695
inline int eval_match_dst_tag_l(struct ftfil_lookup_tag_mask *lookup,
1695
int eval_match_dst_tag_l(struct ftfil_lookup_tag_mask *lookup,
1696
  char *rec, struct fts3rec_offsets *fo)
1696
  char *rec, struct fts3rec_offsets *fo)
1697
{
1697
{
1698
  struct ftfil_lookup_tag_mask_rec *ftfltmr;
1698
  struct ftfil_lookup_tag_mask_rec *ftfltmr;
1699
  u_int32 *dst_tag;
1699
  u_int32 *dst_tag;
1700
  int match;
1700
  int match;
Lines 1728-1738 Link Here
1728
 * Evalute nexthop as list
1728
 * Evalute nexthop as list
1729
 *
1729
 *
1730
 * returns: FT_FIL_MODE_PERMIT
1730
 * returns: FT_FIL_MODE_PERMIT
1731
 *          FT_FIL_MODE_DENY
1731
 *          FT_FIL_MODE_DENY
1732
 */
1732
 */
1733
inline int eval_match_ip_nexthop_addr_l(struct ftfil_lookup_ip_mask *lookup,
1733
int eval_match_ip_nexthop_addr_l(struct ftfil_lookup_ip_mask *lookup,
1734
  char *rec, struct fts3rec_offsets *fo)
1734
  char *rec, struct fts3rec_offsets *fo)
1735
{
1735
{
1736
  struct ftfil_lookup_ip_mask_rec *ftflipmr;
1736
  struct ftfil_lookup_ip_mask_rec *ftflipmr;
1737
  u_int32 *nexthop;
1737
  u_int32 *nexthop;
1738
  int match;
1738
  int match;
Lines 1766-1776 Link Here
1766
 * Evalute nexthop as hash
1766
 * Evalute nexthop as hash
1767
 *
1767
 *
1768
 * returns: FT_FIL_MODE_PERMIT
1768
 * returns: FT_FIL_MODE_PERMIT
1769
 *          FT_FIL_MODE_DENY
1769
 *          FT_FIL_MODE_DENY
1770
 */
1770
 */
1771
inline int eval_match_ip_nexthop_addr_h(struct ftfil_lookup_ip_address *lookup,
1771
int eval_match_ip_nexthop_addr_h(struct ftfil_lookup_ip_address *lookup,
1772
  char *rec, struct fts3rec_offsets *fo)
1772
  char *rec, struct fts3rec_offsets *fo)
1773
{
1773
{
1774
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
1774
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
1775
  u_int32 *nexthop, hash;
1775
  u_int32 *nexthop, hash;
1776
  int match;
1776
  int match;
Lines 1800-1810 Link Here
1800
 * Evalute nexthop as hash
1800
 * Evalute nexthop as hash
1801
 *
1801
 *
1802
 * returns: FT_FIL_MODE_PERMIT
1802
 * returns: FT_FIL_MODE_PERMIT
1803
 *          FT_FIL_MODE_DENY
1803
 *          FT_FIL_MODE_DENY
1804
 */
1804
 */
1805
inline int eval_match_ip_nexthop_addr_r(struct ftfil_lookup_ip_prefix *lookup,
1805
int eval_match_ip_nexthop_addr_r(struct ftfil_lookup_ip_prefix *lookup,
1806
  char *rec, struct fts3rec_offsets *fo)
1806
  char *rec, struct fts3rec_offsets *fo)
1807
{
1807
{
1808
  struct ftfil_lookup_ip_prefix_rec *ftflipprr;
1808
  struct ftfil_lookup_ip_prefix_rec *ftflipprr;
1809
  struct radix_node_head *rhead;
1809
  struct radix_node_head *rhead;
1810
  struct radix_sockaddr_in sock1;
1810
  struct radix_sockaddr_in sock1;
Lines 1837-1847 Link Here
1837
 * Evalute sc as list
1837
 * Evalute sc as list
1838
 *
1838
 *
1839
 * returns: FT_FIL_MODE_PERMIT
1839
 * returns: FT_FIL_MODE_PERMIT
1840
 *          FT_FIL_MODE_DENY
1840
 *          FT_FIL_MODE_DENY
1841
 */
1841
 */
1842
inline int eval_match_ip_sc_addr_l(struct ftfil_lookup_ip_mask *lookup,
1842
int eval_match_ip_sc_addr_l(struct ftfil_lookup_ip_mask *lookup,
1843
  char *rec, struct fts3rec_offsets *fo)
1843
  char *rec, struct fts3rec_offsets *fo)
1844
{
1844
{
1845
  struct ftfil_lookup_ip_mask_rec *ftflipmr;
1845
  struct ftfil_lookup_ip_mask_rec *ftflipmr;
1846
  u_int32 *sc;
1846
  u_int32 *sc;
1847
  int match;
1847
  int match;
Lines 1875-1885 Link Here
1875
 * Evalute sc as hash
1875
 * Evalute sc as hash
1876
 *
1876
 *
1877
 * returns: FT_FIL_MODE_PERMIT
1877
 * returns: FT_FIL_MODE_PERMIT
1878
 *          FT_FIL_MODE_DENY
1878
 *          FT_FIL_MODE_DENY
1879
 */
1879
 */
1880
inline int eval_match_ip_sc_addr_h(struct ftfil_lookup_ip_address *lookup,
1880
int eval_match_ip_sc_addr_h(struct ftfil_lookup_ip_address *lookup,
1881
  char *rec, struct fts3rec_offsets *fo)
1881
  char *rec, struct fts3rec_offsets *fo)
1882
{
1882
{
1883
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
1883
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
1884
  u_int32 *sc, hash;
1884
  u_int32 *sc, hash;
1885
  int match;
1885
  int match;
Lines 1909-1919 Link Here
1909
 * Evalute sc as hash
1909
 * Evalute sc as hash
1910
 *
1910
 *
1911
 * returns: FT_FIL_MODE_PERMIT
1911
 * returns: FT_FIL_MODE_PERMIT
1912
 *          FT_FIL_MODE_DENY
1912
 *          FT_FIL_MODE_DENY
1913
 */
1913
 */
1914
inline int eval_match_ip_sc_addr_r(struct ftfil_lookup_ip_prefix *lookup,
1914
int eval_match_ip_sc_addr_r(struct ftfil_lookup_ip_prefix *lookup,
1915
  char *rec, struct fts3rec_offsets *fo)
1915
  char *rec, struct fts3rec_offsets *fo)
1916
{
1916
{
1917
  struct ftfil_lookup_ip_prefix_rec *ftflipprr;
1917
  struct ftfil_lookup_ip_prefix_rec *ftflipprr;
1918
  struct radix_node_head *rhead;
1918
  struct radix_node_head *rhead;
1919
  struct radix_sockaddr_in sock1;
1919
  struct radix_sockaddr_in sock1;
Lines 1946-1956 Link Here
1946
 * Evalute ip_src_addr as list
1946
 * Evalute ip_src_addr as list
1947
 *
1947
 *
1948
 * returns: FT_FIL_MODE_PERMIT
1948
 * returns: FT_FIL_MODE_PERMIT
1949
 *          FT_FIL_MODE_DENY
1949
 *          FT_FIL_MODE_DENY
1950
 */
1950
 */
1951
inline int eval_match_ip_src_addr_l(struct ftfil_lookup_ip_mask *lookup,
1951
int eval_match_ip_src_addr_l(struct ftfil_lookup_ip_mask *lookup,
1952
  char *rec, struct fts3rec_offsets *fo)
1952
  char *rec, struct fts3rec_offsets *fo)
1953
{
1953
{
1954
  struct ftfil_lookup_ip_mask_rec *ftflipmr;
1954
  struct ftfil_lookup_ip_mask_rec *ftflipmr;
1955
  u_int32 *ip_src_addr;
1955
  u_int32 *ip_src_addr;
1956
  int match;
1956
  int match;
Lines 1984-1994 Link Here
1984
 * Evalute ip_src_addr as hash
1984
 * Evalute ip_src_addr as hash
1985
 *
1985
 *
1986
 * returns: FT_FIL_MODE_PERMIT
1986
 * returns: FT_FIL_MODE_PERMIT
1987
 *          FT_FIL_MODE_DENY
1987
 *          FT_FIL_MODE_DENY
1988
 */
1988
 */
1989
inline int eval_match_ip_src_addr_h(struct ftfil_lookup_ip_address *lookup,
1989
int eval_match_ip_src_addr_h(struct ftfil_lookup_ip_address *lookup,
1990
  char *rec, struct fts3rec_offsets *fo)
1990
  char *rec, struct fts3rec_offsets *fo)
1991
{
1991
{
1992
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
1992
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
1993
  u_int32 *ip_src_addr, hash;
1993
  u_int32 *ip_src_addr, hash;
1994
  int match;
1994
  int match;
Lines 2018-2028 Link Here
2018
 * Evalute ip_src_addr as hash
2018
 * Evalute ip_src_addr as hash
2019
 *
2019
 *
2020
 * returns: FT_FIL_MODE_PERMIT
2020
 * returns: FT_FIL_MODE_PERMIT
2021
 *          FT_FIL_MODE_DENY
2021
 *          FT_FIL_MODE_DENY
2022
 */
2022
 */
2023
inline int eval_match_ip_src_addr_r(struct ftfil_lookup_ip_prefix *lookup,
2023
int eval_match_ip_src_addr_r(struct ftfil_lookup_ip_prefix *lookup,
2024
  char *rec, struct fts3rec_offsets *fo)
2024
  char *rec, struct fts3rec_offsets *fo)
2025
{
2025
{
2026
  struct ftfil_lookup_ip_prefix_rec *ftflipprr;
2026
  struct ftfil_lookup_ip_prefix_rec *ftflipprr;
2027
  struct radix_node_head *rhead;
2027
  struct radix_node_head *rhead;
2028
  struct radix_sockaddr_in sock1;
2028
  struct radix_sockaddr_in sock1;
Lines 2055-2065 Link Here
2055
 * Evalute ip_dst_addr as list
2055
 * Evalute ip_dst_addr as list
2056
 *
2056
 *
2057
 * returns: FT_FIL_MODE_PERMIT
2057
 * returns: FT_FIL_MODE_PERMIT
2058
 *          FT_FIL_MODE_DENY
2058
 *          FT_FIL_MODE_DENY
2059
 */
2059
 */
2060
inline int eval_match_ip_dst_addr_l(struct ftfil_lookup_ip_mask *lookup,
2060
int eval_match_ip_dst_addr_l(struct ftfil_lookup_ip_mask *lookup,
2061
  char *rec, struct fts3rec_offsets *fo)
2061
  char *rec, struct fts3rec_offsets *fo)
2062
{
2062
{
2063
  struct ftfil_lookup_ip_mask_rec *ftflipmr;
2063
  struct ftfil_lookup_ip_mask_rec *ftflipmr;
2064
  u_int32 *ip_dst_addr;
2064
  u_int32 *ip_dst_addr;
2065
  int match;
2065
  int match;
Lines 2093-2103 Link Here
2093
 * Evalute ip_dst_addr as hash
2093
 * Evalute ip_dst_addr as hash
2094
 *
2094
 *
2095
 * returns: FT_FIL_MODE_PERMIT
2095
 * returns: FT_FIL_MODE_PERMIT
2096
 *          FT_FIL_MODE_DENY
2096
 *          FT_FIL_MODE_DENY
2097
 */
2097
 */
2098
inline int eval_match_ip_dst_addr_h(struct ftfil_lookup_ip_address *lookup,
2098
int eval_match_ip_dst_addr_h(struct ftfil_lookup_ip_address *lookup,
2099
  char *rec, struct fts3rec_offsets *fo)
2099
  char *rec, struct fts3rec_offsets *fo)
2100
{
2100
{
2101
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
2101
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
2102
  u_int32 *ip_dst_addr, hash;
2102
  u_int32 *ip_dst_addr, hash;
2103
  int match;
2103
  int match;
Lines 2127-2137 Link Here
2127
 * Evalute ip_dst_addr as hash
2127
 * Evalute ip_dst_addr as hash
2128
 *
2128
 *
2129
 * returns: FT_FIL_MODE_PERMIT
2129
 * returns: FT_FIL_MODE_PERMIT
2130
 *          FT_FIL_MODE_DENY
2130
 *          FT_FIL_MODE_DENY
2131
 */
2131
 */
2132
inline int eval_match_ip_dst_addr_r(struct ftfil_lookup_ip_prefix *lookup,
2132
int eval_match_ip_dst_addr_r(struct ftfil_lookup_ip_prefix *lookup,
2133
  char *rec, struct fts3rec_offsets *fo)
2133
  char *rec, struct fts3rec_offsets *fo)
2134
{
2134
{
2135
  struct ftfil_lookup_ip_prefix_rec *ftflipprr;
2135
  struct ftfil_lookup_ip_prefix_rec *ftflipprr;
2136
  struct radix_node_head *rhead;
2136
  struct radix_node_head *rhead;
2137
  struct radix_sockaddr_in sock1;
2137
  struct radix_sockaddr_in sock1;
Lines 2164-2174 Link Here
2164
 * Evalute ip_exporter_addr as list
2164
 * Evalute ip_exporter_addr as list
2165
 *
2165
 *
2166
 * returns: FT_FIL_MODE_PERMIT
2166
 * returns: FT_FIL_MODE_PERMIT
2167
 *          FT_FIL_MODE_DENY
2167
 *          FT_FIL_MODE_DENY
2168
 */
2168
 */
2169
inline int eval_match_ip_exporter_addr_l(struct ftfil_lookup_ip_mask *lookup,
2169
int eval_match_ip_exporter_addr_l(struct ftfil_lookup_ip_mask *lookup,
2170
  char *rec, struct fts3rec_offsets *fo)
2170
  char *rec, struct fts3rec_offsets *fo)
2171
{
2171
{
2172
  struct ftfil_lookup_ip_mask_rec *ftflipmr;
2172
  struct ftfil_lookup_ip_mask_rec *ftflipmr;
2173
  u_int32 *ip_exporter_addr;
2173
  u_int32 *ip_exporter_addr;
2174
  int match;
2174
  int match;
Lines 2202-2212 Link Here
2202
 * Evalute ip_exporter_addr as hash
2202
 * Evalute ip_exporter_addr as hash
2203
 *
2203
 *
2204
 * returns: FT_FIL_MODE_PERMIT
2204
 * returns: FT_FIL_MODE_PERMIT
2205
 *          FT_FIL_MODE_DENY
2205
 *          FT_FIL_MODE_DENY
2206
 */
2206
 */
2207
inline int eval_match_ip_exporter_addr_h(struct ftfil_lookup_ip_address *lookup,
2207
int eval_match_ip_exporter_addr_h(struct ftfil_lookup_ip_address *lookup,
2208
  char *rec, struct fts3rec_offsets *fo)
2208
  char *rec, struct fts3rec_offsets *fo)
2209
{
2209
{
2210
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
2210
  struct ftchash_rec_fil_c32 *ftch_recfc32p;
2211
  u_int32 *ip_exporter_addr, hash;
2211
  u_int32 *ip_exporter_addr, hash;
2212
  int match;
2212
  int match;
Lines 2236-2246 Link Here
2236
 * Evalute ip_exporter_addr as hash
2236
 * Evalute ip_exporter_addr as hash
2237
 *
2237
 *
2238
 * returns: FT_FIL_MODE_PERMIT
2238
 * returns: FT_FIL_MODE_PERMIT
2239
 *          FT_FIL_MODE_DENY
2239
 *          FT_FIL_MODE_DENY
2240
 */
2240
 */
2241
inline int eval_match_ip_exporter_addr_r(struct ftfil_lookup_ip_prefix *lookup,
2241
int eval_match_ip_exporter_addr_r(struct ftfil_lookup_ip_prefix *lookup,
2242
  char *rec, struct fts3rec_offsets *fo)
2242
  char *rec, struct fts3rec_offsets *fo)
2243
{
2243
{
2244
  struct ftfil_lookup_ip_prefix_rec *ftflipprr;
2244
  struct ftfil_lookup_ip_prefix_rec *ftflipprr;
2245
  struct radix_node_head *rhead;
2245
  struct radix_node_head *rhead;
2246
  struct radix_sockaddr_in sock1;
2246
  struct radix_sockaddr_in sock1;
Lines 2273-2283 Link Here
2273
 * Evalute Bits Per Second
2273
 * Evalute Bits Per Second
2274
 *
2274
 *
2275
 * returns: FT_FIL_MODE_PERMIT
2275
 * returns: FT_FIL_MODE_PERMIT
2276
 *          FT_FIL_MODE_DENY
2276
 *          FT_FIL_MODE_DENY
2277
 */
2277
 */
2278
inline int eval_match_bps(struct ftfil_lookup_double *lookup, char *rec,
2278
int eval_match_bps(struct ftfil_lookup_double *lookup, char *rec,
2279
  struct fts3rec_offsets *fo)
2279
  struct fts3rec_offsets *fo)
2280
{
2280
{
2281
  struct ftfil_lookup_double_rec *ftfldr;
2281
  struct ftfil_lookup_double_rec *ftfldr;
2282
  double bps;
2282
  double bps;
2283
  u_int32 dOctets, Last, First, duration;
2283
  u_int32 dOctets, Last, First, duration;
Lines 2347-2357 Link Here
2347
 * Evalute Packets Per Second
2347
 * Evalute Packets Per Second
2348
 *
2348
 *
2349
 * returns: FT_FIL_MODE_PERMIT
2349
 * returns: FT_FIL_MODE_PERMIT
2350
 *          FT_FIL_MODE_DENY
2350
 *          FT_FIL_MODE_DENY
2351
 */
2351
 */
2352
inline int eval_match_pps(struct ftfil_lookup_double *lookup, char *rec,
2352
int eval_match_pps(struct ftfil_lookup_double *lookup, char *rec,
2353
  struct fts3rec_offsets *fo)
2353
  struct fts3rec_offsets *fo)
2354
{
2354
{
2355
  struct ftfil_lookup_double_rec *ftfldr;
2355
  struct ftfil_lookup_double_rec *ftfldr;
2356
  double pps;
2356
  double pps;
2357
  u_int32 dPkts, Last, First, duration;
2357
  u_int32 dPkts, Last, First, duration;
Lines 2421-2431 Link Here
2421
 * Evalute random_sample
2421
 * Evalute random_sample
2422
 *
2422
 *
2423
 * returns: FT_FIL_MODE_PERMIT
2423
 * returns: FT_FIL_MODE_PERMIT
2424
 *          FT_FIL_MODE_DENY
2424
 *          FT_FIL_MODE_DENY
2425
 */
2425
 */
2426
inline int eval_match_random_sample(struct ftfil_lookup_rate *lookup, char *rec,
2426
int eval_match_random_sample(struct ftfil_lookup_rate *lookup, char *rec,
2427
  struct fts3rec_offsets *fo)
2427
  struct fts3rec_offsets *fo)
2428
{
2428
{
2429
  int val;
2429
  int val;
2430
2430
2431
  /* val is a random number from 0..lookup->rate-1 */
2431
  /* val is a random number from 0..lookup->rate-1 */

Return to bug 216317