STRUCT F_NCM_OPTS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct f_ncm_opts(9) πŸŽ€

okay bestie, welcome to the Kernel API Manual ✨ we're looking at struct f_ncm_opts and honestly? she's iconic. it's giving NCM function options and we're gonna get into every single field, no skips, no cap πŸ’…


✨ NAME ✨

struct f_ncm_opts β€” NCM function options πŸ¦‹


✨ SYNOPSIS ✨

struct f_ncm_opts {
    struct usb_function_instance    func_inst;
    struct net_device               *net;
    int bind_count;
    struct config_group             *ncm_interf_group;
    struct usb_os_desc              ncm_os_desc;
    char ncm_ext_compat_id[16];
    struct mutex                    lock;
    int refcnt;
    u16 max_segment_size;
};

look at her. perfect. no notes πŸ”₯


✨ Members ✨

  • func_inst β€” the USB function instance 🫢 like, the actual USB function vibe right here.
  • net β€” the net_device that's associated with the NCM function. that's her network device, she's attached πŸ’–
  • bind_count β€” tracks how many configurations the NCM function is bound to, and it's lowkey doing important work: it prevents double-registration of the net device πŸ™ˆ like, not me registering the net device twice... couldn't be her.
  • ncm_interf_group β€” the ConfigFS group for the NCM interface πŸŽ€
  • ncm_os_desc β€” the USB OS descriptor for NCM ✨
  • ncm_ext_compat_id β€” the extended compatibility ID πŸ’œ
  • lock β€” protects the data from concurrent access by configfs read/write and create symlink/remove symlink operations πŸ”’ she's the bodyguard, the main character energy, keeping everybody from touching the data at the same time.
  • refcnt β€” reference counter for the function instance, literally counting her refs πŸ‘‘
  • max_segment_size β€” maximum segment size 🌸

🌈 SEE ALSO 🌈

Kernel file ./drivers/usb/gadget/function/u_ncm.h β€” go read it, iykyk πŸ“–


okay that's the whole struct, every member accounted for, nothing skipped, we ate and left no crumbs πŸ’…βœ¨

and that's a wrap bestie!! πŸŽ€ this page came to you from ./drivers/usb/gadget/function and it's dated October 2026 β€” mwah, love you, go forth and bind your NCM functions responsibly πŸ’–πŸ¦‹πŸ“

πŸ“¦ where this page comes from