batman-adv: Send multicast packets to nodes with a WANT_ALL flag
[cascardo/linux.git] / net / batman-adv / packet.h
index 0a381d1..c7f6eef 100644 (file)
@@ -89,6 +89,19 @@ enum batadv_icmp_packettype {
        BATADV_PARAMETER_PROBLEM       = 12,
 };
 
+/**
+ * enum batadv_mcast_flags - flags for multicast capabilities and settings
+ * @BATADV_MCAST_WANT_ALL_UNSNOOPABLES: we want all packets destined for
+ *  224.0.0.0/24 or ff02::1
+ * @BATADV_MCAST_WANT_ALL_IPV4: we want all IPv4 multicast packets
+ * @BATADV_MCAST_WANT_ALL_IPV6: we want all IPv6 multicast packets
+ */
+enum batadv_mcast_flags {
+       BATADV_MCAST_WANT_ALL_UNSNOOPABLES      = BIT(0),
+       BATADV_MCAST_WANT_ALL_IPV4              = BIT(1),
+       BATADV_MCAST_WANT_ALL_IPV6              = BIT(2),
+};
+
 /* tt data subtypes */
 #define BATADV_TT_DATA_TYPE_MASK 0x0F
 
@@ -145,6 +158,7 @@ enum batadv_bla_claimframe {
  * @BATADV_TVLV_NC: network coding tvlv
  * @BATADV_TVLV_TT: translation table tvlv
  * @BATADV_TVLV_ROAM: roaming advertisement tvlv
+ * @BATADV_TVLV_MCAST: multicast capability tvlv
  */
 enum batadv_tvlv_type {
        BATADV_TVLV_GW          = 0x01,
@@ -152,6 +166,7 @@ enum batadv_tvlv_type {
        BATADV_TVLV_NC          = 0x03,
        BATADV_TVLV_TT          = 0x04,
        BATADV_TVLV_ROAM        = 0x05,
+       BATADV_TVLV_MCAST       = 0x06,
 };
 
 #pragma pack(2)
@@ -504,4 +519,14 @@ struct batadv_tvlv_roam_adv {
        __be16 vid;
 };
 
+/**
+ * struct batadv_tvlv_mcast_data - payload of a multicast tvlv
+ * @flags: multicast flags announced by the orig node
+ * @reserved: reserved field
+ */
+struct batadv_tvlv_mcast_data {
+       uint8_t flags;
+       uint8_t reserved[3];
+};
+
 #endif /* _NET_BATMAN_ADV_PACKET_H_ */