Purpose
Removes a Remote Procedure Call (RPC) service transport handle.
Library
C Library (libc.a)
Syntax
void xprt_unregister ( xprt)
SVCXPRT *xprt;
Description
The xprt_unregister subroutine removes an RPC service transport handle from the RPC service program before the transport handle can be destroyed. This subroutine modifies the svc_fds global variable.
Parameters
| Item | Description | 
|---|---|
| xprt | Points to the RPC service transport handle to be destroyed. | 
Purpose
Removes a Remote Procedure Call (RPC) service transport handle.
Library
Network Services Library (libnsl.a)
Syntax
#include <rpc/rpc.h>
 void xprt_unregister ( xprt)
const SVCXPRT *xprt;
Description
The xprt_unregister subroutine removes an RPC service transport handle from the RPC service program before the transport handle can be destroyed. This subroutine modifies the svc_fds global variable. The svc_fdset global variable indicates read file descriptor bit mask of the RPC server, which is generally required if you do not call the svc_run subroutine.
Parameters
| Item | Description | 
|---|---|
| xprt | Points to the RPC service transport handle to be destroyed. | 
Examples
#include <stdlib.h>
#include <rpc/rpc.h>
#include <netconfig.h>
#define PROG 0x3fffffffL
#define VERS 0x1L
main()
{
  
    SVCXPRT *svc_handle;   /* server handle */
    struct netconfig *nconf;
    int fd;
    /* Get proper file descriptor */       
    /* Get transport type */    
    
    /* Get RPC service handle */
   
    /* sendsize and recvsize are 0, thus default size will be chosen */
     
    if((svc_handle=svc_tli_create(fd, nconf, 0, 0, 0))==(SVCXPRT *)NULL)
    {
         fprintf(stdout,"Error in svc_tli_create!");
         exit(EXIT_FAILURE);
    }
 
    /* register it */
    xprt_register(svc_handle);
           
    /* unregister it */
    xprt_unregister(svc_handle);
    /* destroy the RPC service handle */
    svc_destroy(svc_handle); 
      
    /* check if svc_fdset is modified */  
     
      return 0;
}