def flags_as_list(decimal_flags,tcpflags):
	""" return a list of the bits in the TCP flags field, given the field as decimal"""
	if len(tcpflags) == 8:
		formatter = '{:08b}'
	else:
		formatter = '{:09b}'
	return [int(n) for n in list(formatter.format(decimal_flags))]