pypacker directory structure
============================

pypacker
	examples		# usage examples for pypacker
	pypacker		# pypacker core logic, routines for handling packet-data, protocols sorted by layers
		layer12		# protocols for ISO/OSI-layer 1 and 2. The name of the module
				# is the same as the main class in this module.
		layer3		# ...for layer 3
		layer4		# ...for layer 4
		layer567	# ...for layer 5, 6 and 7
	tests			# tests for pypacker logic and protocols


Development process
===================
Add new code -> add Tests -> QA via "./switch_setup.sh stable" -> PR


Styleguide
==========

- All official Python style-guidelines *should* be applied except the
  preference of space-characters. Tabs must be used throughout
  the code:

	GLOBAL_XYZ[tab]= 123  # some comment

	class someclass()
	# some comment
		[tab]def xyz(self):
			[tab][tab]# Some comment
			[tab][tab]var1 = 123  # some comment
			[tab][tab]pass

- QA config (pep8, flake8, pylint): see qa_config.txt
Explanation:
	W191: Spaces enforced? -> We use TABS!
	E128: continuation line under-indented for visual indent -> Looks sh$§
	E223: tab before operator -> yep, we use tabs
	E265: "#some comment" is ok -> it's readable

- Auto-update header should only be recalculated if VARNAME_au_active is True
- Strings are written using double quotes like "string_xyz"
- Constant names are written in the format [High level: Class/Topic]_[Low level: Descriptive name] like ICMP_ECHO_REPLY (see layer3/icmp.py)
- Readability is more important than performance
- Avoid overwriting "__getattribute__"


Adding new protocols
====================

See examples/examples_new_protocol.py and pypacker/pypacker.Packet for more informations on creating new protocols.
Every Protocol needs a testcase in tests/test_pypacker.py
