Changeset 54 for trunk/tool

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

add the comparaison with fields 7 and 11 (ports)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tool/renetcolGUI_0_0_7.py

    r50 r54  
    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\nIPV4_SRC_ADDR: 8\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\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) 
    600600            coll_frame2 = gtk.Frame("Disable rules") 
    601601            coll_vbox.pack_start(coll_frame2, False, False, 5) 
     
    760760                if (int(value) < 256): 
    761761                    is_good = 1 
     762                else: 
     763                    check_dialog( widget, None, "Wrong value, must be <256!") 
     764                    is_good = 0 
    762765            if (field=='1'): 
    763766                if (int(value) < 4294967295): 
    764767                    is_good = 1 
     768                else: 
     769                    check_dialog( widget, None, "Wrong value, must be <4294967295!") 
     770                    is_good = 0 
     771            if (field=='7' or field=='11'): 
     772                if (int(value) < 65536): 
     773                    is_good = 1 
     774                else: 
     775                    check_dialog( widget, None, "Wrong value, must be <65536!") 
     776                    is_good = 0 
    765777            if (is_good==1): 
    766778                ##collPrefix = adip & mask[1] 
     
    9971009    print "---------------------------------------------------------------" 
    9981010    print "In this version 0.0.7, you can apply rules on the collector based on the following fields:" 
     1011    print "L4_SRC_PORT: 7," 
    9991012    print "IPV4_SRC_ADDR: 8," 
     1013    print "L4_DST_PORT: 11," 
    10001014    print "IPV4_DST_ADDR: 12," 
    10011015    print "IPV4_NEXT_HOP: 15,"