C# Класс SessionViewer.PacketReconstructor

Attempt to try and reconstruct the data portion of a TCP session. We will try and handle duplicates, TCP fragments, and out of order packets in a smart way.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddPacketProcessor ( InterfacePacketParser processor ) : void

Dispose ( ) : void

PacketReconstructor ( string outputPath, long maxSize ) : System

ReassemblePacket ( PcapDotNet packet ) : void

The main function of the class receives a tcp packet and reconstructs the stream

SetPacketParsers ( List parsers ) : void

Приватные методы

Метод Описание
CheckFragments ( long net_src, long net_dst, uint srcport, uint dstport, int index, System.DateTime timestamp, uint acknowledged ) : bool

Search through all the frag we have collected to see if one fits

ReassembleTcp ( ulong sequence, uint acknowledgement, ulong length, byte data, ulong data_length, bool synflag, long net_src, long net_dst, uint srcport, uint dstport, System.DateTime timestamp ) : void

Reconstructs the tcp session

ReassembleUdp ( ulong length, byte data, ulong data_length, long net_src, long net_dst, uint srcport, uint dstport, System.DateTime timestamp ) : int

Reconstructs the tcp session

Reset ( ) : void

Cleans the linked list

SavePacketData ( long net_src, long net_dst, uint srcport, uint dstport, int index, byte data, System.DateTime timestamp ) : void

Writes the payload data to the database

Описание методов

AddPacketProcessor() публичный Метод

public AddPacketProcessor ( InterfacePacketParser processor ) : void
processor InterfacePacketParser
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

PacketReconstructor() публичный Метод

public PacketReconstructor ( string outputPath, long maxSize ) : System
outputPath string
maxSize long
Результат System

ReassemblePacket() публичный Метод

The main function of the class receives a tcp packet and reconstructs the stream
public ReassemblePacket ( PcapDotNet packet ) : void
packet PcapDotNet
Результат void

SetPacketParsers() публичный Метод

public SetPacketParsers ( List parsers ) : void
parsers List
Результат void