[Previous]
[Contents]
[Next]

qnx_nidtostr()

convert a numeric node ID into its string equivalent

Synopsis:

#include <sys/vc.h>
int qnx_nidtostr( nid_t nid,
                  char *bufp,
                  int maxbuf );

Description:

The qnx_nidtostr() function converts a numeric node ID into its string equivalent.

The maxbuf argument specifies the maximum length of the NUL-terminated string that can be placed in the buffer pointed to by bufp.


Note: If the string is longer than maxbuf, it isn't terminated by a NUL character.

Returns:

The number of characters placed in the buffer.

Examples:

#include <stdio.h>
#include <unistd.h>
#include <sys/vc.h>

main (argc, argv)
int argc;
char *argv[];

{
  int i;
  char node_name[22];

  i = qnx_nidtostr ( getnid(), node_name, 22);
  printf ("My node name is '%s'\n", node_name);
}

Classification:

QNX

Safety:
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

getnid(), qnx_strtonid()


[Previous]
[Contents]
[Next]