blob: 958be22beda9f460699a9a4633ef84c378edb621 [file] [log] [blame]
Sven Eckelmann7db7d9f2017-11-19 15:05:11 +01001/* SPDX-License-Identifier: GPL-2.0 */
Sven Eckelmann6b1aea82018-01-01 00:00:00 +01002/* Copyright (C) 2007-2018 B.A.T.M.A.N. contributors:
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +00003 *
4 * Marek Lindner
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2 of the GNU General Public
8 * License as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
Antonio Quartulliebf38fb2013-11-03 20:40:48 +010016 * along with this program; if not, see <http://www.gnu.org/licenses/>.
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000017 */
18
19#ifndef _NET_BATMAN_ADV_ICMP_SOCKET_H_
20#define _NET_BATMAN_ADV_ICMP_SOCKET_H_
21
Sven Eckelmann1e2c2a42015-04-17 19:40:28 +020022#include "main.h"
23
24#include <linux/types.h>
25
26struct batadv_icmp_header;
Sven Eckelmann1e2c2a42015-04-17 19:40:28 +020027
Sven Eckelmann64346642012-06-03 22:19:12 +020028#define BATADV_ICMP_SOCKET "socket"
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000029
Sven Eckelmann56303d32012-06-05 22:31:31 +020030int batadv_socket_setup(struct batadv_priv *bat_priv);
Sven Eckelmanndc1cbd12016-07-16 09:31:20 +020031
32#ifdef CONFIG_BATMAN_ADV_DEBUGFS
33
34void batadv_socket_init(void);
Simon Wunderlichda6b8c22013-10-22 22:50:09 +020035void batadv_socket_receive_packet(struct batadv_icmp_header *icmph,
Sven Eckelmann9039dc72012-05-12 02:09:33 +020036 size_t icmp_len);
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000037
Sven Eckelmanndc1cbd12016-07-16 09:31:20 +020038#else
39
40static inline void batadv_socket_init(void)
41{
42}
43
44static inline void
45batadv_socket_receive_packet(struct batadv_icmp_header *icmph, size_t icmp_len)
46{
47}
48
49#endif
50
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000051#endif /* _NET_BATMAN_ADV_ICMP_SOCKET_H_ */