"Fossies" - the Fresh Open Source Software Archive

Member "snort-2.9.17/src/dynamic-preprocessors/dcerpc2/dce2_stats.h" (16 Oct 2020, 4669 Bytes) of package /linux/misc/snort-2.9.17.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "dce2_stats.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.9.16.1_vs_2.9.17.

    1 /****************************************************************************
    2  * Copyright (C) 2014-2020 Cisco and/or its affiliates. All rights reserved.
    3  * Copyright (C) 2008-2013 Sourcefire, Inc.
    4  *
    5  * This program is free software; you can redistribute it and/or modify
    6  * it under the terms of the GNU General Public License Version 2 as
    7  * published by the Free Software Foundation.  You may not use, modify or
    8  * distribute this program under any other version of the GNU General
    9  * Public License.
   10  *
   11  * This program is distributed in the hope that it will be useful,
   12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   14  * GNU General Public License for more details.
   15  *
   16  * You should have received a copy of the GNU General Public License
   17  * along with this program; if not, write to the Free Software
   18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
   19  *
   20  ****************************************************************************
   21  * 
   22  ****************************************************************************/
   23 
   24 #ifndef _DCE2_STATS_H_
   25 #define _DCE2_STATS_H_
   26 
   27 #include "dce2_utils.h"
   28 #include "smb.h"
   29 #include "sf_types.h"
   30 
   31 /********************************************************************
   32  * Structures
   33  ********************************************************************/
   34 typedef struct _DCE2_Stats
   35 {
   36     uint64_t sessions;
   37     uint64_t sessions_active;
   38     uint64_t sessions_autodetected;
   39     uint64_t sessions_aborted;
   40     uint64_t bad_autodetects;
   41     uint64_t events;
   42 
   43 #ifdef DEBUG
   44     uint64_t autoports[65535][DCE2_TRANS_TYPE__MAX];
   45 #endif
   46 
   47     uint64_t smb_sessions;
   48     uint64_t smb_pkts;
   49     uint64_t smb_ignored_bytes;
   50     uint64_t smb_cli_seg_reassembled;
   51     uint64_t smb_srv_seg_reassembled;
   52     uint64_t smb_max_outstanding_requests;
   53 
   54     uint64_t smb_com_stats[2][SMB_MAX_NUM_COMS];
   55     uint64_t smb_chained_stats[2][SMB_ANDX_COM__MAX][SMB_MAX_NUM_COMS];
   56     // The +1 is for codes beyond the range of the highest valid subcommand code
   57     // Indicates a bogus subcommand 
   58     uint64_t smb_trans_subcom_stats[2][TRANS_SUBCOM_MAX+1];
   59     uint64_t smb_trans2_subcom_stats[2][TRANS2_SUBCOM_MAX+1];
   60     uint64_t smb_nt_transact_subcom_stats[2][NT_TRANSACT_SUBCOM_MAX+1];
   61 
   62     uint64_t smb_files_processed;
   63 
   64     uint64_t tcp_sessions;
   65     uint64_t tcp_pkts;
   66 
   67     uint64_t udp_sessions;
   68     uint64_t udp_pkts;
   69 
   70     uint64_t http_proxy_sessions;
   71     uint64_t http_proxy_pkts;
   72 
   73     uint64_t http_server_sessions;
   74     uint64_t http_server_pkts;
   75 
   76     uint64_t co_pdus;
   77     uint64_t co_bind;
   78     uint64_t co_bind_ack;
   79     uint64_t co_alter_ctx;
   80     uint64_t co_alter_ctx_resp;
   81     uint64_t co_bind_nack;
   82     uint64_t co_request;
   83     uint64_t co_response;
   84     uint64_t co_cancel;
   85     uint64_t co_orphaned;
   86     uint64_t co_fault;
   87     uint64_t co_auth3;
   88     uint64_t co_shutdown;
   89     uint64_t co_reject;
   90     uint64_t co_ms_pdu;
   91     uint64_t co_other_req;
   92     uint64_t co_other_resp;
   93     uint64_t co_req_fragments;
   94     uint64_t co_resp_fragments;
   95     uint64_t co_cli_max_frag_size;
   96     uint64_t co_cli_min_frag_size;
   97     uint64_t co_cli_seg_reassembled;
   98     uint64_t co_cli_frag_reassembled;
   99     uint64_t co_srv_max_frag_size;
  100     uint64_t co_srv_min_frag_size;
  101     uint64_t co_srv_seg_reassembled;
  102     uint64_t co_srv_frag_reassembled;
  103 
  104     uint64_t cl_pkts;
  105     uint64_t cl_request;
  106     uint64_t cl_ack;
  107     uint64_t cl_cancel;
  108     uint64_t cl_cli_fack;
  109     uint64_t cl_ping;
  110     uint64_t cl_response;
  111     uint64_t cl_reject;
  112     uint64_t cl_cancel_ack;
  113     uint64_t cl_srv_fack;
  114     uint64_t cl_fault;
  115     uint64_t cl_nocall;
  116     uint64_t cl_working;
  117     uint64_t cl_other_req;
  118     uint64_t cl_other_resp;
  119     uint64_t cl_fragments;
  120     uint64_t cl_max_frag_size;
  121     uint64_t cl_frag_reassembled;
  122     uint64_t cl_max_seqnum;
  123 
  124     /* SMB2 stats */
  125     uint64_t smb2_prunes;
  126     uint64_t smb2_memory_in_use;
  127     uint64_t smb2_memory_in_use_max;
  128     uint64_t smb2_create;
  129     uint64_t smb2_write;
  130     uint64_t smb2_read;
  131     uint64_t smb2_set_info;
  132     uint64_t smb2_tree_connect;
  133     uint64_t smb2_tree_disconnect;
  134     uint64_t smb2_close;
  135 
  136 } DCE2_Stats;
  137 
  138 /********************************************************************
  139  * Extern variables
  140  ********************************************************************/
  141 extern DCE2_Stats dce2_stats;
  142 extern char **dce2_trans_strs;
  143 
  144 /********************************************************************
  145  * Public function prototypes
  146  ********************************************************************/
  147 void DCE2_StatsInit(void);
  148 void DCE2_StatsFree(void);
  149 
  150 #endif  /* _DCE2_STATS_H_ */
  151