nuttx/net/procfs/Make.defs
chao an d10cd8d585 net/procfs: add udp profs support
add proc node /proc/net/udp to show the active udp connections from procfs

nuttx style:

server> cat /proc/net/udp
UDP sl     local_address          remote_address     flg   txsz   rxsz  (IPv4)
  1:          0.0.0.0:  5285    192.168.31.22:  7779   9      0   1041
  2:          0.0.0.0:  5286    192.168.31.22:  7779   9      0   1041
  3:          0.0.0.0:  5287    192.168.31.22:  7779   9      0   1041

linux kernel:
https://www.kernel.org/doc/Documentation/networking/proc_net_tcp.txt

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-09 19:33:46 +08:00

58 lines
1.7 KiB
Plaintext

############################################################################
# net/procfs/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
# Network procfs support
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
ifeq ($(CONFIG_FS_PROCFS),y)
ifneq ($(CONFIG_FS_PROCFS_EXCLUDE_NET),y)
NET_CSRCS += net_procfs.c netdev_statistics.c
# General network statistics
ifeq ($(CONFIG_NET_STATISTICS),y)
NET_CSRCS += net_statistics.c
ifeq ($(CONFIG_NET_MLD),y)
NET_CSRCS += net_mld.c
endif
ifeq ($(CONFIG_NET_TCP),y)
NET_CSRCS += net_tcp.c
endif
ifeq ($(CONFIG_NET_UDP),y)
NET_CSRCS += net_udp.c
endif
endif
# Routing table
ifeq ($(CONFIG_NET_ROUTE),y)
NET_CSRCS += net_procfs_route.c
endif
# Include packet socket build support
DEPPATH += --dep-path procfs
VPATH += :procfs
endif # CONFIG_FS_PROCFS_EXCLUDE_NET
endif # CONFIG_FS_PROCFS
endif # CONFIG_DISABLE_MOUNTPOINT