mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
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:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user