"Fossies" - the Fresh Open Source Software Archive

Member "snort-2.9.17/src/dynamic-preprocessors/s7commplus/s7comm_roptions.h" (16 Oct 2020, 2066 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 "s7comm_roptions.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * This program is free software; you can redistribute it and/or modify
    3  * it under the terms of the GNU General Public License Version 2 as
    4  * published by the Free Software Foundation.  You may not use, modify or
    5  * distribute this program under any other version of the GNU General
    6  * Public License.
    7  *
    8  * This program is distributed in the hope that it will be useful,
    9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   11  * GNU General Public License for more details.
   12  *
   13  * You should have received a copy of the GNU General Public License
   14  * along with this program; if not, write to the Free Software
   15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
   16  *
   17  * Copyright (C) 2020-2020 Cisco and/or its affiliates. All rights reserved.
   18  *
   19  * Authors: Jeffrey Gu <jgu@cisco.com>, Pradeep Damodharan <prdamodh@cisco.com>
   20  *
   21  * Rule options for S7commplus preprocessor.
   22  *
   23  */
   24 
   25 #ifndef S7COMM_ROPTIONS_H
   26 #define S7COMM_ROPTIONS_H
   27 
   28 #include <stdint.h>
   29 
   30 #define S7COMMPLUS_OPCODE_NAME  "s7commplus_opcode"
   31 #define S7COMMPLUS_FUNC_NAME    "s7commplus_func"
   32 #define S7COMMPLUS_CONTENT_NAME "s7commplus_content"
   33 
   34 /* Data types */
   35 typedef enum _s7commplus_option_type_t
   36 {
   37     S7COMMPLUS_OPCODE = 0,
   38     S7COMMPLUS_FUNC,
   39     S7COMMPLUS_CONTENT
   40 } s7commplus_option_type_t;
   41 
   42 typedef struct _s7commplus_option_data_t
   43 {
   44     s7commplus_option_type_t type;
   45     uint16_t arg;
   46 } s7commplus_option_data_t;
   47 
   48 typedef struct _s7commplus_opcode_map_t
   49 {
   50     char *name;
   51     uint8_t opcode;
   52 } s7commplus_opcode_map_t;
   53 
   54 typedef struct _s7commplus_func_map_t
   55 {
   56     char *name;
   57     uint16_t func;
   58 } s7commplus_func_map_t;
   59 
   60 int S7commplusOpcodeInit(struct _SnortConfig *sc, char *name, char *params, void **data);
   61 int S7commplusFuncInit(struct _SnortConfig *sc, char *name, char *params, void **data);
   62 int S7commplusContentInit(struct _SnortConfig *sc, char *name, char *params, void **data);
   63 
   64 int S7commplusRuleEval(void *raw_packet, const uint8_t **cursor, void *data);
   65 
   66 #endif /* S7COMM_ROPTIONS_H */