STRUCT CAN_PROTO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so struct can_proto is literally the CAN protocol structure β€” that's the whole name, bestie. This is the struct can_proto(9) page from the Kernel API Manual, and we're keeping every field exactly where it belongs. πŸ’–

πŸ’… SYNOPSIS πŸ’…

Here's the struct in all its main-character glory, no cap:

       struct can_proto {
           int type;
           int protocol;
           const struct proto_ops *ops;
           struct proto *prot;
        };

πŸŽ€ Members πŸŽ€

  • type β€” this is the type argument from the socket syscall, like SOCK_DGRAM. It's giving "what kind of socket are we even doing?" energy. 🫢
  • protocol β€” the protocol number in the socket syscall. Numbers, but make it CAN. πŸ”₯
  • ops β€” a pointer to struct proto_ops for sock->ops. Pointer bestie, it's literally pointing at the ops. πŸ’…
  • prot β€” a pointer to a struct proto structure. Another pointer, another slay. ✨

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./include/linux/can/core.h β€” that's the spot to check, iykyk. 🌈

Source/version: ./include/linux/can Β· date: October 2026 Β· page: struct can_proto(9). Bye bestie, go slay those kernel vibes! πŸ’œπŸŽ€

πŸ“¦ where this page comes from