From 441f11ea452d17f090be0c798d2a3274e3da8081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cenk=20G=C3=BCndo=C4=9Fan?= Date: Thu, 30 Nov 2017 21:23:44 +0100 Subject: [PATCH] gnrc_rpl: shell: adapt to evtimer for RPL events --- sys/include/net/gnrc/rpl.h | 4 ++-- sys/include/net/gnrc/rpl/p2p_structs.h | 4 ++-- sys/include/net/gnrc/rpl/structs.h | 2 +- sys/net/gnrc/routing/rpl/gnrc_rpl.c | 6 +++--- sys/net/gnrc/routing/rpl/gnrc_rpl_auto_init.c | 4 ++-- sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c | 6 +++--- sys/net/gnrc/routing/rpl/gnrc_rpl_dodag.c | 6 +++--- sys/net/gnrc/routing/rpl/gnrc_rpl_internal/globals.h | 4 ++-- sys/net/gnrc/routing/rpl/gnrc_rpl_internal/netstats.h | 4 ++-- .../gnrc/routing/rpl/gnrc_rpl_internal/validation.h | 4 ++-- sys/net/gnrc/routing/rpl/gnrc_rpl_validation.c | 4 ++-- sys/net/gnrc/routing/rpl/p2p/gnrc_rpl_p2p.c | 4 ++-- sys/net/gnrc/routing/rpl/p2p/gnrc_rpl_p2p_dodag.c | 4 ++-- sys/shell/commands/sc_gnrc_rpl.c | 11 ++++------- 14 files changed, 32 insertions(+), 35 deletions(-) diff --git a/sys/include/net/gnrc/rpl.h b/sys/include/net/gnrc/rpl.h index 7242b67b6a..35a1bf4630 100644 --- a/sys/include/net/gnrc/rpl.h +++ b/sys/include/net/gnrc/rpl.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2013 - 2014 INRIA. * Copyright (C) 2015 Martine Lenders - * Copyright (C) 2015 Cenk Gündoğan + * Copyright (C) 2015 - 2018 Cenk Gündoğan * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level @@ -92,7 +92,7 @@ * @author Eric Engel * @author Fabian Brandt * @author Martine Lenders - * @author Cenk Gündoğan + * @author Cenk Gündoğan */ #ifndef NET_GNRC_RPL_H diff --git a/sys/include/net/gnrc/rpl/p2p_structs.h b/sys/include/net/gnrc/rpl/p2p_structs.h index 0fcc42b752..dd3fe94ef0 100644 --- a/sys/include/net/gnrc/rpl/p2p_structs.h +++ b/sys/include/net/gnrc/rpl/p2p_structs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Cenk Gündoğan + * Copyright (C) 2016 Cenk Gündoğan * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level @@ -15,7 +15,7 @@ * * Header file, which defines all structs used by P2P-RPL. * - * @author Cenk Gündoğan + * @author Cenk Gündoğan */ #ifndef NET_GNRC_RPL_P2P_STRUCTS_H diff --git a/sys/include/net/gnrc/rpl/structs.h b/sys/include/net/gnrc/rpl/structs.h index 3a208f780b..f0e4118e9e 100644 --- a/sys/include/net/gnrc/rpl/structs.h +++ b/sys/include/net/gnrc/rpl/structs.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2017 HAW Hamburg - * Copyright (C) 2015–2017 Cenk Gündoğan + * Copyright (C) 2015–2018 Cenk Gündoğan * Copyright (C) 2013 INRIA. * * This file is subject to the terms and conditions of the GNU Lesser diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl.c b/sys/net/gnrc/routing/rpl/gnrc_rpl.c index dbd734ffe8..a82a166c01 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2017 HAW Hamburg - * Copyright (C) 2015–2017 Cenk Gündoğan + * Copyright (C) 2018 HAW Hamburg + * Copyright (C) 2015–2017 Cenk Gündoğan * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level @@ -12,7 +12,7 @@ * * @file * - * @author Cenk Gündoğan + * @author Cenk Gündoğan */ #include "net/icmpv6.h" diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl_auto_init.c b/sys/net/gnrc/routing/rpl/gnrc_rpl_auto_init.c index 84de487cd9..f6f2ea4c67 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl_auto_init.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl_auto_init.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Cenk Gündoğan + * Copyright (C) 2016 Cenk Gündoğan * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level @@ -14,7 +14,7 @@ * @file * @brief Auto initialization for gnrc_rpl * - * @author Cenk Gündoğan + * @author Cenk Gündoğan */ #ifdef MODULE_AUTO_INIT_GNRC_RPL diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c b/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c index 34436329e4..1e454ecbe2 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2017 HAW Hamburg - * Copyright (C) 2015–2017 Cenk Gündoğan + * Copyright (C) 2018 HAW Hamburg + * Copyright (C) 2015–2017 Cenk Gündoğan * Copyright (C) 2013–2014 INRIA. * * This file is subject to the terms and conditions of the GNU Lesser General @@ -13,7 +13,7 @@ * * @file * - * @author Cenk Gündoğan + * @author Cenk Gündoğan */ #include "net/af.h" diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl_dodag.c b/sys/net/gnrc/routing/rpl/gnrc_rpl_dodag.c index c989ca5656..6197a40272 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl_dodag.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl_dodag.c @@ -1,6 +1,6 @@ /** - * Copyright (C) 2017 HAW Hamburg - * Copyright (C) 2015–2017 Cenk Gündoğan + * Copyright (C) 2018 HAW Hamburg + * Copyright (C) 2015–2017 Cenk Gündoğan * Copyright (C) 2013–2014 INRIA. * * This file is subject to the terms and conditions of the GNU Lesser @@ -13,7 +13,7 @@ * * @file * @author Eric Engel - * @author Cenk Gündoğan + * @author Cenk Gündoğan */ #include diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl_internal/globals.h b/sys/net/gnrc/routing/rpl/gnrc_rpl_internal/globals.h index 43bbf48252..a6b66be439 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl_internal/globals.h +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl_internal/globals.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 HAW Hamburg + * Copyright (C) 2018 HAW Hamburg * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level @@ -13,7 +13,7 @@ * @file * @brief Internal globals for RPL * - * @author Cenk Gündoğan + * @author Cenk Gündoğan */ #ifndef GLOBALS_H diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl_internal/netstats.h b/sys/net/gnrc/routing/rpl/gnrc_rpl_internal/netstats.h index fa66537da2..37bc0cc6e7 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl_internal/netstats.h +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl_internal/netstats.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Cenk Gündoğan + * Copyright (C) 2016 Cenk Gündoğan * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level @@ -13,7 +13,7 @@ * @file * @brief RPL control message statistics functions * - * @author Cenk Gündoğan + * @author Cenk Gündoğan */ #ifndef NETSTATS_H diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl_internal/validation.h b/sys/net/gnrc/routing/rpl/gnrc_rpl_internal/validation.h index 724dd754fd..e2f42f38bd 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl_internal/validation.h +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl_internal/validation.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Cenk Gündoğan + * Copyright (C) 2016 Cenk Gündoğan * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level @@ -13,7 +13,7 @@ * @file * @brief RPL control message validation functions * - * @author Cenk Gündoğan + * @author Cenk Gündoğan */ #ifndef VALIDATION_H diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl_validation.c b/sys/net/gnrc/routing/rpl/gnrc_rpl_validation.c index 43ef51f10d..5b042a4e43 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl_validation.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl_validation.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Cenk Gündoğan + * Copyright (C) 2016 Cenk Gündoğan * * This file is subject to the terms and conditions of the GNU Lesser General * Public License v2.1. See the file LICENSE in the top level directory for more @@ -11,7 +11,7 @@ * * @file * - * @author Cenk Gündoğan + * @author Cenk Gündoğan */ #include "net/gnrc/icmpv6.h" diff --git a/sys/net/gnrc/routing/rpl/p2p/gnrc_rpl_p2p.c b/sys/net/gnrc/routing/rpl/p2p/gnrc_rpl_p2p.c index 02f8221602..9d8eaca00d 100644 --- a/sys/net/gnrc/routing/rpl/p2p/gnrc_rpl_p2p.c +++ b/sys/net/gnrc/routing/rpl/p2p/gnrc_rpl_p2p.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Cenk Gündoğan + * Copyright (C) 2016 Cenk Gündoğan * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level @@ -11,7 +11,7 @@ * * @file * - * @author Cenk Gündoğan + * @author Cenk Gündoğan */ #include "net/icmpv6.h" diff --git a/sys/net/gnrc/routing/rpl/p2p/gnrc_rpl_p2p_dodag.c b/sys/net/gnrc/routing/rpl/p2p/gnrc_rpl_p2p_dodag.c index 3d4b93f9b5..b0eb5e1e6b 100644 --- a/sys/net/gnrc/routing/rpl/p2p/gnrc_rpl_p2p_dodag.c +++ b/sys/net/gnrc/routing/rpl/p2p/gnrc_rpl_p2p_dodag.c @@ -1,5 +1,5 @@ /** - * Copyright (C) 2016 Cenk Gündoğan + * Copyright (C) 2016 Cenk Gündoğan * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level @@ -10,7 +10,7 @@ * @{ * * @file - * @author Cenk Gündoğan + * @author Cenk Gündoğan */ #include diff --git a/sys/shell/commands/sc_gnrc_rpl.c b/sys/shell/commands/sc_gnrc_rpl.c index 7dafa6d3b0..b16d533de5 100644 --- a/sys/shell/commands/sc_gnrc_rpl.c +++ b/sys/shell/commands/sc_gnrc_rpl.c @@ -256,7 +256,6 @@ int _gnrc_rpl_dodag_show(void) gnrc_rpl_dodag_t *dodag = NULL; char addr_str[IPV6_ADDR_MAX_STR_LEN]; - int8_t cleanup; uint64_t tc, xnow = xtimer_now_usec64(); for (uint8_t i = 0; i < GNRC_RPL_INSTANCES_NUMOF; ++i) { @@ -275,14 +274,12 @@ int _gnrc_rpl_dodag_show(void) | dodag->trickle.msg_timer.target) - xnow; tc = (int64_t) tc < 0 ? 0 : tc / US_PER_SEC; - cleanup = dodag->instance->cleanup < 0 ? 0 : dodag->instance->cleanup; - - printf("\tdodag [%s | R: %d | OP: %s | PIO: %s | CL: %ds | " + printf("\tdodag [%s | R: %d | OP: %s | PIO: %s | " "TR(I=[%d,%d], k=%d, c=%d, TC=%" PRIu32 "s)]\n", ipv6_addr_to_str(addr_str, &dodag->dodag_id, sizeof(addr_str)), dodag->my_rank, (dodag->node_status == GNRC_RPL_LEAF_NODE ? "Leaf" : "Router"), ((dodag->dio_opts & GNRC_RPL_REQ_DIO_OPT_PREFIX_INFO) ? "on" : "off"), - (int) cleanup, (1 << dodag->dio_min), dodag->dio_interval_doubl, dodag->trickle.k, + (1 << dodag->dio_min), dodag->dio_interval_doubl, dodag->trickle.k, dodag->trickle.c, (uint32_t) (tc & 0xFFFFFFFF)); #ifdef MODULE_GNRC_RPL_P2P @@ -297,9 +294,9 @@ int _gnrc_rpl_dodag_show(void) gnrc_rpl_parent_t *parent; LL_FOREACH(gnrc_rpl_instances[i].dodag.parents, parent) { - printf("\t\tparent [addr: %s | rank: %d | lifetime: %" PRIu32 "s]\n", + printf("\t\tparent [addr: %s | rank: %d]\n", ipv6_addr_to_str(addr_str, &parent->addr, sizeof(addr_str)), - parent->rank, parent->lifetime); + parent->rank); } } return 0;