Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Raw Sockets in vxworks

427 views
Skip to first unread message

Monisha Barooah

unread,
Oct 1, 2001, 5:08:27 AM10/1/01
to
Hi,
I am having problems with Raw Sockets in VxWorks. Can I get any help
in this regard? The fact is that I am having a code which runs
properly in linux but when I try to run the same code in Vxworks, it
doesn't work.
Actually I have two files. In one file, I am sending in some data
through a raw socket by using the 'sendto' system call and in the
other file I am trying to receive the data through another socket by
using the 'recvfrom' system call. The code in the second file is run
first. So, a socket gets created and the newly created task( say t1)
is in the pended state as it is waiting on the 'recvfrom' system call.
Then the code in the first file is run. Let us say, this is task t2.
In this case, what is noticed is that when t2 runs, a socket gets
created and the 'sendto' system call is successful. But the task(t1)
which was previously in the pended state doesn't receive the data
destined to it at all. I have tried out the same code in Linux and it
works fine. But the code fails in Vxworks. Is there any extra
configuration to be done in the Vxworks project facility to make the
code work or is there some other solution related to it.
Another thing I would like to add is that when I try to send a
multicast packet through the raw socket, the 'sendto' system call of
task t2 fails giving and error number of 0x28 corresponding to
destination unreachable. What can this problem be? This option also
worked fine in Linux but fails in VxWorks. In this case, I am not
using the 'setsockopt' system call with the IP_MULTICAST_TTL option
because I have got to know earlier that the Vxworks Network Code has
some problems with it. I am just constructing the IP headers and
setting the values of the various fields of the headers. But this
method is also failing.

Thanks in advance for the help.
Regards,
Monisha.

timallen

unread,
Oct 1, 2001, 11:26:56 AM10/1/01
to
Have you tried using the UDP client/server example in the Network
Programmers Guide, with SOCK_DGRAM changed to SOCK_RAW. I've used this in
the past.
Tim.

"Monisha Barooah" <monisha...@yahoo.com> wrote in message
news:68ef19de.01100...@posting.google.com...


> Hi,
> I am having problems with Raw Sockets in VxWorks.

...


0 new messages