aa_match_to_prot(9)
π¦ aa_match_to_prot(9) β Kernel API Manual π¦
okay bestie, welcome to the Kernel API Manual page for aa_match_to_prot(9) β the function that matches the af, type, protocol triplet. it's giving socket-policy matchmaker and we're obsessed π
π NAME π
aa_match_to_prot β match the af, type, protocol triplet. periodt.
β¨ SYNOPSIS β¨
aa_state_t aa_match_to_prot (struct aa_policydb *policy , aa_state_t
state , u32 request , u16 af , int type , int protocol , struct aa_perms
**p , const char **info );
πΈ ARGUMENTS πΈ
policyβ the policy being matched πstateβ the state to start in π«Άrequestβ the permissions being requested, ignored ifp == NULLπafβ socket address family πtypeβ socket type π§protocolβ socket protocol π‘pβ output β pointer to permission associated with match πinfoβ output β pointer to string describing failure π
π«Ά RETURN π«Ά
the state match stopped in. that's the whole vibe β
π DESCRIPTION π
okay so here's the tea: if p is assigned a value, the returned state will be the corresponding state. it will not set p on failure, or if the match completes only if an early match occurs. no cap π
π SEE ALSO π
- Kernel file
./security/apparmor/net.cβ that's the spot, iykyk π₯
mwah π β this gem comes from source path ./security/apparmor, dated October 2026, and it's the aa_match_to_prot(9) manual page. 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