How can i get the pid and chid in ConnectAttach()

The document said ConnectAttach() can establish a connection between two nodes through Qnet.
My question is how can i get the pid and chid from the server to the client.
Can anyone help me find more infomation about Qnet because there not too much about it in QNX documents.

Any idea will be apreciated!
Thank you!

1 use -gns- utility and name_open/name_attach
2 Save nid/chid to file or shared mem on remote node and read it

Can’t read share memory from a remote node.

Or write your process as a resource manager and just do an open().

Thank you for your answers!

What is the -gns- utility ?

Can I use the resmgr_attach()?

And here is a quote from lib_ref about name_attach():
for QNX 6 applications, we recommend that you use the resource manager framework.

Dose this mean that name_attach() is not safe enough?


The global name service (gns) manager is a standalone resource manager.
With the help of gns, an application could advertise, look up, and use
(connect to) a service across network, without knowing the detail of
where the service is, or who is the provider.
GNS runs in two different modes: server and client. A server-mode
manager is a central database that stores advertised services, and
handles lookup and connect requests. A client-mode manager relays
advertise, lookup, and connect requests between a local application and
the gns server.

It seems like this is a QNX v6.3 feature, but now i’m just using v6.21.
I prefer saving nid/chid to file on remote node and read it.
Anyway thank you for your help!