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 SURICATA_UTIL_MACSET_H
25#define SURICATA_UTIL_MACSET_H
26
27typedef struct MacSet_ MacSet;
28typedef enum {
32
33typedef int (*MacSetIteratorFunc)(uint8_t *addr, MacSetSide side, void*);
34
36void MacSetAdd(MacSet *, const uint8_t *src_addr, const uint8_t *dst_addr);
37void MacSetAddWithCtr(MacSet *, const uint8_t *src_addr, const uint8_t *dst_addr, ThreadVars *tv,
38 uint16_t ctr_src, uint16_t ctr_dst);
39int MacSetForEach(const MacSet*, MacSetIteratorFunc, void*);
40uint8_t *MacSetGetFirst(const MacSet *, MacSetSide);
41int MacSetSize(const MacSet*);
43void MacSetFree(MacSet*);
47void MacSetRegisterTests(void);
48
49#endif /* SURICATA_UTIL_MACSET_H */
ThreadVars * tv
Per thread variable structure.
Definition threadvars.h:58
FlowStorageId MacSetGetFlowStorageID(void)
int MacSetSize(const MacSet *)
void MacSetRegisterTests(void)
void MacSetFree(MacSet *)
void MacSetReset(MacSet *)
MacSet * MacSetInit(int size)
Definition util-macset.c:92
bool MacSetFlowStorageEnabled(void)
Definition util-macset.c:86
void MacSetRegisterFlowStorage(void)
Definition util-macset.c:62
void MacSetAddWithCtr(MacSet *, const uint8_t *src_addr, const uint8_t *dst_addr, ThreadVars *tv, uint16_t ctr_src, uint16_t ctr_dst)
void MacSetAdd(MacSet *, const uint8_t *src_addr, const uint8_t *dst_addr)
int(* MacSetIteratorFunc)(uint8_t *addr, MacSetSide side, void *)
Definition util-macset.h:33
uint8_t * MacSetGetFirst(const MacSet *, MacSetSide)
int MacSetForEach(const MacSet *, MacSetIteratorFunc, void *)
MacSetSide
Definition util-macset.h:28
@ MAC_SET_DST
Definition util-macset.h:30
@ MAC_SET_SRC
Definition util-macset.h:29