utils/labeler.py
def checkIPsEqual(ip1, ip2):
    """Check if two IP addresses are equal, may be wildcard for last byte
    Inputs:
      - ip1 and ip2 : two IP addresses as strings
    """
    ip1_vals = ip1.split(".")
    ip2_vals = ip2.split(".")
    if len(ip1_vals) != 4 and len(ip2_vals) != 4:
        print("ERROR: checkIPsEqual: invalid IP address", file=sys.stderr)
        sys.exit(1)
    if ip1_vals[3] == "*" or ip2_vals[3] == "*":
        ip1_vals = list(map(int, ip1_vals[0:3]))
        ip2_vals = list(map(int, ip2_vals[0:3]))
    else:
        ip1_vals = list(map(int, ip1_vals))
        ip2_vals = list(map(int, ip2_vals))
    return ip1_vals == ip2_vals
Check if two IP addresses are equal, may be wildcard for last byte
    Inputs:
      - ip1 and ip2 : two IP addresses as strings
    
Check if two IP addresses are equal, may be wildcard for last byte
Inputs:
ip1 and ip2 : two IP addresses as strings
Check if two IP addresses are equal may be wildcard for last byte Inputs : ip1 and ip2 : two IP addresses as strings
def checkIPsEqual(ip1, ip2):
    ip1_vals = ip1.split(".")
    ip2_vals = ip2.split(".")
    if len(ip1_vals) != 4 and len(ip2_vals) != 4:
        print("ERROR: checkIPsEqual: invalid IP address", file=sys.stderr)
        sys.exit(1)
    if ip1_vals[3] == "*" or ip2_vals[3] == "*":
        ip1_vals = list(map(int, ip1_vals[0:3]))
        ip2_vals = list(map(int, ip2_vals[0:3]))
    else:
        ip1_vals = list(map(int, ip1_vals))
        ip2_vals = list(map(int, ip2_vals))
    return ip1_vals == ip2_vals
def checkIPsEqual ( ip1 , ip2 ) : ip1_vals = ip1 . split ( "." ) ip2_vals = ip2 . split ( "." ) if len ( ip1_vals ) != 4 and len ( ip2_vals ) != 4 : print ( "ERROR: checkIPsEqual: invalid IP address" , file = sys . stderr ) sys . exit ( 1 ) if ip1_vals [ 3 ] == "*" or ip2_vals [ 3 ] == "*" : ip1_vals = list ( map ( int , ip1_vals [ 0 : 3 ] ) ) ip2_vals = list ( map ( int , ip2_vals [ 0 : 3 ] ) ) else : ip1_vals = list ( map ( int , ip1_vals ) ) ip2_vals = list ( map ( int , ip2_vals ) ) return ip1_vals == ip2_vals
Check if two IP addresses are equal, may be wildcard for last byte
Inputs:
 ip1 and ip2 : two IP addresses as strings
Check if two IP addresses are equal may be wildcard for last byte Inputs : ip1 and ip2 : two IP addresses as strings
"""Check if two IP addresses are equal, may be wildcard for last byte
    Inputs:
      - ip1 and ip2 : two IP addresses as strings
    """
ip1
ip2