icmp_socket.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (C) 2007-2018 B.A.T.M.A.N. contributors:
  3. *
  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
  16. * along with this program; if not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef _NET_BATMAN_ADV_ICMP_SOCKET_H_
  19. #define _NET_BATMAN_ADV_ICMP_SOCKET_H_
  20. #include "main.h"
  21. #include <linux/types.h>
  22. struct batadv_icmp_header;
  23. #define BATADV_ICMP_SOCKET "socket"
  24. int batadv_socket_setup(struct batadv_priv *bat_priv);
  25. #ifdef CONFIG_BATMAN_ADV_DEBUGFS
  26. void batadv_socket_init(void);
  27. void batadv_socket_receive_packet(struct batadv_icmp_header *icmph,
  28. size_t icmp_len);
  29. #else
  30. static inline void batadv_socket_init(void)
  31. {
  32. }
  33. static inline void
  34. batadv_socket_receive_packet(struct batadv_icmp_header *icmph, size_t icmp_len)
  35. {
  36. }
  37. #endif
  38. #endif /* _NET_BATMAN_ADV_ICMP_SOCKET_H_ */