svc_unreg()--Delete an Association Set by svc_reg()


  Syntax

 #include <rpc/rpc.h>

 void svc_unreg(const u_long prognum,
                const u_long versnum);

  Service Program Name: QZNFTRPC

  Default Public Authority: *USE

  Threadsafe: No

The svc_unreg() function removes mappings between dispatch functions and the service procedure that is identified by the prognum and versnum parameters. It also removes the mapping between the port number and the service procedure, which is identified by the prognum and versnum parameters.


Parameters

prognum  (Input) 
The program number of the remote program.

vernum  (Input) 
The version number of the remote program.

Authorities

No authorization is required.


Return Value

None.


Error Conditions

None.


Error Messages

Message ID Error Message Text
CPIA1B1 I A problem was encountered in the RPC client.
CPIA1B2 I TI-RPC encountered a problem in the transport protocol.
CPIA1B8 I A problem occurred while trying to contact the RPCBind daemon.
CPE3418 E Possible APAR condition or hardware failure.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


Related Information


Example

See Code disclaimer information for information pertaining to code examples.

The following example shows how svc_unreg is used:

/* Define remote program number and version */
#define RMTPROGNUM (u_long)0x3fffffffL
#define RMTPROGVER (u_long)0x1

#include <stdio.h>
#include <rpc/rpc.h>
#include <netconfig.h>

static void exm_proc();

main()
{
  SVCXPRT *xprt;
  struct netconfig *nconf;

  ...

  result = svc_reg(xprt, RMTPROGNUM, RMTPROGVER,
                                 exm_proc, nconf);
  if ( !result){
    fprintf(stderr, "svc_reg failed!!\n");
    exit(1);
  }

  ...

  /* Removes mapping between procedures and objects */
  svc_unreg(RMTPROGNUM, RMTPROGVER);

}


API introduced: V4R2
Top | Remote Procedure Call (RPC) APIs | APIs by category