def get_ip_parameters(ip_layer):
	"""
	Extract the ip parameters that are relevant to OS detection from an IP layer
	:param ip_layer: an IP packet (scapy.layers.inet.IP)
	:return: tuple - ip parameters. (df, ttl)
	"""
	if ip_layer is None:
		return None
	df = int(format(ip_layer.flags.value, "03b")[1])
	ttl = ip_layer.ttl
	return df, ttl