def get_value_from_packet_for_layer_field(packet, layer, field):
    """
        Gets the value from the packet for the specified 'layer' and 'field'

        Args:
            packet: The packet where you'll be retrieving the value from
            layer: The layer that contains the field
            field: The field that contains the value

        Returns:
            the value at packet[layer][key] or None
            or None, if any of the arguments are None
    """
    if not packet or not layer or not field:
        return None
    for current_layer in packet.layers:
        if layer == current_layer.__dict__['_layer_name'
            ] and current_layer.__dict__['_all_fields']:
            return current_layer.__dict__['_all_fields'][field]
    return None
