summaryrefslogtreecommitdiffhomepage
path: root/src/ratelimiter.h
blob: 7833eb3b80ab9dc30ad5f485fb0a15a3067bae50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* SPDX-License-Identifier: GPL-2.0
 *
 * Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
 */

#ifndef _WG_RATELIMITER_H
#define _WG_RATELIMITER_H

#include <linux/skbuff.h>

int ratelimiter_init(void);
void ratelimiter_uninit(void);
bool ratelimiter_allow(struct sk_buff *skb, struct net *net);

#ifdef DEBUG
bool ratelimiter_selftest(void);
#endif

#endif /* _WG_RATELIMITER_H */