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

nuttx style:

server> cat /proc/net/tcp
TCP sl  st flg ref tmr uack nrt   rxsz local_address           remote_address
     1: 04  61   1  12    0   0   1024          0.0.0.0:4855      192.168.31.22:5001
     2: 04  61   1  12    0   0   1024          0.0.0.0:4856      192.168.31.22:5001
     3: 04  61   1   9    0   0      0                      :::4853   fe80::b27b:25ff:fe28:4011:8789
     4: 04  61   1   3    3   0      0                      :::4854   fe80::b27b:25ff:fe28:4011:8789

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

55 lines
1.6 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
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