mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 04:28:20 +00:00
Initial import of svn+ssh:://svn.icir.org/bro/trunk/bro as of r7088
This commit is contained in:
commit
61757ac78b
1383 changed files with 380824 additions and 0 deletions
36
src/BitTorrent.h
Normal file
36
src/BitTorrent.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
// $Id:$
|
||||
//
|
||||
// This code contributed by Nadi Sarrar.
|
||||
|
||||
#ifndef bittorrent_h
|
||||
#define bittorrent_h
|
||||
|
||||
#include "TCP.h"
|
||||
|
||||
#include "bittorrent_pac.h"
|
||||
|
||||
class BitTorrent_Analyzer : public TCP_ApplicationAnalyzer {
|
||||
public:
|
||||
BitTorrent_Analyzer(Connection* conn);
|
||||
virtual ~BitTorrent_Analyzer();
|
||||
|
||||
virtual void Done();
|
||||
virtual void DeliverStream(int len, const u_char* data, bool orig);
|
||||
virtual void Undelivered(int seq, int len, bool orig);
|
||||
virtual void EndpointEOF(TCP_Reassembler* endp);
|
||||
|
||||
static Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new BitTorrent_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return bittorrent_peer_handshake || bittorrent_peer_piece; }
|
||||
|
||||
protected:
|
||||
void DeliverWeird(const char* msg, bool orig);
|
||||
|
||||
binpac::BitTorrent::BitTorrent_Conn* interp;
|
||||
bool stop_orig, stop_resp;
|
||||
uint64 stream_len_orig, stream_len_resp;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue