Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 2 | /* Copyright (C) 2007-2019 B.A.T.M.A.N. contributors: |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 3 | * |
| 4 | * Marek Lindner |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _NET_BATMAN_ADV_ICMP_SOCKET_H_ |
| 8 | #define _NET_BATMAN_ADV_ICMP_SOCKET_H_ |
| 9 | |
| 10 | #include "main.h" |
| 11 | |
| 12 | #include <linux/types.h> |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 13 | #include <uapi/linux/batadv_packet.h> |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 14 | |
| 15 | #define BATADV_ICMP_SOCKET "socket" |
| 16 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 17 | void batadv_socket_setup(struct batadv_priv *bat_priv); |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 18 | |
| 19 | #ifdef CONFIG_BATMAN_ADV_DEBUGFS |
| 20 | |
| 21 | void batadv_socket_init(void); |
| 22 | void batadv_socket_receive_packet(struct batadv_icmp_header *icmph, |
| 23 | size_t icmp_len); |
| 24 | |
| 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 | |
| 38 | #endif /* _NET_BATMAN_ADV_ICMP_SOCKET_H_ */ |