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

Function compute_bw_meter_flags

freebsd/netinet/ip_mroute.c:1741–1756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1739#define BW_TIMEVALADD(vvp, uvp) timevaladd((vvp), (uvp))
1740
1741static uint32_t
1742compute_bw_meter_flags(struct bw_upcall *req)
1743{
1744 uint32_t flags = 0;
1745
1746 if (req->bu_flags & BW_UPCALL_UNIT_PACKETS)
1747 flags |= BW_METER_UNIT_PACKETS;
1748 if (req->bu_flags & BW_UPCALL_UNIT_BYTES)
1749 flags |= BW_METER_UNIT_BYTES;
1750 if (req->bu_flags & BW_UPCALL_GEQ)
1751 flags |= BW_METER_GEQ;
1752 if (req->bu_flags & BW_UPCALL_LEQ)
1753 flags |= BW_METER_LEQ;
1754
1755 return flags;
1756}
1757
1758/*
1759 * Add a bw_meter entry

Callers 2

add_bw_upcallFunction · 0.85
del_bw_upcallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected