gsathya/htpt — pull request #33 by ben-jones (2014-03-20 13:46:41+00:00)
Title: Frame refactor

Initial refactoring for the framing and buffer code. This code makes the interface cleaner and resolves some bugs. This is a partial solution to issue 28

## Changes
buffer.py:
1. correctly sets the min and max seq number for the window. This resolves several bugs related to how data is queued in the buffer.
2. added functionality to let the buffer start numbering at an arbitrary sequence number

frame.py:
1. Refactored SeqNum and SessionID to use class methods. This establishes more consistency in the sequence numbers and ensures that the SessionIDs will be unique for the server when the server generates them. This code may need to be adjusted to support multiple sequence numbers on the server side.
2. Split some of the functionality of Dissambler.retrieveHeaders() out of the function. Added a module function which will split the headers up and which allows the headers to be examined without changing the state of a Disassembler.
3. Moved initServerConnection out of the Disassembler so that it can return an assembler and a dissassembler if the connection correctly authenticates.

## Functionality still to be added:
Make use of flags, specifically SYN and MORE