Changeset 38 for tags

Show
Ignore:
Timestamp:
05/22/07 02:20:09 (16 years ago)
Author:
andreu
Message:

ticket #9 correction

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • tags/REL-0.0.9beta/trunk/tool/renetcolGUI_0_0_7.py

    r37 r38  
    152152        global firstParseValue, checkUpValues, tpl_def 
    153153        res = 1 
     154        ctrl = 0 
     155        portS = 0 
     156        portD = 0 
    154157        for i in range (0, len(tpl_def[self.flow[0]])): 
    155158            f = tpl_def[self.flow[0]][i][0] 
     
    158161            elif ( i==27 or i==28 ): 
    159162                pass 
     163            elif ( f==7 ) and ( checkUpValues[f]==1 ): 
     164                if (ctrl == 1):                    
     165                    res = res & (((self.flow[1][i] >= firstParseValue[f])&(self.flow[1][i] <= firstParseValue[11])) or ((portD >= firstParseValue[f])&(portD <= firstParseValue[11]))) 
     166                else: 
     167                    ctrl = 1 
     168                    portS = self.flow[1][i] 
     169            elif ( f==11 ) and ( checkUpValues[f]==1 ): 
     170                if (ctrl == 1): 
     171                    res = res & (((self.flow[1][i] <= firstParseValue[f])&(self.flow[1][i] >= firstParseValue[7])) or ((portS >= firstParseValue[7])&(portS <= firstParseValue[f]))) 
     172                else: 
     173                    ctrl = 1 
     174                    portD = self.flow[1][i] 
    160175            elif (checkUpValues[f]==1): 
    161176                res = res & (self.flow[1][i] == firstParseValue[f]) 
     
    915930        if ( entry_text==""): 
    916931            checkUpValues[7] = 0 
     932            checkUpValues[11] = 0 
    917933        else: 
    918934            port_list = string.split(entry_text) 
     
    923939                firstParseValue[11] = int(port_list[1]) 
    924940                checkUpValues[7] = 1 
     941                checkUpValues[11] = 1 
    925942    if id == 11: ## tcp flags 
    926943        if ( entry_text==""): 
     
    11391156    hbox.pack_start(tbbox, False, True, 5) 
    11401157    create_entry(2, "Required Format : a number less than 99", tbbox, "Time :", 8) 
    1141     create_entry(11, "Required Format : a range, each number less than 65535 and space as separator: \"6881 6889\"", tbbox, "Port :", 9) 
     1158    create_entry(11, "Port Source or Destination selection, required Format : a range, each number less than 65535 and space as separator: \"6881 6889\"", tbbox, "Port :", 9) 
    11421159    #create_entry(5, "Required Format : a number less than 65535", tbbox, "Dst port :", 10) 
    11431160    create_entry(3, "Required Format : a number less than 255", tbbox, "TCP Flag :", 11)