You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/07 08:39:10 UTC

[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7004: net/procfs: add tcp profs support (IPv4 only)

anchao commented on code in PR #7004:
URL: https://github.com/apache/incubator-nuttx/pull/7004#discussion_r964555111


##########
net/procfs/net_procfs.c:
##########
@@ -52,26 +52,27 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
-/* Directory entry indices */
+#define ARRAY_SIZE(x)   (sizeof(x) / sizeof((x)[0]))
 
-#ifdef CONFIG_NET_STATISTICS
-#  define STAT_INDEX     0
-#  ifdef CONFIG_NET_MLD
-#    define MLD_INDEX    1
-#    define _ROUTE_INDEX 2
-#  else
-#    define _ROUTE_INDEX 1
-#  endif
-#else
-#  define _ROUTE_INDEX   0
-#endif
+/****************************************************************************
+ * Private Type Definitions
+ ****************************************************************************/
 
-#ifdef CONFIG_NET_ROUTE
-#  define ROUTE_INDEX    _ROUTE_INDEX
-#  define DEV_INDEX      (_ROUTE_INDEX + 1)
-#else
-#  define DEV_INDEX      _ROUTE_INDEX
-#endif
+/* Read statistics function type */
+
+typedef ssize_t (*read_stat_t)(FAR struct netprocfs_file_s *priv,

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org