gtpc2m4cC/C++ Language Support User's Guide

inqrc-Convert Resource Application Interface

This function is used to convert communications resource identifiers and names. The function uses structures found in tpfapi.h for input and output parameter passing.

Format

#include   <tpfapi.h>
struct inqrc_return *inqrc(unsigned char req_type, union inqrc_arg *i_req);

req_type
Code R if the resource identifier (RID) or the session control block identifier (SCB ID) is to be used as a search argument, or N if the network qualified name (NQN) is to be used as a search argument.

i_req
Pointer to union of type inqrc_arg, which may contain an r_type structure containing the RID, an r3_type structure containing the 3-byte RID or SCB ID, or an n_type structure containing the NQN. This union is defined in tpfapi.h.

Normal Return

Pointer to structure of type inqrc_return, defined in tpfapi.h.

Error Return

Not applicable.

Programming Considerations

Examples

The following example requests the RVT data for the 3-byte RID at EBW041 and performs a check to ensure that the RID is valid.

#include <tpfapi.h>
#include <c$rc0pl.h>
struct  rc0pl  *rcplptr;
union   inqrc_arg  *reqptr;

  ·
  ·
  ·
rcplptr = (struct rc0pl *) &(ecbptr()->ebw000); /* set up pointer to RCPL */ reqptr = (union inqrc_arg *) &(ecbptr()->ebw041); /* storage for r_type request */ reqptr->r3_type.inqars2 = 0; /* reserved */ reqptr->r3_type.inqarid3 = rcplptr->dest.sna.rcpldes3; /* set up RID */ (inqrc('R', reqptr)->inqrtncd ? serrc_op(SERRC_EXIT, 0x123456, "Invalid INQRC Request", NULL) \ : serrc_op(SERRC_RETURN, 0x111111, "RID was Found", NULL));

Related Information

selec-Select a Thread Application Interface.