net: stats: Add missing doxygen comments

Various net_stats structs were missing doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2019-02-20 15:46:43 +02:00 committed by Anas Nashif
parent 9191bf3a0b
commit efff3c68fe

View file

@ -28,18 +28,35 @@ extern "C" {
* @{
*/
/**
* @typedef net_stats_t
* @brief Network statistics counter
*/
typedef u32_t net_stats_t;
/**
* @brief Number of bytes sent and received.
*/
struct net_stats_bytes {
/** Number of bytes sent */
net_stats_t sent;
/** Number of bytes received */
net_stats_t received;
};
/**
* @brief Number of network packets sent and received.
*/
struct net_stats_pkts {
/** Number of packets sent */
net_stats_t tx;
/** Number of packets received */
net_stats_t rx;
};
/**
* @brief IP layer statistics
*/
struct net_stats_ip {
/** Number of received packets at the IP layer. */
net_stats_t recv;
@ -54,6 +71,9 @@ struct net_stats_ip {
net_stats_t drop;
};
/**
* @brief IP layer error statistics
*/
struct net_stats_ip_errors {
/** Number of packets dropped due to wrong IP version
* or header length.
@ -78,6 +98,9 @@ struct net_stats_ip_errors {
net_stats_t protoerr;
};
/**
* @brief ICMP statistics
*/
struct net_stats_icmp {
/** Number of received ICMP packets. */
net_stats_t recv;
@ -95,6 +118,9 @@ struct net_stats_icmp {
net_stats_t chkerr;
};
/**
* @brief TCP statistics
*/
struct net_stats_tcp {
/** Amount of received and sent TCP application data. */
struct net_stats_bytes bytes;
@ -135,6 +161,9 @@ struct net_stats_tcp {
net_stats_t connrst;
};
/**
* @brief UDP statistics
*/
struct net_stats_udp {
/** Number of dropped UDP segments. */
net_stats_t drop;
@ -149,12 +178,18 @@ struct net_stats_udp {
net_stats_t chkerr;
};
/**
* @brief IPv6 neighbor discovery statistics
*/
struct net_stats_ipv6_nd {
net_stats_t drop;
net_stats_t recv;
net_stats_t sent;
};
/**
* @brief IPv6 multicast listener daemon statistics
*/
struct net_stats_ipv6_mld {
/** Number of received IPv6 MLD queries */
net_stats_t recv;
@ -166,15 +201,16 @@ struct net_stats_ipv6_mld {
net_stats_t drop;
};
/**
* @brief Traffic class statistics
*/
struct net_stats_tc {
/** Traffic class sent statistics */
struct {
net_stats_t pkts;
net_stats_t bytes;
u8_t priority;
} sent[NET_TC_TX_COUNT];
/** Traffic class receive statistics */
struct {
net_stats_t pkts;
net_stats_t bytes;
@ -182,51 +218,66 @@ struct net_stats_tc {
} recv[NET_TC_RX_COUNT];
};
/**
* @brief All network statistics in one struct.
*/
struct net_stats {
/** Count of malformed packets or packets we do not have handler for */
net_stats_t processing_error;
/*
/**
* This calculates amount of data transferred through all the
* network interfaces.
*/
struct net_stats_bytes bytes;
/** IP layer errors */
struct net_stats_ip_errors ip_errors;
#if defined(CONFIG_NET_STATISTICS_IPV6)
/** IPv6 statistics */
struct net_stats_ip ipv6;
#endif
#if defined(CONFIG_NET_STATISTICS_IPV4)
/** IPv4 statistics */
struct net_stats_ip ipv4;
#endif
#if defined(CONFIG_NET_STATISTICS_ICMP)
/** ICMP statistics */
struct net_stats_icmp icmp;
#endif
#if defined(CONFIG_NET_STATISTICS_TCP)
/** TCP statistics */
struct net_stats_tcp tcp;
#endif
#if defined(CONFIG_NET_STATISTICS_UDP)
/** UDP statistics */
struct net_stats_udp udp;
#endif
#if defined(CONFIG_NET_STATISTICS_IPV6_ND)
/** IPv6 neighbor discovery statistics */
struct net_stats_ipv6_nd ipv6_nd;
#endif
#if defined(CONFIG_NET_IPV6_MLD)
/** IPv6 MLD statistics */
struct net_stats_ipv6_mld ipv6_mld;
#endif
#if NET_TC_COUNT > 1
/** Traffic class statistics */
struct net_stats_tc tc;
#endif
};
/**
* @brief Ethernet error statistics
*/
struct net_stats_eth_errors {
net_stats_t rx_length_errors;
net_stats_t rx_over_errors;
@ -251,6 +302,9 @@ struct net_stats_eth_errors {
net_stats_t corr_ecc_errors;
};
/**
* @brief Ethernet flow control statistics
*/
struct net_stats_eth_flow {
net_stats_t rx_flow_control_xon;
net_stats_t rx_flow_control_xoff;
@ -258,11 +312,17 @@ struct net_stats_eth_flow {
net_stats_t tx_flow_control_xoff;
};
/**
* @brief Ethernet checksum statistics
*/
struct net_stats_eth_csum {
net_stats_t rx_csum_offload_good;
net_stats_t rx_csum_offload_errors;
};
/**
* @brief Ethernet hardware timestamp statistics
*/
struct net_stats_eth_hw_timestamp {
net_stats_t rx_hwtstamp_cleared;
net_stats_t tx_hwtstamp_timeouts;
@ -270,13 +330,18 @@ struct net_stats_eth_hw_timestamp {
};
#ifdef CONFIG_NET_STATISTICS_ETHERNET_VENDOR
/**
* @brief Ethernet vendor specific statistics
*/
struct net_stats_eth_vendor {
const char * const key;
u32_t value;
};
#endif
/* Ethernet specific statistics */
/**
* @brief All Ethernet specific statistics
*/
struct net_stats_eth {
struct net_stats_bytes bytes;
struct net_stats_pkts pkts;