ENUM BATADV_COUNTERS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌈 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 counter
  • BATADV_CNT_RX_BYTES β€” received payload traffic bytes counter
  • BATADV_CNT_FORWARD β€” forwarded payload traffic packet counter πŸ”₯ not for us, just passing through, iconic
  • BATADV_CNT_FORWARD_BYTES β€” forwarded payload traffic bytes counter
  • BATADV_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 counter
  • BATADV_CNT_MGMT_RX β€” received routing protocol traffic packet counter
  • BATADV_CNT_MGMT_RX_BYTES β€” received routing protocol traffic bytes counter
  • BATADV_CNT_FRAG_TX β€” transmitted fragment traffic packet counter 🧩
  • BATADV_CNT_FRAG_TX_BYTES β€” transmitted fragment traffic bytes counter
  • BATADV_CNT_FRAG_RX β€” received fragment traffic packet counter
  • BATADV_CNT_FRAG_RX_BYTES β€” received fragment traffic bytes counter
  • BATADV_CNT_FRAG_FWD β€” forwarded fragment traffic packet counter
  • BATADV_CNT_FRAG_FWD_BYTES β€” forwarded fragment traffic bytes counter
  • BATADV_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 counter
  • BATADV_CNT_TT_RESPONSE_TX β€” transmitted tt resp traffic packet counter
  • BATADV_CNT_TT_RESPONSE_RX β€” received tt resp traffic packet counter
  • BATADV_CNT_TT_ROAM_ADV_TX β€” transmitted tt roam traffic packet counter πŸ¦‹ roaming charges but make it mesh
  • BATADV_CNT_TT_ROAM_ADV_RX β€” received tt roam traffic packet counter
  • BATADV_CNT_MCAST_TX β€” transmitted batman-adv multicast packets counter 🌈
  • BATADV_CNT_MCAST_TX_BYTES β€” transmitted batman-adv multicast packets bytes counter
  • BATADV_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 packets
  • BATADV_CNT_MCAST_RX β€” received batman-adv multicast packet counter
  • BATADV_CNT_MCAST_RX_BYTES β€” received batman-adv multicast packet bytes counter
  • BATADV_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 interface
  • BATADV_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 nodes
  • BATADV_CNT_DAT_GET_TX β€” transmitted dht GET traffic packet counter πŸ“‘
  • BATADV_CNT_DAT_GET_RX β€” received dht GET traffic packet counter
  • BATADV_CNT_DAT_PUT_TX β€” transmitted dht PUT traffic packet counter
  • BATADV_CNT_DAT_PUT_RX β€” received dht PUT traffic packet counter
  • BATADV_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_BYTES pattern 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