batadv_mcast...hif_get_ipv4(9)
π batadv_mcast...hif_get_ipv4(9) β the Kernel API Manual, bestie edition
okay so real talk, the header on this page is doing that thing where it shortens the name to batadv_mcast...hif_get_ipv4(9) because the full one is a whole mouthful, and the manual it lives in is also literally called batadv_mcast...hif_get_ipv4(9). iconic of the kernel to be like that. anyway, here's what this lil function actually does π«Ά
β¨ NAME β¨
batadv_mcast_mla_rtr_flags_meshif_get_ipv4 β grab the mcast router flags from the node, but for IPv4 specifically π
(and yes that's the actual name, the header just couldn't fit it, we've all been there π)
πΈ SYNOPSIS πΈ
u8 batadv_mcast_mla_rtr_flags_meshif_get_ipv4 (struct net_device *dev );
it takes a device and hands you back a u8, that's the whole vibe β¨
π ARGUMENTS π
devβ the interface you're checking, that's it, that's the argument π
π¦ DESCRIPTION π¦
so basically it checks whether there's an IPv4 multicast router hanging out on this node. presence check, lowkey simple, highkey important π₯
β οΈ real one: the caller needs to hold the rcu read lock. no cap, that's a hard requirement β don't come at this function without it π€
β RETURN β
it's giving two possible answers:
BATADV_NO_FLAGSβ if the router is present πBATADV_MCAST_WANT_NO_RTR4β otherwise π
yes, the "present" answer is the no-flags one. yes, it's a little mind-bending. no, you don't get to question it, that's just how it is π
π SEE ALSO π
the whole friend group lives in the kernel file ./net/batman-adv/multicast.c, and honestly the whole squad is linked here so you can go meet them all π§
batadv_mcast_start_timer(9)batadv_mcast_get_bridge(9)batadv_mcast_mla_rtr_flags_meshif_get_ipv6(9)batadv_mcast_mla_rtr_flags_meshif_get(9)batadv_mcast_mla_rtr_flags_bridge_get(9)batadv_mcast_mla_rtr_flags_get(9)batadv_mcast_mla_forw_flags_get(9)batadv_mcast_mla_flags_get(9)batadv_mcast_mla_is_duplicate(9)batadv_mcast_mla_meshif_get_ipv4(9)batadv_mcast_mla_meshif_get_ipv6(9)batadv_mcast_mla_meshif_get(9)batadv_mcast_mla_br_addr_cpy(9)batadv_mcast_mla_bridge_get(9)batadv_mcast_mla_list_free(9)batadv_mcast_mla_tt_retract(9)batadv_mcast_mla_tt_add(9)batadv_mcast_querier_log(9)batadv_mcast_bridge_log(9)batadv_mcast_flags_log(9)batadv_mcast_mla_flags_update(9)__batadv_mcast_mla_update(9)batadv_mcast_mla_update(9)batadv_mcast_is_report_ipv4(9)batadv_mcast_forw_mode_check_ipv4(9)batadv_mcast_is_report_ipv6(9)batadv_mcast_forw_mode_check_ipv6(9)batadv_mcast_forw_mode_check(9)batadv_mcast_forw_want_all_ip_count(9)batadv_mcast_forw_rtr_count(9)batadv_mcast_forw_mode_by_count(9)batadv_mcast_forw_mode(9)batadv_mcast_forw_send_orig(9)batadv_mcast_forw_tt(9)batadv_mcast_forw_want_all_ipv4(9)batadv_mcast_forw_want_all_ipv6(9)batadv_mcast_forw_want_all(9)batadv_mcast_forw_want_all_rtr4(9)batadv_mcast_forw_want_all_rtr6(9)batadv_mcast_forw_want_rtr(9)batadv_mcast_forw_send(9)batadv_mcast_want_unsnoop_update(9)batadv_mcast_want_ipv4_update(9)batadv_mcast_want_ipv6_update(9)batadv_mcast_want_rtr4_update(9)batadv_mcast_want_rtr6_update(9)batadv_mcast_have_mc_ptype_update(9)batadv_mcast_tvlv_flags_get(9)batadv_mcast_tvlv_ogm_handler(9)batadv_mcast_init(9)batadv_mcast_mesh_info_put(9)batadv_mcast_flags_dump_entry(9)batadv_mcast_flags_dump_bucket(9)__batadv_mcast_flags_dump(9)batadv_mcast_netlink_get_primary(9)batadv_mcast_flags_dump(9)batadv_mcast_free(9)batadv_mcast_purge_orig(9)
like, the entire mcast extended universe is right there. iykyk π
π ok that's the page, mwah π
this little love letter to IPv4 multicast router detection lives in ./net/batman-adv and the docs are dated October 2026, all stamped with the name batadv_mcast...hif_get_ipv4(9) β go forth, hold that rcu read lock, and slay π
β¨π
π¦ 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