diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-12 16:53:24 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-12 16:53:24 +0200 |
commit | 7ebbe05f46e1b8530a61dd144a4bf36a1c63a4a3 (patch) | |
tree | b06313240468ccee6923366d66eebf583e029162 /src/fastd.h | |
parent | d116950984d78392e1daf0adfd89f6cdb4fe8076 (diff) | |
download | fastd-7ebbe05f46e1b8530a61dd144a4bf36a1c63a4a3.tar fastd-7ebbe05f46e1b8530a61dd144a4bf36a1c63a4a3.zip |
Add per-peer stats
Diffstat (limited to 'src/fastd.h')
-rw-r--r-- | src/fastd.h | 11 |
1 files changed, 0 insertions, 11 deletions
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)); |