root/include/linux/rpcsock.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  *  rpcsock.h   Declarations for the RPC call interface.
   3  *
   4  *  Coypright (C) 1995 Olaf Kirch <okir@monad.swb.de>
   5  *
   6  */
   7 
   8 
   9 #ifndef _LINUX_RPCSOCK_H
  10 #define _LINUX_RPCSOCK_H
  11 
  12 /* Maximum number of outstanding RPCs per socket.
  13  * With 32 slots, IP fragment reassembly would frequently
  14  * fail due to low memory.
  15  */
  16 #define NRREQS          16
  17 
  18 /* This describes a timeout strategy */
  19 struct rpc_timeout {
  20         unsigned long           init_timeout,
  21                                 max_timeout,
  22                                 increment;
  23         int                     retries;
  24         char                    exponential;
  25 };
  26 
  27 /* Wait information */
  28 struct rpc_wait {
  29         struct rpc_wait         *prev, *next;
  30         struct wait_queue       *wait;
  31         int                     *buf;
  32         int                     len;
  33         char                    gotit;
  34         __u32                   xid;
  35 };
  36 
  37 struct rpc_sock {
  38         struct file             *file;
  39         struct socket           *sock;
  40         struct rpc_wait         waiting[NRREQS];
  41         struct rpc_wait         *head, *tail, *free;
  42         struct wait_queue       *backlog;
  43         struct wait_queue       *shutwait;
  44         int                     shutdown;
  45 };
  46 
  47 #ifdef __KERNEL__
  48 
  49 int                     rpc_call(struct rpc_sock *, struct sockaddr *, int,
  50                                 const int *, int, int *, int,
  51                                 struct rpc_timeout *, int);
  52 struct rpc_sock *       rpc_makesock(struct file *);
  53 int                     rpc_closesock(struct rpc_sock *);
  54 
  55 #endif /* __KERNEL__*/
  56 
  57 #endif /* _LINUX_RPCSOCK_H */

/* [previous][next][first][last][top][bottom][index][help] */