|
@@ -20,6 +20,8 @@
|
|
|
|
|
|
#include "main.h"
|
|
|
|
|
|
+#include <linux/compiler.h>
|
|
|
+#include <linux/stddef.h>
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
struct net_device;
|
|
@@ -27,6 +29,22 @@ struct netlink_callback;
|
|
|
struct seq_file;
|
|
|
struct sk_buff;
|
|
|
|
|
|
+/**
|
|
|
+ * batadv_bla_is_loopdetect_mac - check if the mac address is from a loop detect
|
|
|
+ * frame sent by bridge loop avoidance
|
|
|
+ * @mac: mac address to check
|
|
|
+ *
|
|
|
+ * Return: true if the it looks like a loop detect frame
|
|
|
+ * (mac starts with BA:BE), false otherwise
|
|
|
+ */
|
|
|
+static inline bool batadv_bla_is_loopdetect_mac(const uint8_t *mac)
|
|
|
+{
|
|
|
+ if (mac[0] == 0xba && mac[1] == 0xbe)
|
|
|
+ return true;
|
|
|
+
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
#ifdef CONFIG_BATMAN_ADV_BLA
|
|
|
bool batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb,
|
|
|
unsigned short vid, bool is_bcast);
|