STRUCT NETCONSOLE_TARGET(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct netconsole_target β€” lowkey the struct that represents a configured netconsole target, and yes bestie, this is from the Kernel API Manual ✨


🌸 SYNOPSIS 🌸

okay so here's the whole vibe, literally character for character:

struct netconsole_target {
    struct list_head        list;
  #ifdef CONFIG_NETCONSOLE_DYNAMIC;
    struct config_group     group;
    struct config_group     userdata_group;
    struct netcons_userdata *userdata;
    char sysdata[MAX_EXTRADATA_ENTRY_LEN * MAX_SYSDATA_ITEMS];
    u32 sysdata_fields;
    u32 msgcounter;
  #endif;
    struct netconsole_target_stats stats;
    enum target_state       state;
    bool extended;
    bool release;
    struct netpoll          np;
    union inet_addr         local_ip, remote_ip;
    bool ipv6;
    u16 local_port, remote_port;
    u8 remote_mac[ETH_ALEN];
    char buf[MAX_PRINT_CHUNK + 1];
    struct work_struct      resume_wq;
    struct sk_buff_head     skb_pool;
    struct work_struct      refill_wq;
 };

πŸŽ€ MEMBERS πŸŽ€

every single field, no skips, we're doing the full tour πŸ’…

  • list β€” links this target into the target_list. it's giving "I know my place in the group chat" 🫢
  • group β€” links us into the configfs subsystem hierarchy. iconic configfs behavior ✨
  • userdata_group β€” links to the userdata configfs hierarchy πŸŽ€
  • userdata β€” cached, formatted userdata payload. RCU protected, so be normal about it πŸ™ˆ
  • sysdata β€” cached, formatted string of append πŸ“
  • sysdata_fields β€” sysdata features enabled πŸ”₯
  • msgcounter β€” message sent counter. keeping count fr fr πŸ’œ
  • stats β€” packet send stats for the target. used for debugging πŸ‘‘
  • state β€” state of the target. visible from userspace (read-write) ✨ from a userspace perspective, the target is either enabled or disabled. internally, although both STATE_DISABLED and STATE_DEACTIVATED correspond to inactive targets, the latter is due to automatic interface state changes and will try recover automatically, if the interface comes back online. also, other parameters of a target may be modified at runtime only when it is disabled (state != STATE_ENABLED). that's the whole tea β˜•
  • extended β€” denotes whether console is extended or not 🌈
  • release β€” denotes whether kernel release version should be prepended to the message. depends on extended console ⭐
  • np β€” the netpoll structure for this target. contains the other userspace visible parameters:
    • dev_name (read-write)
    • local_mac (read-only)

bestie, read the permissions, don't try it 😭

  • local_ip β€” source IP address of the target (read-write) πŸ’–
  • remote_ip β€” destination IP address of the target (read-write) πŸ’–
  • ipv6 β€” whether the target addresses are IPv6 (read-write) πŸ¦‹
  • local_port β€” source UDP port of the target (read-write) πŸŽ€
  • remote_port β€” destination UDP port of the target (read-write) πŸŽ€
  • remote_mac β€” destination ethernet address of the target (read-write) 🌸
  • buf β€” the buffer used to send the full msg to the network stack πŸ”₯
  • resume_wq β€” workqueue to resume deactivated target πŸ‘‘
  • skb_pool β€” per-target fallback skb pool consulted by find_skb when its GFP_ATOMIC allocation fails. lifetime brackets a successful netpoll_setup / netpoll_cleanup pair on np. no cap, that's the exact deal πŸ’€
  • refill_wq β€” work item that asynchronously tops skb_pool back up to MAX_SKBS after find_skb drains an entry. the way it refills, obsessed 🧚

πŸ¦‹ SEE ALSO πŸ¦‹

go read those too, iykyk πŸ’œ


and that's the page bestie 🫢 it lives under ./drivers/net, dated October 2026, and it's all about struct netconsole_target(9) β€” periodt πŸ’…βœ¨

πŸ“¦ where this page comes from