STRUCT W1_NETLINK_MSG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay bestie, welcome to the Kernel API Manual page for struct w1_netlink_msg(9) β€” and it literally holds w1 message type, id, and result. Slay ✨

🌸 SYNOPSIS 🌸

struct w1_netlink_msg {
    __u8 type;
    __u8 status;
    __u16 len;
    union {
      __u8 id[8];
      struct w1_mst {
        __u32 id;
        __u32 res;
      } mst;
    } id;
    __u8 data[];
 };

No cap, that's the whole shape 🫢

πŸŽ€ Members πŸŽ€

  • type β€” one of enum w1_netlink_message_types.
  • status β€” kernel feedback for success 0 or errno failure value.
  • len β€” length of data following w1_netlink_msg.
  • id β€” union holding bus master id (msg.id) and slave device id (id[8]).
  • id.id β€” Slave ID (8 bytes).
  • id.mst β€” bus master identification.
  • id.mst.id β€” bus master ID.
  • id.mst.res β€” bus master reserved.
  • data β€” start address of any following data.

The way these fields just line up? Obsessed πŸ’…

πŸ”₯ Description πŸ”₯

This is the base message structure for w1 messages over netlink, periodt. The netlink connector data sequence is, struct nlmsghdr, struct cn_msg, then one or more struct w1_netlink_msg (each with optional data). Like a little chain of messages, iykyk 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

Go be nosy, bestie:

  • Kernel file ./drivers/w1/w1_netlink.h
  • enum w1_cn_msg_flags(9)
  • enum w1_netlink_message_types(9)
  • enum w1_commands(9)
  • struct w1_netlink_cmd(9)

Signed off with ./drivers/w1, October 2026, and all the love for struct w1_netlink_msg(9) πŸ«ΆπŸ’…

πŸ“¦ where this page comes from