STRUCT CAN_PROTO(9)
β¨ 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 thetypeargument from the socket syscall, likeSOCK_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 tostruct proto_opsforsock->ops. Pointer bestie, it's literally pointing at the ops. πprotβ a pointer to astruct protostructure. 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
- 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