Sven Eckelmann | 7db7d9f | 2017-11-19 15:05:11 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Sven Eckelmann | 68e039f | 2020-01-01 00:00:01 +0100 | [diff] [blame] | 2 | /* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors: |
Sven Eckelmann | c6c8fea | 2010-12-13 11:19:28 +0000 | [diff] [blame] | 3 | * |
| 4 | * Marek Lindner |
Sven Eckelmann | c6c8fea | 2010-12-13 11:19:28 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _NET_BATMAN_ADV_ICMP_SOCKET_H_ |
| 8 | #define _NET_BATMAN_ADV_ICMP_SOCKET_H_ |
| 9 | |
Sven Eckelmann | 1e2c2a4 | 2015-04-17 19:40:28 +0200 | [diff] [blame] | 10 | #include "main.h" |
| 11 | |
| 12 | #include <linux/types.h> |
Sven Eckelmann | 68a600d | 2019-05-24 20:11:17 +0200 | [diff] [blame] | 13 | #include <uapi/linux/batadv_packet.h> |
Sven Eckelmann | 1e2c2a4 | 2015-04-17 19:40:28 +0200 | [diff] [blame] | 14 | |
Sven Eckelmann | 6434664 | 2012-06-03 22:19:12 +0200 | [diff] [blame] | 15 | #define BATADV_ICMP_SOCKET "socket" |
Sven Eckelmann | c6c8fea | 2010-12-13 11:19:28 +0000 | [diff] [blame] | 16 | |
Greg Kroah-Hartman | 3bcacd1 | 2019-06-14 09:11:23 +0200 | [diff] [blame] | 17 | void batadv_socket_setup(struct batadv_priv *bat_priv); |
Sven Eckelmann | dc1cbd1 | 2016-07-16 09:31:20 +0200 | [diff] [blame] | 18 | |
| 19 | #ifdef CONFIG_BATMAN_ADV_DEBUGFS |
| 20 | |
| 21 | void batadv_socket_init(void); |
Simon Wunderlich | da6b8c2 | 2013-10-22 22:50:09 +0200 | [diff] [blame] | 22 | void batadv_socket_receive_packet(struct batadv_icmp_header *icmph, |
Sven Eckelmann | 9039dc7 | 2012-05-12 02:09:33 +0200 | [diff] [blame] | 23 | size_t icmp_len); |
Sven Eckelmann | c6c8fea | 2010-12-13 11:19:28 +0000 | [diff] [blame] | 24 | |
Sven Eckelmann | dc1cbd1 | 2016-07-16 09:31:20 +0200 | [diff] [blame] | 25 | #else |
| 26 | |
| 27 | static inline void batadv_socket_init(void) |
| 28 | { |
| 29 | } |
| 30 | |
| 31 | static inline void |
| 32 | batadv_socket_receive_packet(struct batadv_icmp_header *icmph, size_t icmp_len) |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | #endif |
| 37 | |
Sven Eckelmann | c6c8fea | 2010-12-13 11:19:28 +0000 | [diff] [blame] | 38 | #endif /* _NET_BATMAN_ADV_ICMP_SOCKET_H_ */ |