suricata
util-macset.h
Go to the documentation of this file.
1 /* Copyright (C) 2020 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19  * \file
20  *
21  * \author Sascha Steinbiss <sascha.steinbiss@dcso.de>
22  */
23 
24 #ifndef __UTIL_MACSET_H__
25 #define __UTIL_MACSET_H__
26 
27 typedef struct MacSet_ MacSet;
28 typedef enum {
32 
33 typedef int (*MacSetIteratorFunc)(uint8_t *addr, MacSetSide side, void*);
34 
35 MacSet *MacSetInit(int size);
36 void MacSetAdd(MacSet*, uint8_t *src_addr, uint8_t *dst_addr);
37 void MacSetAddWithCtr(MacSet*, uint8_t *src_addr, uint8_t *dst_addr, ThreadVars *tv,
38  uint16_t ctr_src, uint16_t ctr_dst);
39 int MacSetForEach(const MacSet*, MacSetIteratorFunc, void*);
40 int MacSetSize(const MacSet*);
41 void MacSetReset(MacSet*);
42 void MacSetFree(MacSet*);
43 void MacSetRegisterFlowStorage(void);
44 int MacSetGetFlowStorageID(void);
45 bool MacSetFlowStorageEnabled(void);
46 void MacSetRegisterTests(void);
47 
48 #endif /* __UTIL_MACSET_H__ */
MacSetGetFlowStorageID
int MacSetGetFlowStorageID(void)
Definition: util-macset.c:113
MacSetSide
MacSetSide
Definition: util-macset.h:28
MacSetSize
int MacSetSize(const MacSet *)
Definition: util-macset.c:231
MacSetForEach
int MacSetForEach(const MacSet *, MacSetIteratorFunc, void *)
Definition: util-macset.c:218
MacSetInit
MacSet * MacSetInit(int size)
Definition: util-macset.c:90
MacSetIteratorFunc
int(* MacSetIteratorFunc)(uint8_t *addr, MacSetSide side, void *)
Definition: util-macset.h:33
MacSetAdd
void MacSetAdd(MacSet *, uint8_t *src_addr, uint8_t *dst_addr)
Definition: util-macset.c:188
MacSetRegisterFlowStorage
void MacSetRegisterFlowStorage(void)
Definition: util-macset.c:61
MacSetAddWithCtr
void MacSetAddWithCtr(MacSet *, uint8_t *src_addr, uint8_t *dst_addr, ThreadVars *tv, uint16_t ctr_src, uint16_t ctr_dst)
Definition: util-macset.c:179
ThreadVars_
Per thread variable structure.
Definition: threadvars.h:58
MacSetRegisterTests
void MacSetRegisterTests(void)
Definition: util-macset.c:437
MacSetReset
void MacSetReset(MacSet *)
Definition: util-macset.c:262
MAC_SET_DST
@ MAC_SET_DST
Definition: util-macset.h:30
MacSet_::size
int size
Definition: util-macset.c:55
MacSet_
Definition: util-macset.c:44
MAC_SET_SRC
@ MAC_SET_SRC
Definition: util-macset.h:29
tv
ThreadVars * tv
Definition: fuzz_decodepcapfile.c:29
MacSetFree
void MacSetFree(MacSet *)
Definition: util-macset.c:270
MacSetFlowStorageEnabled
bool MacSetFlowStorageEnabled(void)
Definition: util-macset.c:84