get information about a registered name


#include <sys/name.h>
int qnx_name_query( pid_t proc_pid,
                    int name_id,
                    struct _nameinfo *bufptr );


The qnx_name_query() function returns a structure of information on a name associated with name_id on the node identified by proc_pid. If proc_pid is zero, the local node is used. To specify another node, proc_pid should be passed as a virtual circuit to the process manager on that node. For example,

/* Attach a vc to the process manager on node 4 */
proc_pid = qnx_vc_attach( 4, PROC_PID, 0, 0 );

The name_id is a small positive integer. If you ask for information on an ID that isn't in use, information is returned on the next monotonically greater ID. This automatic search for the next existing ID provides a convenient method of obtaining information on all names.


A name id. If no names with an ID greater than or equal to name_id exist, then -1 is returned, and errno is set.


No more registered names starting from the specified name_id.


#include <stdio.h>
#include <sys/name.h>
#include <errno.h>

void main()
    int id;
    struct _nameinfo buf;

    printf( "List of registered names on this node:\n" );
    for( id = 0;
       ( id = qnx_name_query( 0, id, &buf ) ) != -1;
        ++id )
      printf( "%s\n", buf.name );



Interrupt handler No
Signal handler Yes, but modifies errno
Thread Yes

See also:

errno, qnx_name_attach(), qnx_name_detach(), qnx_name_locate(), qnx_name_locators(), qnx_vc_attach()