Back to index

glibc  2.9
Functions | Variables
pmap_clnt.h File Reference
#include <features.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
#include <rpc/clnt.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool_t pmap_set (__const u_long __program, __const u_long __vers, int __protocol, u_short __port) __THROW
bool_t pmap_unset (__const u_long __program, __const u_long __vers) __THROW
struct pmaplistpmap_getmaps (struct sockaddr_in *__address) __THROW
enum clnt_stat pmap_rmtcall (struct sockaddr_in *__addr, __const u_long __prog, __const u_long __vers, __const u_long __proc, xdrproc_t __xdrargs, caddr_t __argsp, xdrproc_t __xdrres, caddr_t __resp, struct timeval __tout, u_long *__port_ptr) __THROW
enum clnt_stat clnt_broadcast (__const u_long __prog, __const u_long __vers, __const u_long __proc, xdrproc_t __xargs, caddr_t __argsp, xdrproc_t __xresults, caddr_t __resultsp, resultproc_t __eachresult) __THROW
u_short pmap_getport (struct sockaddr_in *__address, __const u_long __program, __const u_long __version, u_int __protocol) __THROW

Variables

__BEGIN_DECLS typedef bool_t(* resultproc_t )(caddr_t resp, struct sockaddr_in *raddr)

Function Documentation

enum clnt_stat clnt_broadcast ( __const u_long  __prog,
__const u_long  __vers,
__const u_long  __proc,
xdrproc_t  __xargs,
caddr_t  __argsp,
xdrproc_t  __xresults,
caddr_t  __resultsp,
resultproc_t  __eachresult 
)
struct pmaplist* pmap_getmaps ( struct sockaddr_in __address) [read]

Definition at line 59 of file pm_getmaps.c.

{
  struct pmaplist *head = (struct pmaplist *) NULL;
  struct timeval minutetimeout;
  CLIENT *client;
  bool closeit = false;

  minutetimeout.tv_sec = 60;
  minutetimeout.tv_usec = 0;
  address->sin_port = htons (PMAPPORT);

  /* Don't need a reserved port to get ports from the portmapper.  */
  int socket = __get_socket (address);
  if (socket != -1)
    closeit = true;

  client = INTUSE(clnttcp_create) (address, PMAPPROG,
                               PMAPVERS, &socket, 50, 500);
  if (client != (CLIENT *) NULL)
    {
      if (CLNT_CALL (client, PMAPPROC_DUMP, (xdrproc_t)INTUSE(xdr_void), NULL,
                   (xdrproc_t)INTUSE(xdr_pmaplist), (caddr_t)&head,
                   minutetimeout) != RPC_SUCCESS)
       {
         clnt_perror (client, _("pmap_getmaps.c: rpc problem"));
       }
      CLNT_DESTROY (client);
    }
  /* We only need to close the socket here if we opened  it.  */
  if (closeit)
    (void) __close (socket);
  address->sin_port = 0;
  return head;
}

Here is the call graph for this function:

u_short pmap_getport ( struct sockaddr_in __address,
__const u_long  __program,
__const u_long  __version,
u_int  __protocol 
)
enum clnt_stat pmap_rmtcall ( struct sockaddr_in __addr,
__const u_long  __prog,
__const u_long  __vers,
__const u_long  __proc,
xdrproc_t  __xdrargs,
caddr_t  __argsp,
xdrproc_t  __xdrres,
caddr_t  __resp,
struct timeval  __tout,
u_long __port_ptr 
)
bool_t pmap_set ( __const u_long  __program,
__const u_long  __vers,
int  __protocol,
u_short  __port 
)
bool_t pmap_unset ( __const u_long  __program,
__const u_long  __vers 
)

Here is the caller graph for this function:


Variable Documentation

Definition at line 48 of file pmap_clnt.h.