net/procfs: Add support to provide MLD stats at /proc/net/mld. net/mld: Fix a couple more bugs found in further MLD testing.

This commit is contained in:
Gregory Nutt
2018-11-06 10:42:53 -06:00
parent 12a500fcb6
commit f58e7976df
9 changed files with 370 additions and 26 deletions
+26
View File
@@ -71,6 +71,9 @@ enum netprocfs_entry_e
NETPROCFS_SUBDIR_DEV = 0 /* Multiple instances, e.g. /proc/net/eth0 */
#ifdef CONFIG_NET_STATISTICS
, NETPROCFS_SUBDIR_STAT /* /proc/net/stat */
#ifdef CONFIG_NET_MLD
, NETPROCFS_SUBDIR_MLD /* /proc/net/mld */
#endif
#endif
#ifdef CONFIG_NET_ROUTE
, NETPROCFS_SUBDIR_ROUTE /* /proc/net/route */
@@ -169,6 +172,29 @@ ssize_t netprocfs_read_netstats(FAR struct netprocfs_file_s *priv,
FAR char *buffer, size_t buflen);
#endif
/****************************************************************************
* Name: netprocfs_read_mldstats
*
* Description:
* Read and format MLD statistics.
*
* Input Parameters:
* priv - A reference to the network procfs file structure
* buffer - The user-provided buffer into which network status will be
* returned.
* bulen - The size in bytes of the user provided buffer.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned
* on failure.
*
****************************************************************************/
#if defined(CONFIG_NET_STATISTICS) && defined(CONFIG_NET_MLD)
ssize_t netprocfs_read_mldstats(FAR struct netprocfs_file_s *priv,
FAR char *buffer, size_t buflen);
#endif
/****************************************************************************
* Name: netprocfs_read_routes
*