mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-27 11:54:53 +08:00
7bd9188581
As noted by David Ahern, now if some bytecode filter is not supported by running kernel printed error message is not clear. This patch is attempt to detect such case and print correct message. This is done by providing checking function for new filter types. As example check function for cgroup filter is implemented. It sends correct lightweight request (idiag_states = 0) with zero cgroup condition to the kernel and checks returned errno. If filter is not supported EINVAL is returned. Result of checking is cached to avoid extra checks if several same filters are specified. Signed-off-by: Dmitry Yakunin <zeil@yandex-team.ru> Signed-off-by: David Ahern <dsahern@gmail.com>
43 lines
1.0 KiB
Makefile
43 lines
1.0 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
SSOBJ=ss.o ssfilter_check.o ssfilter.tab.o
|
|
LNSTATOBJ=lnstat.o lnstat_util.o
|
|
|
|
TARGETS=ss nstat ifstat rtacct lnstat
|
|
|
|
include ../config.mk
|
|
|
|
ifeq ($(HAVE_BERKELEY_DB),y)
|
|
TARGETS += arpd
|
|
endif
|
|
|
|
all: $(TARGETS)
|
|
|
|
ss: $(SSOBJ)
|
|
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
|
|
|
|
nstat: nstat.c
|
|
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o nstat nstat.c $(LDLIBS) -lm
|
|
|
|
ifstat: ifstat.c
|
|
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o ifstat ifstat.c $(LDLIBS) -lm
|
|
|
|
rtacct: rtacct.c
|
|
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o rtacct rtacct.c $(LDLIBS) -lm
|
|
|
|
arpd: arpd.c
|
|
$(QUIET_CC)$(CC) $(CFLAGS) -I$(DBM_INCLUDE) $(CPPFLAGS) $(LDFLAGS) -o arpd arpd.c $(LDLIBS) -ldb
|
|
|
|
ssfilter.tab.c: ssfilter.y
|
|
$(QUIET_YACC)$(YACC) -b ssfilter ssfilter.y
|
|
|
|
lnstat: $(LNSTATOBJ)
|
|
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
|
|
|
|
install: all
|
|
install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
|
|
ln -sf lnstat $(DESTDIR)$(SBINDIR)/rtstat
|
|
ln -sf lnstat $(DESTDIR)$(SBINDIR)/ctstat
|
|
|
|
clean:
|
|
rm -f *.o $(TARGETS) ssfilter.c
|