cangen: add CAN XL RRS bit generation

Allow to generate Remote Request Substitution bit content.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
pull/597/head
Oliver Hartkopp 2025-06-24 19:48:14 +02:00
parent 93a7b2dfd3
commit 6b46063eee
1 changed files with 3 additions and 3 deletions

View File

@ -987,12 +987,12 @@ int main(int argc, char **argv)
rnd = random();
if (xl_flags_mode == MODE_RANDOM) {
cu.xl.flags = rnd & CANXL_SEC;
cu.xl.flags = rnd & (CANXL_SEC | CANXL_RRS);
} else if (xl_flags_mode == MODE_FIX) {
cu.xl.flags = xl_flags;
} else if (xl_flags_mode == MODE_INCREMENT) {
xl_flags ^= CANXL_SEC;
cu.xl.flags = (xl_flags & CANXL_SEC);
xl_flags++;
cu.xl.flags = (xl_flags & (CANXL_SEC | CANXL_RRS));
}
/* mark CAN XL frame */