Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xdr_int(3)

xdr_bytes(3)

xdr_getpos(3)

xdr_pointer(3)

xdrrec_create(3)

xdr_array(3)

xdr_destroy(3)

xdr_free(3)

xdr_inline(3)

xdrmem_create(3)

xdr_opaque(3)

xdr_union(3)

xdr_vector(3)

xdr_void(3)



  svc_register(3)                     CLIX                     svc_register(3)



  NAME

    svc_register, svc_unregister - Library functions for remote procedure
    calls

  LIBRARY

    Berkeley Software Distribution Library (libbsd.a)

  SYNOPSIS

    svc_register(
      SVCXPRT *xprt ,
      ulong prognum ,
      ulong versnum ,
      void (*dispatch)() ,
      ulong protocol );

    void svc_unregister(
      ulong prognum ,
      ulong versnum );

  PARAMETERS

    xprt       Specifies the address of the RPC transport handle.

    prognum    Specifies the program number.

    versnum    Specifies the version number of the program.

    dispatch   Specifies the address of the service dispatch procedure.

    protocol   Specifies the protocol to register with portmap.

  DESCRIPTION

    The svc_register() and svc_unregister() functions allow C programs to make
    procedure calls on other machines across the network.  First, the client
    calls a procedure to send a data packet to the server.  Upon receipt of
    the packet, the server calls a dispatch routine to perform the requested
    service, and then sends back a reply.  Finally, the procedure call returns
    to the client.

    The svc_register() function associates prognum and versnum with the
    service dispatch procedure, dispatch.  If protocol is 0, the service is
    not registered with the portmap service.  If protocol is nonzero, then a
    mapping of the triple [ ``prognum, versnum, protocol'' ] to xprt->xp_port
    is established with the local portmap service (generally protocol is 0,
    IPPROTO_UDP or IPPROTO_TCP).  The dispatch procedure has the following
    form:




  2/94 - Intergraph Corporation                                              1






  svc_register(3)                     CLIX                     svc_register(3)



    dispatch(request, xprt)
    struct svc_req *request;
    SVCXPRT *xprt;

    The svc_unregister() function removes all mapping of the double [
    ``prognum, versnum'' ] to dispatch routines, and of the triple [
    ``prognum, versnum, *'' ] to port number.

  RETURN VALUES

    The svc_register() function returns 1 if it succeeds, and 0 otherwise.
    The svc_unregister() function returns void.

  RELATED INFORMATION

    Functions:  xdr_int(3), xdr_bytes(3), xdr_getpos(3), xdr_pointer(3),
    xdrrec_create(3), xdr_array(3), xdr_destroy(3), xdr_free(3),
    xdr_inline(3), xdrmem_create(3), xdr_opaque(3), xdr_union(3),
    xdr_vector(3), xdr_void(3)

    CLIX Programming Guide

































  2                                              Intergraph Corporation - 2/94




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026