Thank you Jan!
Because i want to develop against the posix skin, i now added the posix wrapper 
options
to the linker call (posix.wrappers) and use the function calls without rt_dev 
prefix.
It works!
Unfortunately a new problem or misunderstanding occured. I want to set a socket 
to timeout
behaviour  for receiving and used ioctl.......argh..... Everytime i tried to 
ioctl the socket 
behaviour, no matter if blocking, nonblocking, timeouting (;)), recvfrom 
returned with error. 
If i rt_dev_ioctl the socket it works..hmm. But i've seen, that ioctl ist also 
wrapped by
Xennomai. Is there something more i've not noticed??

Regards,
Jörn


-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 17. April 2008 23:19
An: Jörn Hoffmann
Cc: rtnet-users@lists.sourceforge.net
Betreff: Re: [RTnet-users] rt_dev_sendto()


Jörn Hoffmann wrote:
> Ok, not it works. I linked against libpthread_rt and librt to get the example 
> working.
> Then i went back to my app with the libs linked and.....it works.
> So if i not link my app to libpthread_rt and librt, sending will fail.
> I have no idea....

Please have a look at the Makefiles and/or the LDFLAGS reported back by
xeno_config --posix_ldflags. When programming against the POSIX API and
messing up this step, you end up using plain Linux.

When developing against the native API (rt_dev_*), you just need the
right header and -lnative (both informations are also returned by
xeno_config if you ask for it).

> 
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag von Jörn
> Hoffmann
> Gesendet: Donnerstag, 17. April 2008 15:11
> An: rtnet-users@lists.sourceforge.net
> Betreff: [RTnet-users] rt_dev_sendto()
> 
> 
> Hi there,
> 
> i'm new to RTnet and i'm just starting playing a little bit. I have xenomai 
> installed and at first i only 
> want to send one udp-packet to a remote host. I'm using rt_dev_socket(), 
> rt_dev_sendto() and rt_dev_close().
> Unfortunately, the rt_dev_sendto() returns -1 but errno is 0. I cannot 
> whireshark any packet.

See API documentation of rt_dev_* [1]: it returns the error directly,
not via errno. That means you called  rt_dev_sendto from non-RT context,
likely.

> I do not really know what's going and where i'm wrong.
> The remote host is rtrouted, the nic is conigured and up. RTping works fine.
> 
> Does anybody have any suggestions to figure out what happens?
> 
> Thanks in advance,
> Jörn
> 
> btw...i'm a little bit confused about the rtnet-xenomai example (rtt-sender) 
> as for me it seems that there 
> the linux-socket-functions will be called. I can't see any rt_dev-prefixes. 
> Are these calls catched by rtnet???

Linker magic ('--wrap sendto' e.g), essential part of the Xenomai POSIX
skin build process. There should be some thread about this topic in the
RTnet archive.

Jan

[1]http://www.xenomai.org/documentation/branches/v2.4.x/html/api/group__userapi.html

Attachment: signature.asc
Description: PGP signature

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to