llc_lookup_listener(9)
π llc_lookup_listener β a Kernel API Manual moment (section 9, bestie) π
okay so picture this: you're deep in the Kernel API Manual, section 9, and you need to know who's listening. That's literally this function. She finds the listener for a local MAC + SAP, and she does it flawlessly. no cap. π
β¨ NAME β¨
llc_lookup_listener β finds the listener for a local MAC + SAP π¦
πΈ SYNOPSIS πΈ
struct sock * llc_lookup_listener (struct llc_sap *sap , struct llc_addr
*laddr , const struct net *net );
π ARGUMENTS π
sapβ the SAP. that's it, that's the whole description. iconic minimalism honestly πladdrβ the address of the local LLC (that's MAC + SAP, both of them, together, a little duo π«Ά)netβ the netns you wanna look up a socket in π
π₯ DESCRIPTION π₯
So what she actually does: she searches the connection list of the SAP and finds the connection that's listening on the local mac and the local sap. very demure, very targeted. π
She returns a pointer to the parent socket she found β and NULL otherwise, because sometimes the answer is just no. π
β οΈ real talk though: the caller has to make sure local_bh is disabled. this is not a suggestion, bestie, it's a whole requirement. do not skip the vibe check on this one. π
π§ SEE ALSO π§
Kernel file ./net/llc/llc_conn.c β and the whole friend group, fr fr:
llc_conn_state_process(9)llc_conn_rtn_pdu(9)llc_conn_resend_i_pdu_as_cmd(9)llc_conn_resend_i_pdu_as_rsp(9)llc_conn_remove_acked_pdus(9)llc_conn_send_pdus(9)llc_conn_service(9)llc_qualify_conn_ev(9)llc_exec_conn_trans_actions(9)__llc_lookup_established(9)llc_data_accept_state(9)llc_find_next_offset(9)llc_build_offset_table(9)llc_find_offset(9)llc_sap_add_socket(9)llc_sap_remove_socket(9)llc_conn_rcv(9)llc_backlog_rcv(9)llc_sk_init(9)llc_sk_alloc(9)llc_sk_free(9)llc_sk_reset(9)
and that's the page!! π source: ./net/llc, dated October 2026, filed under llc_lookup_listener(9). go forth and look up those listeners, bestie, you've got this πβ¨
π¦ 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