roland Tollenaar wrote:
Hi,
I am looking through the rtcan code provided with the xenomai package
and I realize one thing:
I know too little of the basic socket programming. Not even sure my
wording in the previous sentence is capturing the correct area of
ignorance.
There are plenty text books on BSD socket programming and the rational
behind it.
I suspect very strongly that the rtcan functionality is designed to
piggyback on whatever standard iocontrol is taking place in functions
like
ret = rt_dev_ioctl(can_fd, SIOCGIFINDEX, &ifr);
and
ret = rt_dev_ioctl(can_fd, SIOCSCANBAUDRATE, &ifr);
But exactly what is happening is beyond me at the moment.
SIOCGIFINDEX gets the interface index for a named device and
SIOCSCANBAUDRATE allows to set the baudrate. The RT-Socket-CAN utilities
are now even hyperlinked with the API doc (still not 100% perfect yet) e.g.:
http://www.xenomai.org/documentation/trunk/html/api/rtcanconfig_8c-example.html
Now I can obviously try to copy like a chinaman (no disrespect
intended!) and not understand what I am doing but it is not really a
mode of operation I relish.
I have briefly tried to locate the rt_dev_ioctl back to a xenomai
header but have not managed to trace it yet.
Is it defined in the standard linux ioctl headers? Where can I find
some info on what arguments these functions are passed etc?
Hm, try:
$ cd <xenomai-root>
$ find . -name '*.[ch]' | xargs grep SIOCSCANBAUDRATE
Much appreciated.
Wolfgang.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help