LCOV - code coverage report
Current view: top level - src - UDP.h (source / functions) Hit Total Coverage
Test: app.info Lines: 1 4 25.0 %
Date: 2010-12-13 Functions: 1 3 33.3 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // $Id: UDP.h 6219 2008-10-01 05:39:07Z vern $
       2                 :            : //
       3                 :            : // See the file "COPYING" in the main distribution directory for copyright.
       4                 :            : 
       5                 :            : #ifndef udp_h
       6                 :            : #define udp_h
       7                 :            : 
       8                 :            : #include "Analyzer.h"
       9                 :            : #include "Rewriter.h"
      10                 :            : 
      11                 :            : class UDP_Rewriter;
      12                 :            : 
      13                 :            : typedef enum {
      14                 :            :         UDP_INACTIVE,   // no packet seen
      15                 :            :         UDP_ACTIVE,     // packets seen
      16                 :            : } UDP_EndpointState;
      17                 :            : 
      18                 :            : class UDP_Analyzer : public TransportLayerAnalyzer {
      19                 :            : public:
      20                 :            :         UDP_Analyzer(Connection* conn);
      21                 :            :         virtual ~UDP_Analyzer();
      22                 :            : 
      23                 :            :         virtual void Init();
      24                 :            : 
      25                 :          0 :         static Analyzer* InstantiateAnalyzer(Connection* conn)
      26                 :          0 :                 { return new UDP_Analyzer(conn); }
      27                 :            : 
      28                 :          1 :         static bool Available() { return true; }
      29                 :            : 
      30                 :            :         // -- XXX -- only want to return yes if the protocol flag is
      31                 :            :         //  on similar to TCP. (e.g. FTP_Connection etc.) /mc
      32                 :          0 :         int RewritingTrace() const      { return 0; }
      33                 :            : 
      34                 :            : protected:
      35                 :            :         virtual void Done();
      36                 :            :         virtual void DeliverPacket(int len, const u_char* data, bool orig,
      37                 :            :                                         int seq, const IP_Hdr* ip, int caplen);
      38                 :            :         virtual void UpdateEndpointVal(RecordVal* endp, int is_orig);
      39                 :            :         virtual bool IsReuse(double t, const u_char* pkt);
      40                 :            :         virtual unsigned int MemoryAllocation() const;
      41                 :            : 
      42                 :            :         bro_int_t request_len, reply_len;
      43                 :            : 
      44                 :            : #define HIST_ORIG_DATA_PKT 0x1
      45                 :            : #define HIST_RESP_DATA_PKT 0x2
      46                 :            : #define HIST_ORIG_CORRUPT_PKT 0x4
      47                 :            : #define HIST_RESP_CORRUPT_PKT 0x8
      48                 :            : };
      49                 :            : 
      50                 :            : #endif

Generated by: LCOV version 1.8