From 6aeb7d1faaf801e5f4720f22191e5c31c36e672c Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Sun, 14 Nov 2010 08:55:06 +0000 Subject: [PATCH] Added new socketoptions to force the isotp protocol to intentionally misbehave for regression tests. CAN_ISOTP_TX_STMIN: Set a value in nano secs that's used as minimum CF gap by the sender. This value is used instead of the value provided by the receiver inside the FC. CAN_ISOTP_RX_STMIN: Ignores received CF frames which timestamps differ less than this value in nano secs. This is used to test the receivers misbehaviour when the receiver provides a lower stmin value that he's able to cope with. Received CF frames are silently dropped when they come faster than specified by this value. --- isotprecv.c | 12 +++++++++++- isotpsend.c | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/isotprecv.c b/isotprecv.c index 9e37c86..acd6de6 100644 --- a/isotprecv.c +++ b/isotprecv.c @@ -71,6 +71,7 @@ void print_usage(char *prg) fprintf(stderr, " -P (check padding in SF/CF. (l)ength (c)ontent (a)ll)\n"); fprintf(stderr, " -b (blocksize. 0 = off)\n"); fprintf(stderr, " -m (STmin in ms/ns. See spec.)\n"); + fprintf(stderr, " -f