def discover_all_fields_that_match_value(packet, value):
    """
        Builds a dictionary, with each layer name as a key, containing a list
        of each field, in that layer, that matches the value exactly

        Args:
            packet: a single packet, that will be inspected
            value: the value that all fields in the packet will be inspected for.

        Returns:
            a dictionary of lists
            or None, if any of the arguments are None
            example:
                {'http': ['http.request.uri']}
    """
    if not packet or not value:
        return None
    matches = {}
    for current_layer in packet.layers:
        fields = current_layer.__dict__['_all_fields']
        layer_name = current_layer.__dict__['_layer_name']
        for field in fields:
            if value == fields[field]:
                if layer_name not in matches:
                    matches[layer_name] = []
                matches[layer_name].append(field)
    return matches
