ENUM BATADV_COUNTERS(9)
π enum batadv_counters(9) β¨
okay bestie, so this is a page out of the Kernel API Manual, and before we even get into it β this one is so satisfying. it's just... a whole enum of traffic counter indices. one job. 39 constants. zero drama. main character energy of the "I count things" variety π
so like, in the net/batman-adv kernel source, there's this enum called batadv_counters and honestly? its whole name says it: <pink>indices for traffic counters</pink>. that's it. that's the vibe. every packet that goes out, comes in, gets forwarded, gets dropped, gets fragmented, gets roamed β somebody's counting it, and these are the slots in the array where those numbers live. π
β¨ SYNOPSIS β¨
here's the whole squad, in order, exactly as declared β no cap:
enum batadv_counters {
BATADV_CNT_TX ,
BATADV_CNT_TX_BYTES ,
BATADV_CNT_TX_DROPPED ,
BATADV_CNT_RX ,
BATADV_CNT_RX_BYTES ,
BATADV_CNT_FORWARD ,
BATADV_CNT_FORWARD_BYTES ,
BATADV_CNT_MGMT_TX ,
BATADV_CNT_MGMT_TX_BYTES ,
BATADV_CNT_MGMT_RX ,
BATADV_CNT_MGMT_RX_BYTES ,
BATADV_CNT_FRAG_TX ,
BATADV_CNT_FRAG_TX_BYTES ,
BATADV_CNT_FRAG_RX ,
BATADV_CNT_FRAG_RX_BYTES ,
BATADV_CNT_FRAG_FWD ,
BATADV_CNT_FRAG_FWD_BYTES ,
BATADV_CNT_TT_REQUEST_TX ,
BATADV_CNT_TT_REQUEST_RX ,
BATADV_CNT_TT_RESPONSE_TX ,
BATADV_CNT_TT_RESPONSE_RX ,
BATADV_CNT_TT_ROAM_ADV_TX ,
BATADV_CNT_TT_ROAM_ADV_RX ,
BATADV_CNT_MCAST_TX ,
BATADV_CNT_MCAST_TX_BYTES ,
BATADV_CNT_MCAST_TX_LOCAL ,
BATADV_CNT_MCAST_TX_LOCAL_BYTES ,
BATADV_CNT_MCAST_RX ,
BATADV_CNT_MCAST_RX_BYTES ,
BATADV_CNT_MCAST_RX_LOCAL ,
BATADV_CNT_MCAST_RX_LOCAL_BYTES ,
BATADV_CNT_MCAST_FWD ,
BATADV_CNT_MCAST_FWD_BYTES ,
BATADV_CNT_DAT_GET_TX ,
BATADV_CNT_DAT_GET_RX ,
BATADV_CNT_DAT_PUT_TX ,
BATADV_CNT_DAT_PUT_RX ,
BATADV_CNT_DAT_CACHED_REPLY_TX ,
BATADV_CNT_NUM
};
yeah the trailing comma after BATADV_CNT_NUM and the lonely little }; with that blank line β that's exactly how it's written. we respect the formatting. periodt. β
πΈ Constants πΈ
okay now the individual girlies, one by one, with what they actually count. no skipping, we're doing all of them π
BATADV_CNT_TXβ transmitted payload traffic packet counter π¦BATADV_CNT_TX_BYTESβ transmitted payload traffic bytes counter. yeah she's the byte twin, they come in pairs here πBATADV_CNT_TX_DROPPEDβ dropped transmission payload traffic packet counter. the sad one. the "it tried and it didn't make it" counter πBATADV_CNT_RXβ received payload traffic packet counterBATADV_CNT_RX_BYTESβ received payload traffic bytes counterBATADV_CNT_FORWARDβ forwarded payload traffic packet counter π₯ not for us, just passing through, iconicBATADV_CNT_FORWARD_BYTESβ forwarded payload traffic bytes counterBATADV_CNT_MGMT_TXβ transmitted routing protocol traffic packet counter. different genre entirely, she's management πBATADV_CNT_MGMT_TX_BYTESβ transmitted routing protocol traffic bytes counterBATADV_CNT_MGMT_RXβ received routing protocol traffic packet counterBATADV_CNT_MGMT_RX_BYTESβ received routing protocol traffic bytes counterBATADV_CNT_FRAG_TXβ transmitted fragment traffic packet counter π§©BATADV_CNT_FRAG_TX_BYTESβ transmitted fragment traffic bytes counterBATADV_CNT_FRAG_RXβ received fragment traffic packet counterBATADV_CNT_FRAG_RX_BYTESβ received fragment traffic bytes counterBATADV_CNT_FRAG_FWDβ forwarded fragment traffic packet counterBATADV_CNT_FRAG_FWD_BYTESβ forwarded fragment traffic bytes counterBATADV_CNT_TT_REQUEST_TXβ transmitted tt req traffic packet counter π (yes, it literally just says "tt req" in the original, we keep it)BATADV_CNT_TT_REQUEST_RXβ received tt req traffic packet counterBATADV_CNT_TT_RESPONSE_TXβ transmitted tt resp traffic packet counterBATADV_CNT_TT_RESPONSE_RXβ received tt resp traffic packet counterBATADV_CNT_TT_ROAM_ADV_TXβ transmitted tt roam traffic packet counter π¦ roaming charges but make it meshBATADV_CNT_TT_ROAM_ADV_RXβ received tt roam traffic packet counterBATADV_CNT_MCAST_TXβ transmitted batman-adv multicast packets counter πBATADV_CNT_MCAST_TX_BYTESβ transmitted batman-adv multicast packets bytes counterBATADV_CNT_MCAST_TX_LOCALβ counter for multicast packets which were locally encapsulated and transmitted as batman-adv multicast packets β¨ (she's the "we made this ourselves" counter)BATADV_CNT_MCAST_TX_LOCAL_BYTESβ bytes counter for multicast packets which were locally encapsulated and transmitted as batman-adv multicast packetsBATADV_CNT_MCAST_RXβ received batman-adv multicast packet counterBATADV_CNT_MCAST_RX_BYTESβ received batman-adv multicast packet bytes counterBATADV_CNT_MCAST_RX_LOCALβ counter for received batman-adv multicast packets which were forwarded to the local mesh interface π«Ά (iapprove, homegirl made it to us)BATADV_CNT_MCAST_RX_LOCAL_BYTESβ bytes counter for received batman-adv multicast packets which were forwarded to the local mesh interfaceBATADV_CNT_MCAST_FWDβ counter for received batman-adv multicast packets which were forwarded to other, neighboring nodes π generosity!! sharing!!BATADV_CNT_MCAST_FWD_BYTESβ bytes counter for received batman-adv multicast packets which were forwarded to other, neighboring nodesBATADV_CNT_DAT_GET_TXβ transmitted dht GET traffic packet counter π‘BATADV_CNT_DAT_GET_RXβ received dht GET traffic packet counterBATADV_CNT_DAT_PUT_TXβ transmitted dht PUT traffic packet counterBATADV_CNT_DAT_PUT_RXβ received dht PUT traffic packet counterBATADV_CNT_DAT_CACHED_REPLY_TXβ transmitted dat cache reply traffic packet counter π (note: this one says "dat", not "dht", and she is valid)BATADV_CNT_NUMβ number of traffic counters π’ the final boss, the sentinel, the "how many even are there" answer
ngl the_TX/_TX_BYTESpattern repeats like five separate times across payload / mgmt / frag / mcast and honestly? consistency is attractive. we love a system. π
β SEE ALSO β
okay so the original says: Kernel file ./net/batman-adv/types.h β that's the file, go look at it, everything below lives there. and then the entire friend group of structs and enums that share the same header, all cross-referenced with the glorious (9) suffix. deep breath. here we go π₯
batadv_dat_addr_t(9)enum batadv_dhcp_recipient(9)BATADV_TT_REMOTE_MASK(9)BATADV_TT_SYNC_MASK(9)struct batadv_ogm_buf(9)struct batadv_hard_iface_bat_iv(9)enum batadv_v_hard_iface_flags(9)struct batadv_hard_iface_bat_v(9)enum batadv_hard_iface_wifi_flags(9)struct batadv_wifi_net_device_state(9)struct batadv_hard_iface(9)struct batadv_orig_ifinfo_bat_iv(9)struct batadv_orig_ifinfo(9)struct batadv_frag_table_entry(9)struct batadv_frag_list_entry(9)struct batadv_vlan_tt(9)struct batadv_orig_node_vlan(9)struct batadv_orig_bat_iv(9)struct batadv_orig_node(9)enum batadv_orig_capabilities(9)struct batadv_gw_node(9)struct batadv_hardif_neigh_node_bat_v(9)struct batadv_hardif_neigh_node(9)struct batadv_neigh_node(9)struct batadv_neigh_ifinfo_bat_iv(9)struct batadv_neigh_ifinfo_bat_v(9)struct batadv_neigh_ifinfo(9)struct batadv_bcast_duplist_entry(9)struct batadv_priv_tt(9)struct batadv_priv_bla(9)struct batadv_priv_gw(9)struct batadv_priv_tvlv(9)struct batadv_priv_dat(9)struct batadv_mcast_querier_state(9)struct batadv_mcast_mla_flags(9)struct batadv_priv_mcast(9)struct batadv_tp_unacked(9)struct batadv_tp_vars_common(9)struct batadv_tp_sender_cc(9)struct batadv_tp_sender(9)struct batadv_tp_receiver(9)struct batadv_meshif_vlan(9)struct batadv_priv_bat_v(9)struct batadv_priv(9)enum batadv_bla_backbone_gw_state(9)struct batadv_bla_backbone_gw(9)struct batadv_bla_claim(9)struct batadv_tt_common_entry(9)struct batadv_tt_local_entry(9)struct batadv_tt_global_entry(9)struct batadv_tt_orig_list_entry(9)struct batadv_tt_change_node(9)struct batadv_tt_req_node(9)struct batadv_tt_roam_node(9)struct batadv_skb_cb(9)struct batadv_forw_packet(9)struct batadv_algo_iface_ops(9)struct batadv_algo_neigh_ops(9)struct batadv_algo_orig_ops(9)struct batadv_algo_gw_ops(9)struct batadv_algo_ops(9)struct batadv_dat_entry(9)struct batadv_hw_addr(9)struct batadv_dat_candidate(9)struct batadv_tvlv_container(9)struct batadv_tvlv_handler(9)enum batadv_tvlv_handler_flags(9)
like... that's the whole types.h roster. she's popular. she knows everyone. π
and that's the page!! mwah π
okay last thing, the cute sign-off: the source is ./net/batman-adv, the version/date stamp on this bad girl is October 2026, and the manual section is enum batadv_counters(9). so like β October 2026, ./net/batman-adv, section 9. noted, saved, screenshotted, pinned in the group chat. πβ¨π¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms