attached is a patch implementing the TX loopback, apart from some other
fixes and improvements. The TX loopback to foreign local sockets allows
to have a net-alike behavior of the CAN bus. Local sockets listening to
a device can receive TX messages as well. As discussed, the TX lookback
is performed when TX is done (TX done interrupt). As I still think that
it will not be used very often, I made it a configurable kernel option.
When it's selected, it's _on_ by default and it can be switched off or
on again with setsockopt() (to make the Linux Socket-CAN people happy).
As long as it's not enabled, it adds little overhead to the driver. If
you have no objections I will check it in.
Here is the ChangeLog entry:
2006-11-14 Wolfgang Grandegger <[EMAIL PROTECTED]>
include/rtdm/rtcan.h,: Add feature TX loopback to local sockets.
* ksrc/drivers/can/rtcan_raw.c, include/rtdm/rtcan.h:
Remove locks for the setting and reading of the RX and TX
timeout values and add a warning to the documentation.
* src/utils/rtcansend.c: use sendto() by default to avoid
binding a default filter and add option "-s" for using bind()
* src/utils/rtcanrecv.c: add option "-R" for relative
* ksrc/drivers/can/rtcan_internal.h: use now RTCAN_ASSERT macros
when CONFIG_XENO_DRIVERS_RTCAN_DEBUG is set.
ksrc/drivers/can/Kconfig: add more help for kernel parameters.
Xenomai-core mailing list