QNX 6.1 - Network Message Passing

----- Original Message -----
From: Ron <father_ron@catholic.org>
Newsgroups: qdn.public.neutrino
Sent: Friday, April 25, 2003 1:36 PM
Subject: QNX 6.1 - Network Message Passing


QNX 6.1 - Network Message Passing

I am trying to get message passing working over a local network with
open()
and/or ConnectAttach(). Using ConnectAttach() (and MsgSend, MsgReceive…)
I can set up a simple server/client on one pc, but cannot get it working
over a
local network.

Here are my settings:

  • local pc = strider, IP = 192.168.2.18
  • remote pc = rivendell, IP = 192.168.2.19
  • I can ping, ssh, etc between pc’s
  • start qnet, io-net:
    io-net -p qnet mount=:,resolve=dns
  • mount command returns:
    /net/strider.myco.priv/dev/hd0t79 on / type qnx4
  • the /etc/hosts file includes:
    192.168.2.19 rivendell
    NOTE: rivendell is configured similarly

I have a /net directory (empty)

Empty is no good. You need to be able see both “strider” and “rivendell” in
/net,
and being able to “ls /net/strider” it.

Make sure QNET is loaded properly (slay io-net and restart things one by
one),
make sure hostname (uname -n) set proper before QNET is started…

Any reason not using 6.2.1 the latest ?

-xtang

When I run sample client/server apps on one machine, everything works fine
(using ConnectAttach(), MsgSend(), …) but when I try it or the
following simple
app (from Rob Krten’s QNX Neutrino 2 book):
#include <sys/neutrino.h
#include <stdlib.h
#include <stdio.h
#include <sys/netmgr.h

int main(void) {

int remote_nd; // node descriptor of target machine (rivendell)
int rivendell_nd; // rivendell’s node id for us (strider)

rivendell_nd = netmgr_strtond("/net/rivendell", NULL);
printf (“rivendell’s ND is %d\n”, rivendell_nd);

// remote_nd = netmgr_remote_nd(rivendell_nd, ND_LOCAL_NODE);
remote_nd = netmgr_remote_nd(rivendell_nd, 0);
printf(“From rivendell’s point of view, we’re ND %d\n”,
remote_nd);

return (EXIT_SUCCESS);
}
… nothing happens.
When I try the ConnectAttach() apps, nothing happens. I’ve read through
the book and the help docs, but can’t get anywhere.

Any help / ideas would be greatly appreciated.

Thanks
Ron

\

During the Lenten Season, please help support the mission of
Catholic Online by purchasing goods and services from our sponsors
at > http://www.catholic.org/clife/lent
\

I found the problem. There was a syntax error in my
/etc/system/enum/include/net file when I loaded qnet. An error appeared
very briefly when QNX started up, and I only just noticed it.

Thanks for your help!

Ron

Xiaodan Tang wrote:

----- Original Message -----
From: Ron <> father_ron@catholic.org
Newsgroups: qdn.public.neutrino
Sent: Friday, April 25, 2003 1:36 PM
Subject: QNX 6.1 - Network Message Passing



QNX 6.1 - Network Message Passing

I am trying to get message passing working over a local network with

open()

and/or ConnectAttach(). Using ConnectAttach() (and MsgSend, MsgReceive…)
I can set up a simple server/client on one pc, but cannot get it working
over a
local network.

Here are my settings:

  • local pc = strider, IP = 192.168.2.18
  • remote pc = rivendell, IP = 192.168.2.19
  • I can ping, ssh, etc between pc’s
  • start qnet, io-net:
    io-net -p qnet mount=:,resolve=dns
  • mount command returns:
    /net/strider.myco.priv/dev/hd0t79 on / type qnx4
  • the /etc/hosts file includes:
    192.168.2.19 rivendell
    NOTE: rivendell is configured similarly

I have a /net directory (empty)


Empty is no good. You need to be able see both “strider” and “rivendell” in
/net,
and being able to “ls /net/strider” it.

Make sure QNET is loaded properly (slay io-net and restart things one by
one),
make sure hostname (uname -n) set proper before QNET is started…

Any reason not using 6.2.1 the latest ?

-xtang

When I run sample client/server apps on one machine, everything works fine
(using ConnectAttach(), MsgSend(), …) but when I try it or the
following simple
app (from Rob Krten’s QNX Neutrino 2 book):
#include <sys/neutrino.h
#include <stdlib.h
#include <stdio.h
#include <sys/netmgr.h

int main(void) {

int remote_nd; // node descriptor of target machine (rivendell)
int rivendell_nd; // rivendell’s node id for us (strider)

rivendell_nd = netmgr_strtond("/net/rivendell", NULL);
printf (“rivendell’s ND is %d\n”, rivendell_nd);

// remote_nd = netmgr_remote_nd(rivendell_nd, ND_LOCAL_NODE);
remote_nd = netmgr_remote_nd(rivendell_nd, 0);
printf(“From rivendell’s point of view, we’re ND %d\n”,
remote_nd);

return (EXIT_SUCCESS);
}
… nothing happens.
When I try the ConnectAttach() apps, nothing happens. I’ve read through
the book and the help docs, but can’t get anywhere.

Any help / ideas would be greatly appreciated.

Thanks
Ron

\

During the Lenten Season, please help support the mission of
Catholic Online by purchasing goods and services from our sponsors
at > http://www.catholic.org/clife/lent



\