1 /*
2 ** Copyright (C) 2014-2021 Cisco and/or its affiliates. All rights reserved.
3 ** Copyright (C) 2002-2013 Sourcefire, Inc.
4 ** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
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 /* $Id$ */
23 #ifndef __SP_ICMP_TYPE_CHECK_H__
24 #define __SP_ICMP_TYPE_CHECK_H__
25 
26 #define ICMP_TYPE_TEST_EQ 1
27 #define ICMP_TYPE_TEST_GT 2
28 #define ICMP_TYPE_TEST_LT 3
29 #define ICMP_TYPE_TEST_RG 4
30 
31 typedef struct _IcmpTypeCheckData
32 {
33     /* the icmp type number */
34     int icmp_type;
35     int icmp_type2;
36     uint8_t operator;
37 } IcmpTypeCheckData;
38 
39 void SetupIcmpTypeCheck(void);
40 uint32_t IcmpTypeCheckHash(void *d);
41 int IcmpTypeCheckCompare(void *l, void *r);
42 
43 #endif  /* __SP_ICMP_TYPE_CHECK_H__ */
44