mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
net/procfs: disable tcp/udp proc node if no stack available
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -124,7 +124,7 @@ static const struct netprocfs_entry_s g_net_entries[] =
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
# endif
|
# endif
|
||||||
# ifdef CONFIG_NET_TCP
|
# if defined(CONFIG_NET_TCP) && !defined(CONFIG_NET_TCP_NO_STACK)
|
||||||
{
|
{
|
||||||
DTYPE_FILE, "tcp",
|
DTYPE_FILE, "tcp",
|
||||||
{
|
{
|
||||||
@@ -132,7 +132,7 @@ static const struct netprocfs_entry_s g_net_entries[] =
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
# endif
|
# endif
|
||||||
# ifdef CONFIG_NET_UDP
|
# if defined(CONFIG_NET_UDP) && !defined(CONFIG_NET_UDP_NO_STACK)
|
||||||
{
|
{
|
||||||
DTYPE_FILE, "udp",
|
DTYPE_FILE, "udp",
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TCP
|
#if defined(CONFIG_NET_TCP) && !defined(CONFIG_NET_TCP_NO_STACK)
|
||||||
|
|
||||||
#ifdef CONFIG_NET_IPv6
|
#ifdef CONFIG_NET_IPv6
|
||||||
# define TCP_LINELEN 180
|
# define TCP_LINELEN 180
|
||||||
@@ -215,4 +215,4 @@ ssize_t netprocfs_read_tcpstats(FAR struct netprocfs_file_s *priv,
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_NET_TCP */
|
#endif /* CONFIG_NET_TCP && !CONFIG_NET_TCP_NO_STACK */
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NET_UDP
|
#if defined(CONFIG_NET_UDP) && !defined(CONFIG_NET_UDP_NO_STACK)
|
||||||
|
|
||||||
#ifdef CONFIG_NET_IPv6
|
#ifdef CONFIG_NET_IPv6
|
||||||
# define UDP_LINELEN 180
|
# define UDP_LINELEN 180
|
||||||
@@ -206,4 +206,4 @@ ssize_t netprocfs_read_udpstats(FAR struct netprocfs_file_s *priv,
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_NET_UDP */
|
#endif /* CONFIG_NET_UDP && !CONFIG_NET_UDP_NO_STACK */
|
||||||
|
|||||||
+2
-2
@@ -182,7 +182,7 @@ ssize_t netprocfs_read_mldstats(FAR struct netprocfs_file_s *priv,
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TCP
|
#if defined(CONFIG_NET_TCP) && !defined(CONFIG_NET_TCP_NO_STACK)
|
||||||
ssize_t netprocfs_read_tcpstats(FAR struct netprocfs_file_s *priv,
|
ssize_t netprocfs_read_tcpstats(FAR struct netprocfs_file_s *priv,
|
||||||
FAR char *buffer, size_t buflen);
|
FAR char *buffer, size_t buflen);
|
||||||
#endif
|
#endif
|
||||||
@@ -205,7 +205,7 @@ ssize_t netprocfs_read_tcpstats(FAR struct netprocfs_file_s *priv,
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NET_UDP
|
#if defined(CONFIG_NET_UDP) && !defined(CONFIG_NET_UDP_NO_STACK)
|
||||||
ssize_t netprocfs_read_udpstats(FAR struct netprocfs_file_s *priv,
|
ssize_t netprocfs_read_udpstats(FAR struct netprocfs_file_s *priv,
|
||||||
FAR char *buffer, size_t buflen);
|
FAR char *buffer, size_t buflen);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user