Spiller, Alexander wrote: > Hello community, > > as mentioned in my mail from 05.09.2007 (see [1]) we want to use > rtnet for a realtime communication with a robot-controller (VMWare).
(think I already expressed my confusion about the setup) > We want to write a program, which uses the rtnet-API to create a > TCP/IP-socket-connection in RTAI. We are getting into trouble when > calling rt_dev_open() with SOCK_RAW as second argument. I assume you are talking about rt_dev_socket here and below. > > Calling rt_dev_open() with SOCK_STREAM also leads to an error, but > this one is clear to me: > It comes obviously from a missing device-entry in the device-list > managed in > rtai/addons/rtdm/device.c > > There are only calls to rtdm_dev_register() in > rtnet/stack/ipv4/af_inet.c > and > rtnet/stack/packet/af_packet.c, > where the socket_type is set to SOCK_DGRAM (af_inet.c) and to > SOCK_RAW (af_packet.c). > > But we also get the error-message when calling rt_dev_open() with > SOCK_RAW as socket-type, which I don't understand. For packet sockets or for IPv4? In the latter case, it's expected as the IPv4 subsystem only registers SOCK_DGRAM. In the former case, please post demo code (after checking the related example: examples/xenomai/posix/raw-ethernet.c). > > Now my questions: > 1) Is it possible to use SOCK_STREAM? I think it is not, but I would be > interested in a solution, if I was wrong. If you are referring to TCP/IP: No, RTnet does not provide it. > > 2) Is it possible to use SOCK_RAW? I hope so. Then we would have to > write a simple TCP-stack, which shouldn't be too hard. It's at least imaginable. Either in user land via PF_PACKET:SOCK_RAW, but you will then have to disable IPv4 support in RTnet entirely (otherwise it will claim the IP Ethernet type earlier). Or you extend the IPv4 subsystem directly, registering a new RTDM protocol PF_INET:SOCK_STREAM. In any case, only a restrictive TCP emulation will make sense in the context of hard real-time. Hope your counter part will play a predictable game... Jan
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users