1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

gnrc_rpl: shell: adapt to evtimer for RPL events

This commit is contained in:
Cenk Gündoğan 2017-11-30 21:23:44 +01:00
parent b819ac8d35
commit 441f11ea45
14 changed files with 32 additions and 35 deletions

View File

@ -1,7 +1,7 @@
/*
* Copyright (C) 2013 - 2014 INRIA.
* Copyright (C) 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
* Copyright (C) 2015 Cenk Gündoğan <cnkgndgn@gmail.com>
* Copyright (C) 2015 - 2018 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*
* 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 <eric.engel@fu-berlin.de>
* @author Fabian Brandt <fabianbr@zedat.fu-berlin.de>
* @author Martine Lenders <mlenders@inf.fu-berlin.de>
* @author Cenk Gündoğan <cnkgndgn@gmail.com>
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*/
#ifndef NET_GNRC_RPL_H

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2016 Cenk Gündoğan <mail@cgundogan.de>
* Copyright (C) 2016 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*
* 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 <mail@cgundogan.de>
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*/
#ifndef NET_GNRC_RPL_P2P_STRUCTS_H

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2017 HAW Hamburg
* Copyright (C) 20152017 Cenk Gündoğan <mail-github@cgundogan.de>
* Copyright (C) 20152018 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
* Copyright (C) 2013 INRIA.
*
* This file is subject to the terms and conditions of the GNU Lesser

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2017 HAW Hamburg
* Copyright (C) 20152017 Cenk Gündoğan <mail-github@cgundogan.de>
* Copyright (C) 2018 HAW Hamburg
* Copyright (C) 20152017 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*
* 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 <mail-github@cgundogan.de>
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*/
#include "net/icmpv6.h"

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2016 Cenk Gündoğan <mail@cgundogan.de>
* Copyright (C) 2016 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*
* 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 <mail@cgundogan.de>
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*/
#ifdef MODULE_AUTO_INIT_GNRC_RPL

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2017 HAW Hamburg
* Copyright (C) 20152017 Cenk Gündoğan <mail-github@cgundogan.de>
* Copyright (C) 2018 HAW Hamburg
* Copyright (C) 20152017 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
* Copyright (C) 20132014 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 <mail-github@cgundogan.de>
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*/
#include "net/af.h"

View File

@ -1,6 +1,6 @@
/**
* Copyright (C) 2017 HAW Hamburg
* Copyright (C) 20152017 Cenk Gündoğan <mail-github@cgundogan.de>
* Copyright (C) 2018 HAW Hamburg
* Copyright (C) 20152017 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
* Copyright (C) 20132014 INRIA.
*
* This file is subject to the terms and conditions of the GNU Lesser
@ -13,7 +13,7 @@
*
* @file
* @author Eric Engel <eric.engel@fu-berlin.de>
* @author Cenk Gündoğan <mail-github@cgundogan.de>
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*/
#include <stdbool.h>

View File

@ -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 <mail-github@cgundogan.de>
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*/
#ifndef GLOBALS_H

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2016 Cenk Gündoğan <mail@cgundogan.de>
* Copyright (C) 2016 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*
* 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 <mail@cgundogan.de>
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*/
#ifndef NETSTATS_H

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2016 Cenk Gündoğan <mail@cgundogan.de>
* Copyright (C) 2016 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*
* 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 <mail@cgundogan.de>
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*/
#ifndef VALIDATION_H

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2016 Cenk Gündoğan <mail@cgundogan.de>
* Copyright (C) 2016 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*
* 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 <mail@cgundogan.de>
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*/
#include "net/gnrc/icmpv6.h"

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2016 Cenk Gündoğan <mail@cgundogan.de>
* Copyright (C) 2016 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*
* 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 <mail@cgundogan.de>
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*/
#include "net/icmpv6.h"

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2016 Cenk Gündoğan <mail@cgundogan.de>
* Copyright (C) 2016 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*
* 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 <mail@cgundogan.de>
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
*/
#include <string.h>

View File

@ -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;