summaryrefslogtreecommitdiff
path: root/cleopatre/application/igmp_snoopd/inc/write_file.h
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/application/igmp_snoopd/inc/write_file.h')
-rw-r--r--cleopatre/application/igmp_snoopd/inc/write_file.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/cleopatre/application/igmp_snoopd/inc/write_file.h b/cleopatre/application/igmp_snoopd/inc/write_file.h
index fefd370131..9cf7cbeceb 100644
--- a/cleopatre/application/igmp_snoopd/inc/write_file.h
+++ b/cleopatre/application/igmp_snoopd/inc/write_file.h
@@ -2,12 +2,28 @@
#define WRITE_FILE_H
#include "data_struct.h"
+#include "internal.h"
/**
- * Write the list of groups and members to a file.
- * \param path The file to write to.
+ * Update the content of the multicast info. During the process, compare
+ * with previous content to determine whether the info changed and the file
+ * needs to be updated if necessary.
+ * \param mcast_info The previous multicast info that will be
+ * used to detect changes and will eventually be updated.
* \param groups_head The head of the group list.
+ * \return true, if the file needs to be updated because the multicast info
+ * changed.
+ * false, if the file doesn't need to be updated because the multicast
+ * info didn't change since the previous time.
+ */
+bool update_multicast_info (struct multicast_info **multicast_info,
+ const struct list_head_groups *groups_head);
+/**
+ * Write the multicast info to the file.
+ * \param path The file to write to.
+ * \param mcast_info The multicast info to use to write the file.
+ * Passing NULL, writes an empty file.
*/
-void write_to_file (const char *path, const struct list_head_groups *groups_head);
+void write_to_file (const char *path, struct multicast_info *mcast_info);
#endif /* WRITE_FILE_H */