Messages over network

Hi I’m here and not without another problem :wink: I’m writing some software
(QNX RTP) and want to take advantage of message passing over native
network… i’m facing some problems…

  1. message passing is working fine over local application(s) (this is
    of course not a problem :wink: just an information

  2. how to get message passing work over (native) network… i have got qnet
    working and the other computer is visible under /net

  3. how to get the server to advertise its pid and channelID to clients across
    network

Thanks for your time


Keep Smiling

Mechanically Yours

  • Mritunjai

A ship ought not to be held by one anchor, nor life by a single hope.


Sophomore Undergraduate
Mechanical Engg.
Indian Institute of Technology Bombay
India


Sent via Deja.com http://www.deja.com/
Before you buy.

Akhilesh Mritunjai <akhileshmritunjai@rediffmail.com> wrote:

Hi I’m here and not without another problem > :wink: > I’m writing some software
(QNX RTP) and want to take advantage of message passing over native
network… i’m facing some problems…

  1. message passing is working fine over local application(s) (this is
    of course not a problem > :wink: > just an information

  2. how to get message passing work over (native) network… i have got qnet
    working and the other computer is visible under /net

  3. how to get the server to advertise its pid and channelID to clients across
    network

The short answer is you do it as how you did it locally.

In most of the time, a “server” do not “advertise” nd/pid/chid, they
prepare a “name” for others to “open”.

So, all you need to do is open("/net/remote/dev/myserver"), and MsgSend()
to the fd. The resmgr/dispatch library is well defined so you only
need minimum coding to create such server.

You could choose to let server write its pid/chid into a wellknow
file (/var/running/myserver.info for example), and everybody go
open that file to get the server information.

Only thing you need to keep in mind is “passing nd cross network is
wrong”. nd is only usful for local machine, if you find yourself
passing nd arround, you will get in trouble. The right way is
“pass the machine name, and everybody do a netmgr_strtond() to
get their own nd”.

-xtang@qnx.com



Thanks for your time


Keep Smiling

Mechanically Yours

  • Mritunjai

A ship ought not to be held by one anchor, nor life by a single hope.


Sophomore Undergraduate
Mechanical Engg.
Indian Institute of Technology Bombay
India



Sent via Deja.com > http://www.deja.com/
Before you buy.

Hi
Thanx for the solution… but my problem is not solved fully.
May be this slightly long posting help you understanding my problem better…

Xiaodan Tang <xtang@qnx.com> wrote:

The short answer is you do it as how you did it locally.

In most of the time, a “server” do not “advertise” nd/pid/chid, they
prepare a “name” for others to “open”.

So, all you need to do is open("/net/remote/dev/myserver"), and MsgSend()
to the fd. The resmgr/dispatch library is well defined so you only
need minimum coding to create such server.

But that’s creating some problems… when i start qnet, the other computer
in /net is visible… but after some heavy browsing through /net it
disappears and comes only after i re-start qnet on both machines… It seems
to me that some internal buffer of the qnet driver gets overflowed and that
crashes the driver (tcpip continues to run… so telnet/ftp work flawlessly
to/from the computers to each other while “ls /net/other_node” complains of
“no router to host”) for a “find /net/other_node” it takes only 2 minutes to
crash the driver however if there is less activity… /net/other_node stays
longer

if this is actually so then when is a patch due… or if i’m wrong somewhere
please guide me… details are # output of nettrap io-net -dtulip
chipset=21041

#my command
io-net -dtulip chipset=21041 -p tcpip -p qnet
netmanager

#i also tried
io-net -dtulip chipset=21041 -p tcpip -p qnet resolve=file,resolve=ndp

#and
io-net -dtulip chipset=21041 -p tcpip -p qnet resolve=file,bind=ip

and also tried starting qnet separately using

io-net -dtulip chipset=21041 -p tcpip
netmanager
mount -Tio-net /lib/dll/npm-qnet.so

but got no better results in either case


i’m on a mission critical project and want to use qnx with native networking
(otherwise probably i’ll have to switch to linux+tcpip :frowning: )

also when stating netmanager after io-net… netmanager complains of-

netmanager error: Could not get current interface configuration (en0): Can’t
assign requeste d address

however it assigns correct parameters to the card despite of this error
message. my /etc/net.cfg is allright ###/etc/net.cfg # nto network config
file v1.2 version v1.2

[global]
hostname bluemoon
domain hostel4.iitb.ernet.in
nameserver 144.16.106.143
nameserver 144.16.101.16
nameserver 144.16.111.26
route 192.168.4.1 0.0.0.0 0.0.0.0

[en0]
type ethernet
mode manual
manual_ip 192.168.4.100
manual_netmask 255.255.255.0
###end /etc/net.cfg

Thanks


Keep Smiling

Mechanically Yours

  • Mritunjai

A ship ought not to be held by one anchor, nor life by a single hope.


Sophomore Undergraduate
Mechanical Engg.
Indian Institute of Technology Bombay
India


Sent via Deja.com http://www.deja.com/
Before you buy.