--- zzzz-none-000/linux-5.4.213/include/linux/mroute.h 2022-09-15 10:04:56.000000000 +0000 +++ miami-7690-761/linux-5.4.213/include/linux/mroute.h 2024-05-29 11:20:02.000000000 +0000 @@ -84,4 +84,42 @@ int ipmr_get_route(struct net *net, struct sk_buff *skb, __be32 saddr, __be32 daddr, struct rtmsg *rtm, u32 portid); + +#define IPMR_MFC_EVENT_UPDATE 1 +#define IPMR_MFC_EVENT_DELETE 2 + +/* + * Callback to registered modules in the event of updates to a multicast group + */ +typedef void (*ipmr_mfc_event_offload_callback_t)(__be32 origin, __be32 group, + u32 max_dest_dev, + u32 dest_dev_idx[], + u8 op); + +/* + * Register the callback used to inform offload modules when updates occur to + * MFC. The callback is registered by offload modules + */ +extern bool ipmr_register_mfc_event_offload_callback( + ipmr_mfc_event_offload_callback_t mfc_offload_cb); + +/* + * De-Register the callback used to inform offload modules when updates occur + * to MFC + */ +extern void ipmr_unregister_mfc_event_offload_callback(void); + +/* + * Find the destination interface list, given a multicast group and source + */ +extern int ipmr_find_mfc_entry(struct net *net, __be32 origin, __be32 group, + u32 max_dst_cnt, u32 dest_dev[]); + +/* + * Out-of-band multicast statistics update for flows that are offloaded from + * Linux + */ +extern int ipmr_mfc_stats_update(struct net *net, __be32 origin, __be32 group, + u64 pkts_in, u64 bytes_in, + u64 pkts_out, u64 bytes_out); #endif