Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit a9ad05d4337a0f1a32320e3e70f7f4b3461d6cc6 Author: Sven Eckelmann sven.eckelmann@openmesh.com Date: Tue Dec 5 14:39:48 2017 +0100
batctl: Convert packet.h to uapi header
The header file is used by different userspace programs to inject packets or to decode sniffed packets. It should therefore be available to them as userspace header.
Also other components in the kernel (like the flow dissector) require access to the packet definitions to be able to decode ETH_P_BATMAN ethernet packets.
Signed-off-by: Sven Eckelmann sven.eckelmann@openmesh.com
a9ad05d4337a0f1a32320e3e70f7f4b3461d6cc6 packet.h => batadv_packet.h | 8 ++++---- icmp_helper.c | 2 +- icmp_helper.h | 2 +- netlink.c | 2 +- ping.c | 2 +- tcpdump.c | 2 +- tp_meter.c | 2 +- traceroute.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/packet.h b/batadv_packet.h similarity index 99% rename from packet.h rename to batadv_packet.h index 3b2d2db..5cb360b 100644 --- a/packet.h +++ b/batadv_packet.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich @@ -16,8 +16,8 @@ * along with this program; if not, see http://www.gnu.org/licenses/. */
-#ifndef _NET_BATMAN_ADV_PACKET_H_ -#define _NET_BATMAN_ADV_PACKET_H_ +#ifndef _UAPI_LINUX_BATADV_PACKET_H_ +#define _UAPI_LINUX_BATADV_PACKET_H_
#include <asm/byteorder.h> #include <linux/if_ether.h> @@ -641,4 +641,4 @@ struct batadv_tvlv_mcast_data { __u8 reserved[3]; };
-#endif /* _NET_BATMAN_ADV_PACKET_H_ */ +#endif /* _UAPI_LINUX_BATADV_PACKET_H_ */ diff --git a/icmp_helper.c b/icmp_helper.c index 3dcbeed..9edd293 100644 --- a/icmp_helper.c +++ b/icmp_helper.c @@ -40,12 +40,12 @@ #include <sys/uio.h> #include <unistd.h>
+#include "batadv_packet.h" #include "debug.h" #include "debugfs.h" #include "functions.h" #include "list.h" #include "netlink.h" -#include "packet.h"
#ifndef ETH_P_BATMAN #define ETH_P_BATMAN 0x4305 diff --git a/icmp_helper.h b/icmp_helper.h index a6cf95e..d70896f 100644 --- a/icmp_helper.h +++ b/icmp_helper.h @@ -33,8 +33,8 @@ #include <stddef.h> #include <stdint.h>
+#include "batadv_packet.h" #include "list.h" -#include "packet.h"
struct timeval;
diff --git a/netlink.c b/netlink.c index af75c9f..fa26d5c 100644 --- a/netlink.c +++ b/netlink.c @@ -37,11 +37,11 @@ #include <arpa/inet.h>
#include "bat-hosts.h" +#include "batadv_packet.h" #include "batman_adv.h" #include "netlink.h" #include "functions.h" #include "main.h" -#include "packet.h"
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
diff --git a/ping.c b/ping.c index 5a3a16c..ccf2fab 100644 --- a/ping.c +++ b/ping.c @@ -37,10 +37,10 @@ #include <sys/time.h> #include <netinet/if_ether.h>
+#include "batadv_packet.h" #include "main.h" #include "ping.h" #include "functions.h" -#include "packet.h" #include "bat-hosts.h" #include "debugfs.h" #include "icmp_helper.h" diff --git a/tcpdump.c b/tcpdump.c index e466544..147c58a 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -46,8 +46,8 @@ #include <sys/select.h> #include <sys/socket.h>
+#include "batadv_packet.h" #include "tcpdump.h" -#include "packet.h" #include "bat-hosts.h" #include "functions.h"
diff --git a/tp_meter.c b/tp_meter.c index 12d80c0..88145fa 100644 --- a/tp_meter.c +++ b/tp_meter.c @@ -42,11 +42,11 @@ #include <unistd.h>
#include "bat-hosts.h" +#include "batadv_packet.h" #include "batman_adv.h" #include "functions.h" #include "genl.h" #include "netlink.h" -#include "packet.h" #include "debugfs.h"
static struct ether_addr *dst_mac; diff --git a/traceroute.c b/traceroute.c index 9ed1c82..5a842b5 100644 --- a/traceroute.c +++ b/traceroute.c @@ -34,10 +34,10 @@ #include <sys/select.h> #include <sys/time.h>
+#include "batadv_packet.h" #include "main.h" #include "traceroute.h" #include "functions.h" -#include "packet.h" #include "bat-hosts.h" #include "debugfs.h" #include "icmp_helper.h"