gnrc_rpl: shell: adapt to evtimer for RPL events
This commit is contained in:
parent
b819ac8d35
commit
441f11ea45
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2013 - 2014 INRIA.
|
* Copyright (C) 2013 - 2014 INRIA.
|
||||||
* Copyright (C) 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
|
* 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
|
* 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
|
* 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 Eric Engel <eric.engel@fu-berlin.de>
|
||||||
* @author Fabian Brandt <fabianbr@zedat.fu-berlin.de>
|
* @author Fabian Brandt <fabianbr@zedat.fu-berlin.de>
|
||||||
* @author Martine Lenders <mlenders@inf.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
|
#ifndef NET_GNRC_RPL_H
|
||||||
|
|||||||
@ -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
|
* 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
|
* 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.
|
* 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
|
#ifndef NET_GNRC_RPL_P2P_STRUCTS_H
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 HAW Hamburg
|
* Copyright (C) 2017 HAW Hamburg
|
||||||
* Copyright (C) 2015–2017 Cenk Gündoğan <mail-github@cgundogan.de>
|
* Copyright (C) 2015–2018 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
|
||||||
* Copyright (C) 2013 INRIA.
|
* Copyright (C) 2013 INRIA.
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU Lesser
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 HAW Hamburg
|
* Copyright (C) 2018 HAW Hamburg
|
||||||
* Copyright (C) 2015–2017 Cenk Gündoğan <mail-github@cgundogan.de>
|
* Copyright (C) 2015–2017 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU Lesser
|
* 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
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
@ -12,7 +12,7 @@
|
|||||||
*
|
*
|
||||||
* @file
|
* @file
|
||||||
*
|
*
|
||||||
* @author Cenk Gündoğan <mail-github@cgundogan.de>
|
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "net/icmpv6.h"
|
#include "net/icmpv6.h"
|
||||||
|
|||||||
@ -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
|
* 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
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
@ -14,7 +14,7 @@
|
|||||||
* @file
|
* @file
|
||||||
* @brief Auto initialization for gnrc_rpl
|
* @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
|
#ifdef MODULE_AUTO_INIT_GNRC_RPL
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 HAW Hamburg
|
* Copyright (C) 2018 HAW Hamburg
|
||||||
* Copyright (C) 2015–2017 Cenk Gündoğan <mail-github@cgundogan.de>
|
* Copyright (C) 2015–2017 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
|
||||||
* Copyright (C) 2013–2014 INRIA.
|
* Copyright (C) 2013–2014 INRIA.
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU Lesser General
|
* This file is subject to the terms and conditions of the GNU Lesser General
|
||||||
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @file
|
* @file
|
||||||
*
|
*
|
||||||
* @author Cenk Gündoğan <mail-github@cgundogan.de>
|
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "net/af.h"
|
#include "net/af.h"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (C) 2017 HAW Hamburg
|
* Copyright (C) 2018 HAW Hamburg
|
||||||
* Copyright (C) 2015–2017 Cenk Gündoğan <mail-github@cgundogan.de>
|
* Copyright (C) 2015–2017 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
|
||||||
* Copyright (C) 2013–2014 INRIA.
|
* Copyright (C) 2013–2014 INRIA.
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU Lesser
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @file
|
* @file
|
||||||
* @author Eric Engel <eric.engel@fu-berlin.de>
|
* @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>
|
#include <stdbool.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
|
* 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
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* @file
|
* @file
|
||||||
* @brief Internal globals for RPL
|
* @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
|
#ifndef GLOBALS_H
|
||||||
|
|||||||
@ -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
|
* 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
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* @file
|
* @file
|
||||||
* @brief RPL control message statistics functions
|
* @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
|
#ifndef NETSTATS_H
|
||||||
|
|||||||
@ -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
|
* 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
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* @file
|
* @file
|
||||||
* @brief RPL control message validation functions
|
* @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
|
#ifndef VALIDATION_H
|
||||||
|
|||||||
@ -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
|
* 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
|
* Public License v2.1. See the file LICENSE in the top level directory for more
|
||||||
@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
* @file
|
* @file
|
||||||
*
|
*
|
||||||
* @author Cenk Gündoğan <mail@cgundogan.de>
|
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "net/gnrc/icmpv6.h"
|
#include "net/gnrc/icmpv6.h"
|
||||||
|
|||||||
@ -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
|
* 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
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
* @file
|
* @file
|
||||||
*
|
*
|
||||||
* @author Cenk Gündoğan <mail@cgundogan.de>
|
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "net/icmpv6.h"
|
#include "net/icmpv6.h"
|
||||||
|
|||||||
@ -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
|
* 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
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
@ -10,7 +10,7 @@
|
|||||||
* @{
|
* @{
|
||||||
*
|
*
|
||||||
* @file
|
* @file
|
||||||
* @author Cenk Gündoğan <mail@cgundogan.de>
|
* @author Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|||||||
@ -256,7 +256,6 @@ int _gnrc_rpl_dodag_show(void)
|
|||||||
|
|
||||||
gnrc_rpl_dodag_t *dodag = NULL;
|
gnrc_rpl_dodag_t *dodag = NULL;
|
||||||
char addr_str[IPV6_ADDR_MAX_STR_LEN];
|
char addr_str[IPV6_ADDR_MAX_STR_LEN];
|
||||||
int8_t cleanup;
|
|
||||||
uint64_t tc, xnow = xtimer_now_usec64();
|
uint64_t tc, xnow = xtimer_now_usec64();
|
||||||
|
|
||||||
for (uint8_t i = 0; i < GNRC_RPL_INSTANCES_NUMOF; ++i) {
|
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;
|
| dodag->trickle.msg_timer.target) - xnow;
|
||||||
tc = (int64_t) tc < 0 ? 0 : tc / US_PER_SEC;
|
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 | "
|
||||||
|
|
||||||
printf("\tdodag [%s | R: %d | OP: %s | PIO: %s | CL: %ds | "
|
|
||||||
"TR(I=[%d,%d], k=%d, c=%d, TC=%" PRIu32 "s)]\n",
|
"TR(I=[%d,%d], k=%d, c=%d, TC=%" PRIu32 "s)]\n",
|
||||||
ipv6_addr_to_str(addr_str, &dodag->dodag_id, sizeof(addr_str)),
|
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->my_rank, (dodag->node_status == GNRC_RPL_LEAF_NODE ? "Leaf" : "Router"),
|
||||||
((dodag->dio_opts & GNRC_RPL_REQ_DIO_OPT_PREFIX_INFO) ? "on" : "off"),
|
((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));
|
dodag->trickle.c, (uint32_t) (tc & 0xFFFFFFFF));
|
||||||
|
|
||||||
#ifdef MODULE_GNRC_RPL_P2P
|
#ifdef MODULE_GNRC_RPL_P2P
|
||||||
@ -297,9 +294,9 @@ int _gnrc_rpl_dodag_show(void)
|
|||||||
|
|
||||||
gnrc_rpl_parent_t *parent;
|
gnrc_rpl_parent_t *parent;
|
||||||
LL_FOREACH(gnrc_rpl_instances[i].dodag.parents, 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)),
|
ipv6_addr_to_str(addr_str, &parent->addr, sizeof(addr_str)),
|
||||||
parent->rank, parent->lifetime);
|
parent->rank);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user