From 2945822f8680c10bd6930c752c10849a725b5ef7 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 13 Apr 2019 15:48:31 +0200 Subject: [PATCH] brctl: add TODO: "showmacs BR" Signed-off-by: Denys Vlasenko --- networking/brctl.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/networking/brctl.c b/networking/brctl.c index 0f2c10f22..f44ad9c8d 100644 --- a/networking/brctl.c +++ b/networking/brctl.c @@ -9,9 +9,6 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ -/* This applet currently uses only the ioctl interface and no sysfs at all. - * At the time of this writing this was considered a feature. - */ //config:config BRCTL //config: bool "brctl (4.7 kb)" //config: default y @@ -46,7 +43,7 @@ //usage:#define brctl_trivial_usage //usage: "COMMAND [BRIDGE [ARGS]]" //usage:#define brctl_full_usage "\n\n" -//usage: "Manage ethernet bridges\n" +//usage: "Manage ethernet bridges" //usage: "\nCommands:" //usage: IF_FEATURE_BRCTL_SHOW( //usage: "\n show [BRIDGE]... Show bridges" @@ -364,6 +361,23 @@ int brctl_main(int argc UNUSED_PARAM, char **argv) //goto done_next_argv; return EXIT_SUCCESS; } + +/* TODO: "showmacs BR" + * port no\tmac addr\t\tis local?\tageing timer + * 1\txx:xx:xx:xx:xx:xx\tno\t\t1.31 + * port no mac addr is local? ageing timer + * 1 xx:xx:xx:xx:xx:xx no 1.31 + * Read fixed-sized records from /sys/class/net/BR/brforward: + * struct __fdb_entry { + * uint8_t mac_addr[ETH_ALEN]; + * uint8_t port_no; //lsb + * uint8_t is_local; + * uint32_t ageing_timer_value; + * uint8_t port_hi; + * uint8_t pad0; + * uint16_t unused; + * }; + */ #endif /* always true: if (key == ARG_addif || key == ARG_delif) */ { /* addif or delif */ -- 2.25.1