MCPcopy Create free account
hub / github.com/F-Stack/f-stack / if_inc_counter

Function if_inc_counter

freebsd/net/if.c:1774–1781  ·  view source on GitHub ↗

* Increase an ifnet counter. Usually used for counters shared * between the stack and a driver, but function supports them all. */

Source from the content-addressed store, hash-verified

1772 * between the stack and a driver, but function supports them all.
1773 */
1774void
1775if_inc_counter(struct ifnet *ifp, ift_counter cnt, int64_t inc)
1776{
1777
1778 KASSERT(cnt < IFCOUNTERS, ("%s: invalid cnt %d", __func__, cnt));
1779
1780 counter_u64_add(ifp->if_counters[cnt], inc);
1781}
1782
1783/*
1784 * Copy data from ifnet to userland API structure if_data.

Callers 15

pflog_packetFunction · 0.85
pfsync_inputFunction · 0.85
pfsync_sendoutFunction · 0.85
sta_inputFunction · 0.85
ieee80211_dwds_mcastFunction · 0.85
wds_inputFunction · 0.85
adhoc_inputFunction · 0.85
monitor_inputFunction · 0.85
ieee80211_deliver_dataFunction · 0.85
hostap_deliver_dataFunction · 0.85
hostap_inputFunction · 0.85

Calls 1

counter_u64_addFunction · 0.50

Tested by

no test coverage detected