From 7ebbe05f46e1b8530a61dd144a4bf36a1c63a4a3 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 12 Sep 2014 16:53:24 +0200 Subject: Add per-peer stats --- src/fastd.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/fastd.h') diff --git a/src/fastd.h b/src/fastd.h index 94c9fc7..f38b9e8 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -393,17 +393,6 @@ static inline size_t fastd_max_payload(void) { } } -/** Adds statistics for a single packet of a given size */ -static inline void fastd_stats_add(UNUSED fastd_peer_t *peer, UNUSED fastd_stat_type_t stat, UNUSED size_t bytes) { -#ifdef WITH_STATUS_SOCKET - if (!bytes) - return; - - ctx.stats.packets[stat]++; - ctx.stats.bytes[stat] += bytes; -#endif -} - /** Checks if a fastd_peer_address_t is an IPv6 link-local address */ static inline bool fastd_peer_address_is_v6_ll(const fastd_peer_address_t *addr) { return (addr->sa.sa_family == AF_INET6 && IN6_IS_ADDR_LINKLOCAL(&addr->in6.sin6_addr)); -- cgit v1.2.3