es58x_check_msg_max_len(9)
π es58x_check_msg_max_len(9) β like, the vibe-check for your message size
okay so bestie, welcome to the Kernel API Manual β¨ this one's a lil macro from the kernel, and honestly? she's serving "bouncer at the club door" energy π«Ά
πΈ NAME πΈ
es58x_check_msg_max_len β check the maximum size of a received message. that's it, that's the job π
π SYNOPSIS π
es58x_check_msg_max_len (dev , msg , actual_len );
β¨ ARGUMENTS β¨
devβ the device π₯οΈ it's literally just here so we can print error messages, that's her whole purpose, no cap.msgβ the received message π¨ and listen: it must not be a pointer. like, at all. not even a little. periodt.actual_lenβ the length of the message as advertised in the command header π (as in, what the message claims her size is β we're checking receipts here).
π¦ DESCRIPTION π¦
okay so the reason this has to be a macro π is that it needs to accept all the different types of messages as an input, and a regular function simply could not. it's giving flexible, it's giving versatile.
use this one with messages of variable sizes π she only does ONE thing: check that the message is not bigger than the maximum expected size. that's the whole gig. no notes. π
π RETURN π
zeroon success π β everything's chill, message is within bounds.-EOVERFLOWifactual_lenis greater than the expected length π β yeah, that message is doing too much, she's too big, we're overflowing.
π SEE ALSO π
kernel file ./drivers/net/can/usb/etas_es58x/es58x_core.h, plus the whole friend group π:
enum es58x_driver_info(9)enum es58x_physical_layer(9)enum es58x_sync_edge(9)enum es58x_flag(9)enum es58x_err(9)enum es58x_event(9)struct es58x_priv(9)struct es58x_parameters(9)struct es58x_operators(9)struct es58x_sw_version(9)struct es58x_hw_revision(9)struct es58x_device(9)es58x_sizeof_es58x_device(9)es58x_check_msg_len(9)es58x_msg_num_element(9)es58x_priv(9)ES58X_SIZEOF_URB_CMD(9)es58x_get_urb_cmd_len(9)es58x_get_netdev(9)es58x_get_raw_can_id(9)es58x_get_flags(9)
bestie reminder π«Ά: this macro is a maximum check only β it doesn't check the minimum, it doesn't check everything, it checks that one specific thing. don't go expecting more from her, she's doing her best π
alright that's the whole page, mwah π this one lives in ./drivers/net/can/usb/etas_es58x and the docs are dated October 2026 β iconic, timeless, we stan a future-dated manpage π§β
π¦ 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