From 7b13504e2a47a40ae7e5283de41d48ca3f7efb53 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Tue, 15 Jun 2021 14:32:44 +0200 Subject: tools: Support broadcast IPCP in irm ipcp list The broadcast IPCP was missing in the known types, causing the type to show as UNKNOWN. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/tools/irm/irm_ipcp_list.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/tools/irm/irm_ipcp_list.c b/src/tools/irm/irm_ipcp_list.c index 9def49d5..512e1645 100644 --- a/src/tools/irm/irm_ipcp_list.c +++ b/src/tools/irm/irm_ipcp_list.c @@ -46,11 +46,12 @@ #include #include -#define UNICAST "unicast" -#define UDP "udp" -#define ETH_LLC "eth-llc" -#define ETH_DIX "eth-dix" -#define LOCAL "local" +#define UNICAST "unicast" +#define BROADCAST "broadcast" +#define UDP "udp" +#define ETH_LLC "eth-llc" +#define ETH_DIX "eth-dix" +#define LOCAL "local" static void usage(void) { @@ -67,6 +68,8 @@ static char * str_type(enum ipcp_type type) switch(type) { case IPCP_UNICAST: return UNICAST; + case IPCP_BROADCAST: + return BROADCAST; case IPCP_ETH_LLC: return ETH_LLC; case IPCP_ETH_DIX: @@ -108,6 +111,8 @@ int do_list_ipcp(int argc, if (ipcp_type != NULL) { if (strcmp(ipcp_type, UNICAST) == 0) type = IPCP_UNICAST; + else if (strcmp(ipcp_type, BROADCAST) == 0) + type = IPCP_BROADCAST; else if (strcmp(ipcp_type, UDP) == 0) type = IPCP_UDP; else if (strcmp(ipcp_type, LOCAL) == 0) -- cgit v1.2.3