blob: 6abd0f4742effaa408fd39c78249cde381b9fe06 [file] [log] [blame]
Sven Eckelmann7db7d9f2017-11-19 15:05:11 +01001/* SPDX-License-Identifier: GPL-2.0 */
Sven Eckelmann68e039f2020-01-01 00:00:01 +01002/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +00003 *
4 * Marek Lindner
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +00005 */
6
7#ifndef _NET_BATMAN_ADV_ICMP_SOCKET_H_
8#define _NET_BATMAN_ADV_ICMP_SOCKET_H_
9
Sven Eckelmann1e2c2a42015-04-17 19:40:28 +020010#include "main.h"
11
12#include <linux/types.h>
Sven Eckelmann68a600d2019-05-24 20:11:17 +020013#include <uapi/linux/batadv_packet.h>
Sven Eckelmann1e2c2a42015-04-17 19:40:28 +020014
Sven Eckelmann64346642012-06-03 22:19:12 +020015#define BATADV_ICMP_SOCKET "socket"
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000016
Greg Kroah-Hartman3bcacd12019-06-14 09:11:23 +020017void batadv_socket_setup(struct batadv_priv *bat_priv);
Sven Eckelmanndc1cbd12016-07-16 09:31:20 +020018
19#ifdef CONFIG_BATMAN_ADV_DEBUGFS
20
21void batadv_socket_init(void);
Simon Wunderlichda6b8c22013-10-22 22:50:09 +020022void batadv_socket_receive_packet(struct batadv_icmp_header *icmph,
Sven Eckelmann9039dc72012-05-12 02:09:33 +020023 size_t icmp_len);
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000024
Sven Eckelmanndc1cbd12016-07-16 09:31:20 +020025#else
26
27static inline void batadv_socket_init(void)
28{
29}
30
31static inline void
32batadv_socket_receive_packet(struct batadv_icmp_header *icmph, size_t icmp_len)
33{
34}
35
36#endif
37
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000038#endif /* _NET_BATMAN_ADV_ICMP_SOCKET_H_ */