STRUCT NETCONSOLE_TARGET(9)
π 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 thetarget_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 bothSTATE_DISABLEDandSTATE_DEACTIVATEDcorrespond 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 byfind_skbwhen itsGFP_ATOMICallocation fails. lifetime brackets a successfulnetpoll_setup/netpoll_cleanuppair onnp. no cap, that's the exact deal πrefill_wqβ work item that asynchronously topsskb_poolback up toMAX_SKBSafterfind_skbdrains an entry. the way it refills, obsessed π§
π¦ SEE ALSO π¦
- Kernel file
./drivers/net/netconsole.c struct netcons_userdata(9)send_udp(9)send_ext_msg_udp(9)netconsole_write(9)
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
- 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