"Fossies" - the Fresh Open Source Software Archive

Member "snort-2.9.17/src/preprocessors/HttpInspect/include/hi_include.h" (16 Oct 2020, 2618 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 "hi_include.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  *
    3  * Copyright (C) 2014-2020 Cisco and/or its affiliates. All rights reserved.
    4  * Copyright (C) 2003-2013 Sourcefire, Inc.
    5  *
    6  * This program is free software; you can redistribute it and/or modify
    7  * it under the terms of the GNU General Public License Version 2 as
    8  * published by the Free Software Foundation.  You may not use, modify or
    9  * distribute this program under any other version of the GNU General
   10  * Public License.
   11  *
   12  * This program is distributed in the hope that it will be useful,
   13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15  * GNU General Public License for more details.
   16  *
   17  * You should have received a copy of the GNU General Public License
   18  * along with this program; if not, write to the Free Software
   19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
   20  *
   21  ****************************************************************************/
   22 
   23 #ifndef __HI_INCLUDE_H__
   24 #define __HI_INCLUDE_H__
   25 
   26 #include "sf_types.h"
   27 #include "snort_debug.h"
   28 #include "ipv6_port.h"
   29 
   30 #define HI_UNKNOWN_METHOD 1
   31 #define HI_POST_METHOD 2
   32 #define HI_GET_METHOD 4
   33 
   34 typedef struct _hi_stats {
   35     uint64_t unicode;
   36     uint64_t double_unicode;
   37     uint64_t non_ascii;        /* Non ASCII-representable character in URL */
   38     uint64_t dir_trav;         /* '../' */
   39     uint64_t slashes;          /* '//' */
   40     uint64_t self_ref;         /* './' */
   41     uint64_t post;             /* Number of POST methods encountered */
   42     uint64_t get;              /* Number of GETs */
   43     uint64_t post_params;      /* Number of successfully extract post parameters */
   44     uint64_t req_headers;      /* Number of successfully extracted request headers */
   45     uint64_t resp_headers;     /* Number of successfully extracted response headers */
   46 #ifdef DEBUG
   47     uint64_t req_header_len;
   48     uint64_t resp_header_len;
   49 #endif
   50     uint64_t req_cookies;          /* Number of successfully extracted request cookies */
   51     uint64_t resp_cookies;         /* Number of successfully extracted response cookies */
   52 #ifdef DEBUG
   53     uint64_t req_cookie_len;
   54     uint64_t resp_cookie_len;
   55 #endif
   56     uint64_t total;
   57     uint64_t gzip_pkts;
   58     uint64_t compr_bytes_read;
   59     uint64_t decompr_bytes_read;
   60     uint64_t h2_rebuilt_packets;
   61     uint64_t mem_used;
   62     uint64_t session_count;
   63 } HIStats;
   64 
   65 extern HIStats hi_stats;
   66 
   67 #ifndef inline
   68 
   69 #ifdef WIN32
   70 #define inline __inline
   71 #else
   72 #define inline inline
   73 #endif
   74 #endif /* endif for inline */
   75 
   76 #endif