Home | History | Annotate | Download | only in sunrpc
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef _LINUX_SUNRPC_XPRT_H
     20 #define _LINUX_SUNRPC_XPRT_H
     21 #include <linux/uio.h>
     22 #include <linux/socket.h>
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 #include <linux/in.h>
     25 #include <linux/sunrpc/sched.h>
     26 #include <linux/sunrpc/xdr.h>
     27 #define RPC_MIN_SLOT_TABLE (2U)
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29 #define RPC_DEF_SLOT_TABLE (16U)
     30 #define RPC_MAX_SLOT_TABLE (128U)
     31 #define RPC_CALLHDRSIZE 6
     32 #define RPC_REPHDRSIZE 4
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34 #define RPC_MIN_RESVPORT (1U)
     35 #define RPC_MAX_RESVPORT (65535U)
     36 #define RPC_DEF_MIN_RESVPORT (665U)
     37 #define RPC_DEF_MAX_RESVPORT (1023U)
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39 struct rpc_timeout {
     40  unsigned long to_initval,
     41  to_maxval,
     42  to_increment;
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44  unsigned int to_retries;
     45  unsigned char to_exponential;
     46 };
     47 struct rpc_task;
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49 struct rpc_xprt;
     50 struct seq_file;
     51 struct rpc_rqst {
     52  struct rpc_xprt * rq_xprt;
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54  struct xdr_buf rq_snd_buf;
     55  struct xdr_buf rq_rcv_buf;
     56  struct rpc_task * rq_task;
     57  __u32 rq_xid;
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59  int rq_cong;
     60  int rq_received;
     61  u32 rq_seqno;
     62  int rq_enc_pages_num;
     63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     64  struct page **rq_enc_pages;
     65  void (*rq_release_snd_buf)(struct rpc_rqst *);
     66  struct list_head rq_list;
     67  __u32 * rq_buffer;
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69  size_t rq_bufsize;
     70  struct xdr_buf rq_private_buf;
     71  unsigned long rq_majortimeo;
     72  unsigned long rq_timeout;
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74  unsigned int rq_retries;
     75  u32 rq_bytes_sent;
     76  unsigned long rq_xtime;
     77  int rq_ntrans;
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79 };
     80 #define rq_svec rq_snd_buf.head
     81 #define rq_slen rq_snd_buf.len
     82 struct rpc_xprt_ops {
     83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     84  void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize);
     85  int (*reserve_xprt)(struct rpc_task *task);
     86  void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
     87  void (*set_port)(struct rpc_xprt *xprt, unsigned short port);
     88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     89  void (*connect)(struct rpc_task *task);
     90  void * (*buf_alloc)(struct rpc_task *task, size_t size);
     91  void (*buf_free)(struct rpc_task *task);
     92  int (*send_request)(struct rpc_task *task);
     93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     94  void (*set_retrans_timeout)(struct rpc_task *task);
     95  void (*timer)(struct rpc_task *task);
     96  void (*release_request)(struct rpc_task *task);
     97  void (*close)(struct rpc_xprt *xprt);
     98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     99  void (*destroy)(struct rpc_xprt *xprt);
    100  void (*print_stats)(struct rpc_xprt *xprt, struct seq_file *seq);
    101 };
    102 struct rpc_xprt {
    103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    104  struct rpc_xprt_ops * ops;
    105  struct socket * sock;
    106  struct sock * inet;
    107  struct rpc_timeout timeout;
    108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    109  struct sockaddr_in addr;
    110  int prot;
    111  unsigned long cong;
    112  unsigned long cwnd;
    113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    114  size_t rcvsize,
    115  sndsize;
    116  size_t max_payload;
    117  unsigned int tsh_size;
    118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    119  struct rpc_wait_queue sending;
    120  struct rpc_wait_queue resend;
    121  struct rpc_wait_queue pending;
    122  struct rpc_wait_queue backlog;
    123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    124  struct list_head free;
    125  struct rpc_rqst * slot;
    126  unsigned int max_reqs;
    127  unsigned long state;
    128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    129  unsigned char shutdown : 1,
    130  resvport : 1;
    131  __u32 xid;
    132  u32 tcp_recm,
    133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    134  tcp_xid,
    135  tcp_reclen,
    136  tcp_offset;
    137  unsigned long tcp_copied,
    138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    139  tcp_flags;
    140  unsigned long connect_timeout,
    141  bind_timeout,
    142  reestablish_timeout;
    143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    144  struct work_struct connect_worker;
    145  unsigned short port;
    146  struct work_struct task_cleanup;
    147  struct timer_list timer;
    148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    149  unsigned long last_used,
    150  idle_timeout;
    151  spinlock_t transport_lock;
    152  spinlock_t reserve_lock;
    153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    154  struct rpc_task * snd_task;
    155  struct list_head recv;
    156  struct {
    157  unsigned long bind_count,
    158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    159  connect_count,
    160  connect_start,
    161  connect_time,
    162  sends,
    163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    164  recvs,
    165  bad_xids;
    166  unsigned long long req_u,
    167  bklog_u;
    168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    169  } stat;
    170  void (*old_data_ready)(struct sock *, int);
    171  void (*old_state_change)(struct sock *);
    172  void (*old_write_space)(struct sock *);
    173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    174 };
    175 #define XPRT_LAST_FRAG (1 << 0)
    176 #define XPRT_COPY_RECM (1 << 1)
    177 #define XPRT_COPY_XID (1 << 2)
    178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    179 #define XPRT_COPY_DATA (1 << 3)
    180 #endif
    181