Show
Ignore:
Timestamp:
09/10/07 15:47:51 (15 years ago)
Author:
andreu
Message:

addadd the comparaison with fields 10 and 14 (snmp index)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tool/renetcolGUI_0_0_7.py

    r54 r55  
    597597            coll_pbbox = gtk.HButtonBox() 
    598598            coll_hbox.pack_start(coll_pbbox, False, True, 5) 
    599             prefix_entry(45, "Required Format : \n <field> <operation> <address>\nlike 8 = 10.0.0.1 \nor 8 = 10.0.1.0/24 \nor 27 = 2001::1 \nor 27 = 2001::/64 (IPv6 address only on Linux system)\nonly '=' operator for the moment\n------------------------------\nIn this version 0.0.7, you can compare the following fields:\nROUTER_SRC_ADDR: 0\nIN_BYTES: 1\nL4_SRC_PORT: 7\nIPV4_SRC_ADDR: 8\nL4_DST_PORT: 11\nIPV4_DST_ADDR: 12\nIPV4_NEXT_HOP: 15\nBGP_IPV4_NEXT_HOP: 18\nIPV6_SRC_ADDR: 27\nIPV6_DST_ADDR: 28\nIPV6_NEXT_HOP: 62\nBPG_IPV6_NEXT_HOP: 63\nIP_PROTOCOL_VERSION: 60\n---------------------------", coll_pbbox, "", 0) 
     599            prefix_entry(45, "Required Format : \n <field> <operation> <address>\nlike 8 = 10.0.0.1 \nor 8 = 10.0.1.0/24 \nor 27 = 2001::1 \nor 27 = 2001::/64 (IPv6 address only on Linux system)\nonly '=' operator for the moment\n------------------------------\nIn this version 0.0.7, you can compare the following fields:\nROUTER_SRC_ADDR: 0\nIN_BYTES: 1\nL4_SRC_PORT: 7\nIPV4_SRC_ADDR: 8\nINPUT_SNMP: 10\nL4_DST_PORT: 11\nIPV4_DST_ADDR: 12\nOUTPUT_SNMP: 14\nIPV4_NEXT_HOP: 15\nBGP_IPV4_NEXT_HOP: 18\nIPV6_SRC_ADDR: 27\nIPV6_DST_ADDR: 28\nIPV6_NEXT_HOP: 62\nBPG_IPV6_NEXT_HOP: 63\nIP_PROTOCOL_VERSION: 60\n---------------------------", coll_pbbox, "", 0) 
    600600            coll_frame2 = gtk.Frame("Disable rules") 
    601601            coll_vbox.pack_start(coll_frame2, False, False, 5) 
     
    761761                    is_good = 1 
    762762                else: 
    763                     check_dialog( widget, None, "Wrong value, must be <256!") 
     763                    check_dialog( widget, None, "Wrong value, must be < 256 !") 
    764764                    is_good = 0 
    765765            if (field=='1'): 
     
    767767                    is_good = 1 
    768768                else: 
    769                     check_dialog( widget, None, "Wrong value, must be <4294967295!") 
     769                    check_dialog( widget, None, "Wrong value, must be < 4294967295 !") 
    770770                    is_good = 0 
    771771            if (field=='7' or field=='11'): 
     
    773773                    is_good = 1 
    774774                else: 
    775                     check_dialog( widget, None, "Wrong value, must be <65536!") 
     775                    check_dialog( widget, None, "Wrong value, must be < 65536 !") 
    776776                    is_good = 0 
     777            if (field=='10' or field=='14'): 
     778                if (int(value) < 65536): 
     779                    is_good = 1 
     780                else: 
     781                    check_dialog( widget, None, "Wrong value, must be < 65536 !") 
     782                    is_good = 0                     
    777783            if (is_good==1): 
    778784                ##collPrefix = adip & mask[1] 
     
    10111017    print "L4_SRC_PORT: 7," 
    10121018    print "IPV4_SRC_ADDR: 8," 
     1019    print "INPUT_SNMP: 10," 
    10131020    print "L4_DST_PORT: 11," 
    10141021    print "IPV4_DST_ADDR: 12," 
     1022    print "OUTPUT_SNMP: 14," 
    10151023    print "IPV4_NEXT_HOP: 15," 
    10161024    print "BGP_IPV4_NEXT_HOP: 18,"