From bf9fa6d34f21cb14c74effa799a4b1cf684aa448 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sun, 9 Sep 2018 20:24:36 +0100 Subject: [PATCH] Fix multicast engine stats extension usage --- os/net/ipv6/multicast/esmrf.c | 4 +++- os/net/ipv6/multicast/esmrf.h | 9 +-------- os/net/ipv6/multicast/smrf.h | 12 ------------ 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/os/net/ipv6/multicast/esmrf.c b/os/net/ipv6/multicast/esmrf.c index 00619c354..5b6f1b863 100644 --- a/os/net/ipv6/multicast/esmrf.c +++ b/os/net/ipv6/multicast/esmrf.c @@ -376,7 +376,9 @@ in() static void init() { - UIP_MCAST6_STATS_INIT(NULL); + ESMRF_STATS_INIT(); + UIP_MCAST6_STATS_INIT(&stats); + uip_mcast6_route_init(); /* Register the ICMPv6 input handler */ uip_icmp6_register_input_handler(&esmrf_icmp_handler); diff --git a/os/net/ipv6/multicast/esmrf.h b/os/net/ipv6/multicast/esmrf.h index a44a87396..15857a1d4 100644 --- a/os/net/ipv6/multicast/esmrf.h +++ b/os/net/ipv6/multicast/esmrf.h @@ -68,16 +68,9 @@ /* Stats datatype */ /*---------------------------------------------------------------------------*/ struct esmrf_stats { - uint16_t mcast_in_unique; - uint16_t mcast_in_all; /* At layer 3 */ - uint16_t mcast_in_ours; /* Unique and we are a group member */ - uint16_t mcast_fwd; /* Forwarded by us but we are not the seed */ - uint16_t mcast_out; /* We are the seed */ - uint16_t mcast_bad; - uint16_t mcast_dropped; uint16_t icmp_out; uint16_t icmp_in; uint16_t icmp_bad; }; - +/*---------------------------------------------------------------------------*/ #endif /* ESMRF_H_ */ diff --git a/os/net/ipv6/multicast/smrf.h b/os/net/ipv6/multicast/smrf.h index bbe7e5e26..d69aa73a5 100644 --- a/os/net/ipv6/multicast/smrf.h +++ b/os/net/ipv6/multicast/smrf.h @@ -70,18 +70,6 @@ #define SMRF_MAX_SPREAD 4 #endif /*---------------------------------------------------------------------------*/ -/* Stats datatype */ -/*---------------------------------------------------------------------------*/ -struct smrf_stats { - uint16_t mcast_in_unique; - uint16_t mcast_in_all; /* At layer 3 */ - uint16_t mcast_in_ours; /* Unique and we are a group member */ - uint16_t mcast_fwd; /* Forwarded by us but we are not the seed */ - uint16_t mcast_out; /* We are the seed */ - uint16_t mcast_bad; - uint16_t mcast_dropped; -}; -/*---------------------------------------------------------------------------*/ #endif /* SMRF_H_ */ /*---------------------------------------------------------------------------*/ /** @} */