multicasting

Hello,

We are concept testing multicasting for its reliability. However,
using some POSIX examples, we have not been able to get it working. We
suspect it may be a QNX configuration problem. Here is what we have done

1.) Added the -M argument to the Dev.ether1000 driver at startup
2.) Upgraded to TCP/IP (Beta 5) (supports multicasting)
2.) Used the following block of code to attempt a send of multicast
packets…

int gSocket, result;
char *message=“Hello World!\n”;
struct sockaddr_in addr;
struct ip_mreq mreq;

// create socket
gSocket = socket(AF_INET, SOCK_DGRAM, 0);
if (gSocket<0) {
perror(“Can’t create socket”);
exit(EXIT_FAILURE);
}

// set up destination address
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = inet_addr(HELLO_GROUP);
addr.sin_port = htons(HELLO_PORT);

// send to our destination
while (!kbhit()) {
result = sendto(gSocket, message, sizeof(message), 0,
(struct sockaddr *)&addr, sizeof(addr));
if (result<0) {
perror(“Cannot send multicast packet”);
exit(EXIT_FAILURE);
}
sleep (1);
}


…However, we receive an error … “Cannot route to host”

Any advice?

-Tom
Fitzgerald, SEA, Inc.

“Tom Fitzgerald” <tfitz1@hotmail.com> wrote in message
news:9b57os$5jk$1@inn.qnx.com

Hello,

We are concept testing multicasting for its reliability. However,
using some POSIX examples, we have not been able to get it working. We
suspect it may be a QNX configuration problem. Here is what we have done

[skip]

try to look at “IP multicast vs. UDP broadcast” thread on this server in
qdn.public.qnx4 group, they’r discussing this also right now.

// wbr