can_bitstuffing_len(9)
can_bitstuffing_len π β¨
okay so bestie, this is can_bitstuffing_len from the Kernel API Manual, and it is lowkey iconic for one very specific job: Calculate the maximum length with bitstuffing. no cap, thatβs the whole vibe.
πΈ NAME πΈ
can_bitstuffing_len β Calculate the maximum length with bitstuffing.
π SYNOPSIS π
can_bitstuffing_len (destuffed_len );
β¨ ARGUMENTS β¨
destuffed_lenβ the length of a destuffed bit stream. thatβs the input, bestie π«Ά
π DESCRIPTION π
The worst bit stuffing case is a sequence in which dominant and recessive bits alternate every four bits:
Destuffed: 1 1111 0000 1111 0000 1111 Stuffed: 1 1111o 0000i 1111o
0000i 1111o
Nomenclature π§
"0"β dominant bit"o"β dominant stuff bit"1"β recessive bit"i"β recessive stuff bit
Aside from the first bit, one stuff bit is added every four bits. periodt π
π₯ RETURN π₯
it gives you the length of the stuffed bit stream in the worst case scenario. thatβs the return value, bestie β worst-case energy only πβ¨
π SEE ALSO π
- Kernel file
./include/linux/can/length.h can_frame_bits(9)
go look at these if you want more can lore, iykyk π¦
mwah π this page comes from ./include/linux/can and is dated October 2026 β bye bestie π«Άβ¨
π¦ 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