ksz_port_get_apptrust(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ksz_port_get_apptrust β€” the glow-up guide πŸ’–

okay so bestie, this is a page from the Kernel API Manual (section 9, the kernel-functions one, iykyk) and it's literally all about ksz_port_get_apptrust. yes that's a mouthful, yes she's iconic, let's go ✨


🌸 NAME 🌸

ksz_port_get_apptrust β€” retrieves the apptrust selectors for a port on a KSZ switch πŸŽ€

like, it goes and gets the apptrust selectors. for a port. on a KSZ switch. that's the whole vibe fr fr.


✨ SYNOPSIS ✨

int ksz_port_get_apptrust (struct dsa_switch *ds , int port , u8 *sel ,
int *nsel );

returns an int, takes four things, no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ds β€” pointer to the DSA switch structure. yes, the whole switch. she's the main character here πŸ‘‘
  • port β€” the port number you want the apptrust selectors for. pick your fave port πŸ“
  • sel β€” array where the apptrust selectors get stored. this is where the good stuff lands πŸ’–
  • nsel β€” number of apptrust selectors in the array. the headcount, basically 🌈

πŸ’œ DESCRIPTION πŸ’œ

so what does she actually do? this function fetches the apptrust selectors for the specified port on a KSZ switch. that's it, that's the plot. short and slay ✨


πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • a negative error code on failure 😭 (not me getting a negative error code)

🌟 SEE ALSO 🌟

the kernel file lives right here, go look at her:

./drivers/net/dsa/microchip/ksz_dcb.c

and here's the whole friend group, all of them, no skipping 🫢


ngl bestie, everything above is straight from the source β€” I didn't invent a single flag, value, or behaviour. if it's not on this page, it's not real πŸ’€

πŸŽ€ okay that's the whole page, mwah πŸ’‹ β€” this one's from the kernel source tree at ./drivers/net/dsa/microchip, dated October 2026, filed under the Kernel API Manual as ksz_port_get_apptrust(9). go get those apptrust selectors, queen πŸ‘‘βœ¨πŸ¦‹

πŸ“¦ where this page comes from