summaryrefslogtreecommitdiffstats
path: root/libc/kernel/common/linux/sunrpc
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-03 19:28:35 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-03 19:28:35 -0800
commit1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 (patch)
tree3be0c520fae17689bbf5584e1136fb820caef26f /libc/kernel/common/linux/sunrpc
parent1767f908af327fa388b1c66883760ad851267013 (diff)
downloadbionic-1dc9e472e19acfe6dc7f41e429236e7eef7ceda1.zip
bionic-1dc9e472e19acfe6dc7f41e429236e7eef7ceda1.tar.gz
bionic-1dc9e472e19acfe6dc7f41e429236e7eef7ceda1.tar.bz2
auto import from //depot/cupcake/@135843
Diffstat (limited to 'libc/kernel/common/linux/sunrpc')
-rw-r--r--libc/kernel/common/linux/sunrpc/auth.h15
-rw-r--r--libc/kernel/common/linux/sunrpc/auth_gss.h16
-rw-r--r--libc/kernel/common/linux/sunrpc/clnt.h103
-rw-r--r--libc/kernel/common/linux/sunrpc/debug.h42
-rw-r--r--libc/kernel/common/linux/sunrpc/gss_api.h16
-rw-r--r--libc/kernel/common/linux/sunrpc/gss_asn1.h35
-rw-r--r--libc/kernel/common/linux/sunrpc/gss_err.h15
-rw-r--r--libc/kernel/common/linux/sunrpc/msg_prot.h15
-rw-r--r--libc/kernel/common/linux/sunrpc/sched.h182
-rw-r--r--libc/kernel/common/linux/sunrpc/stats.h49
-rw-r--r--libc/kernel/common/linux/sunrpc/svc.h82
-rw-r--r--libc/kernel/common/linux/sunrpc/svcauth.h15
-rw-r--r--libc/kernel/common/linux/sunrpc/timer.h24
-rw-r--r--libc/kernel/common/linux/sunrpc/types.h22
-rw-r--r--libc/kernel/common/linux/sunrpc/xdr.h15
-rw-r--r--libc/kernel/common/linux/sunrpc/xprt.h172
16 files changed, 818 insertions, 0 deletions
diff --git a/libc/kernel/common/linux/sunrpc/auth.h b/libc/kernel/common/linux/sunrpc/auth.h
new file mode 100644
index 0000000..ae0a3d0
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/auth.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_AUTH_H
+#define _LINUX_SUNRPC_AUTH_H
+
+#endif
diff --git a/libc/kernel/common/linux/sunrpc/auth_gss.h b/libc/kernel/common/linux/sunrpc/auth_gss.h
new file mode 100644
index 0000000..a64f1f8
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/auth_gss.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_AUTH_GSS_H
+#define _LINUX_SUNRPC_AUTH_GSS_H
+
+#endif
+
diff --git a/libc/kernel/common/linux/sunrpc/clnt.h b/libc/kernel/common/linux/sunrpc/clnt.h
new file mode 100644
index 0000000..a562ad9
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/clnt.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_CLNT_H
+#define _LINUX_SUNRPC_CLNT_H
+
+#include <linux/sunrpc/msg_prot.h>
+#include <linux/sunrpc/sched.h>
+#include <linux/sunrpc/xprt.h>
+#include <linux/sunrpc/auth.h>
+#include <linux/sunrpc/stats.h>
+#include <linux/sunrpc/xdr.h>
+#include <linux/sunrpc/timer.h>
+#include <asm/signal.h>
+
+struct rpc_portmap {
+ __u32 pm_prog;
+ __u32 pm_vers;
+ __u32 pm_prot;
+ __u16 pm_port;
+ unsigned char pm_binding : 1;
+ struct rpc_wait_queue pm_bindwait;
+};
+
+struct rpc_inode;
+
+struct rpc_clnt {
+ atomic_t cl_count;
+ atomic_t cl_users;
+ struct rpc_xprt * cl_xprt;
+ struct rpc_procinfo * cl_procinfo;
+ u32 cl_maxproc;
+
+ char * cl_server;
+ char * cl_protname;
+ struct rpc_auth * cl_auth;
+ struct rpc_stat * cl_stats;
+ struct rpc_iostats * cl_metrics;
+
+ unsigned int cl_softrtry : 1,
+ cl_intr : 1,
+ cl_autobind : 1,
+ cl_oneshot : 1,
+ cl_dead : 1;
+
+ struct rpc_rtt * cl_rtt;
+ struct rpc_portmap * cl_pmap;
+
+ int cl_nodelen;
+ char cl_nodename[UNX_MAXNODENAME];
+ char cl_pathname[30];
+ struct vfsmount * cl_vfsmnt;
+ struct dentry * cl_dentry;
+ struct rpc_clnt * cl_parent;
+ struct rpc_rtt cl_rtt_default;
+ struct rpc_portmap cl_pmap_default;
+ char cl_inline_name[32];
+};
+#define cl_timeout cl_xprt->timeout
+#define cl_prog cl_pmap->pm_prog
+#define cl_vers cl_pmap->pm_vers
+#define cl_port cl_pmap->pm_port
+#define cl_prot cl_pmap->pm_prot
+
+#define RPC_MAXVERSION 4
+struct rpc_program {
+ char * name;
+ u32 number;
+ unsigned int nrvers;
+ struct rpc_version ** version;
+ struct rpc_stat * stats;
+ char * pipe_dir_name;
+};
+
+struct rpc_version {
+ u32 number;
+ unsigned int nrprocs;
+ struct rpc_procinfo * procs;
+};
+
+struct rpc_procinfo {
+ u32 p_proc;
+ kxdrproc_t p_encode;
+ kxdrproc_t p_decode;
+ unsigned int p_bufsiz;
+ unsigned int p_count;
+ unsigned int p_timer;
+ u32 p_statidx;
+ char * p_name;
+};
+
+#define RPC_CONGESTED(clnt) (RPCXPRT_CONGESTED((clnt)->cl_xprt))
+#define RPC_PEERADDR(clnt) (&(clnt)->cl_xprt->addr)
+
+#endif
diff --git a/libc/kernel/common/linux/sunrpc/debug.h b/libc/kernel/common/linux/sunrpc/debug.h
new file mode 100644
index 0000000..e2689f1
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/debug.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_DEBUG_H_
+#define _LINUX_SUNRPC_DEBUG_H_
+
+#define RPCDBG_XPRT 0x0001
+#define RPCDBG_CALL 0x0002
+#define RPCDBG_DEBUG 0x0004
+#define RPCDBG_NFS 0x0008
+#define RPCDBG_AUTH 0x0010
+#define RPCDBG_PMAP 0x0020
+#define RPCDBG_SCHED 0x0040
+#define RPCDBG_TRANS 0x0080
+#define RPCDBG_SVCSOCK 0x0100
+#define RPCDBG_SVCDSP 0x0200
+#define RPCDBG_MISC 0x0400
+#define RPCDBG_CACHE 0x0800
+#define RPCDBG_ALL 0x7fff
+
+#define CTL_SUNRPC 7249
+
+enum {
+ CTL_RPCDEBUG = 1,
+ CTL_NFSDEBUG,
+ CTL_NFSDDEBUG,
+ CTL_NLMDEBUG,
+ CTL_SLOTTABLE_UDP,
+ CTL_SLOTTABLE_TCP,
+ CTL_MIN_RESVPORT,
+ CTL_MAX_RESVPORT,
+};
+
+#endif
diff --git a/libc/kernel/common/linux/sunrpc/gss_api.h b/libc/kernel/common/linux/sunrpc/gss_api.h
new file mode 100644
index 0000000..cbc77c2
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/gss_api.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_GSS_API_H
+#define _LINUX_SUNRPC_GSS_API_H
+
+#endif
+
diff --git a/libc/kernel/common/linux/sunrpc/gss_asn1.h b/libc/kernel/common/linux/sunrpc/gss_asn1.h
new file mode 100644
index 0000000..8f18ba0
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/gss_asn1.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <linux/sunrpc/gss_api.h>
+
+#define SIZEOF_INT 4
+
+#define G_BAD_SERVICE_NAME (-2045022976L)
+#define G_BAD_STRING_UID (-2045022975L)
+#define G_NOUSER (-2045022974L)
+#define G_VALIDATE_FAILED (-2045022973L)
+#define G_BUFFER_ALLOC (-2045022972L)
+#define G_BAD_MSG_CTX (-2045022971L)
+#define G_WRONG_SIZE (-2045022970L)
+#define G_BAD_USAGE (-2045022969L)
+#define G_UNKNOWN_QOP (-2045022968L)
+#define G_NO_HOSTNAME (-2045022967L)
+#define G_BAD_HOSTNAME (-2045022966L)
+#define G_WRONG_MECH (-2045022965L)
+#define G_BAD_TOK_HEADER (-2045022964L)
+#define G_BAD_DIRECTION (-2045022963L)
+#define G_TOK_TRUNC (-2045022962L)
+#define G_REFLECT (-2045022961L)
+#define G_WRONG_TOKID (-2045022960L)
+
+#define g_OID_equal(o1,o2) (((o1)->len == (o2)->len) && (memcmp((o1)->data,(o2)->data,(int) (o1)->len) == 0))
+
diff --git a/libc/kernel/common/linux/sunrpc/gss_err.h b/libc/kernel/common/linux/sunrpc/gss_err.h
new file mode 100644
index 0000000..01fb1b4
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/gss_err.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_GSS_ERR_H
+#define _LINUX_SUNRPC_GSS_ERR_H
+
+#endif
diff --git a/libc/kernel/common/linux/sunrpc/msg_prot.h b/libc/kernel/common/linux/sunrpc/msg_prot.h
new file mode 100644
index 0000000..52f4e76
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/msg_prot.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_MSGPROT_H_
+#define _LINUX_SUNRPC_MSGPROT_H_
+
+#endif
diff --git a/libc/kernel/common/linux/sunrpc/sched.h b/libc/kernel/common/linux/sunrpc/sched.h
new file mode 100644
index 0000000..859b2d8
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/sched.h
@@ -0,0 +1,182 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_SCHED_H_
+#define _LINUX_SUNRPC_SCHED_H_
+
+#include <linux/timer.h>
+#include <linux/sunrpc/types.h>
+#include <linux/spinlock.h>
+#include <linux/wait.h>
+#include <linux/workqueue.h>
+#include <linux/sunrpc/xdr.h>
+
+struct rpc_procinfo;
+struct rpc_message {
+ struct rpc_procinfo * rpc_proc;
+ void * rpc_argp;
+ void * rpc_resp;
+ struct rpc_cred * rpc_cred;
+};
+
+struct rpc_call_ops;
+struct rpc_wait_queue;
+struct rpc_wait {
+ struct list_head list;
+ struct list_head links;
+ struct rpc_wait_queue * rpc_waitq;
+};
+
+struct rpc_task {
+#ifdef RPC_DEBUG
+ unsigned long tk_magic;
+#endif
+ atomic_t tk_count;
+ struct list_head tk_task;
+ struct rpc_clnt * tk_client;
+ struct rpc_rqst * tk_rqstp;
+ int tk_status;
+
+ struct rpc_message tk_msg;
+ __u8 tk_garb_retry;
+ __u8 tk_cred_retry;
+
+ unsigned long tk_cookie;
+
+ void (*tk_timeout_fn)(struct rpc_task *);
+ void (*tk_callback)(struct rpc_task *);
+ void (*tk_action)(struct rpc_task *);
+ const struct rpc_call_ops *tk_ops;
+ void * tk_calldata;
+
+ struct timer_list tk_timer;
+ unsigned long tk_timeout;
+ unsigned short tk_flags;
+ unsigned char tk_priority : 2;
+ unsigned long tk_runstate;
+ struct workqueue_struct *tk_workqueue;
+ union {
+ struct work_struct tk_work;
+ struct rpc_wait tk_wait;
+ } u;
+
+ unsigned short tk_timeouts;
+ size_t tk_bytes_sent;
+ unsigned long tk_start;
+ long tk_rtt;
+
+#ifdef RPC_DEBUG
+ unsigned short tk_pid;
+#endif
+};
+#define tk_auth tk_client->cl_auth
+#define tk_xprt tk_client->cl_xprt
+
+#define task_for_each(task, pos, head) list_for_each(pos, head) if ((task=list_entry(pos, struct rpc_task, u.tk_wait.list)),1)
+
+#define task_for_first(task, head) if (!list_empty(head) && ((task=list_entry((head)->next, struct rpc_task, u.tk_wait.list)),1))
+
+#define alltask_for_each(task, pos, head) list_for_each(pos, head) if ((task=list_entry(pos, struct rpc_task, tk_task)),1)
+
+typedef void (*rpc_action)(struct rpc_task *);
+
+struct rpc_call_ops {
+ void (*rpc_call_prepare)(struct rpc_task *, void *);
+ void (*rpc_call_done)(struct rpc_task *, void *);
+ void (*rpc_release)(void *);
+};
+
+#define RPC_TASK_ASYNC 0x0001
+#define RPC_TASK_SWAPPER 0x0002
+#define RPC_TASK_CHILD 0x0008
+#define RPC_CALL_MAJORSEEN 0x0020
+#define RPC_TASK_ROOTCREDS 0x0040
+#define RPC_TASK_DYNAMIC 0x0080
+#define RPC_TASK_KILLED 0x0100
+#define RPC_TASK_SOFT 0x0200
+#define RPC_TASK_NOINTR 0x0400
+
+#define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC)
+#define RPC_IS_CHILD(t) ((t)->tk_flags & RPC_TASK_CHILD)
+#define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER)
+#define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS)
+#define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED)
+#define RPC_DO_CALLBACK(t) ((t)->tk_callback != NULL)
+#define RPC_IS_SOFT(t) ((t)->tk_flags & RPC_TASK_SOFT)
+#define RPC_TASK_UNINTERRUPTIBLE(t) ((t)->tk_flags & RPC_TASK_NOINTR)
+
+#define RPC_TASK_RUNNING 0
+#define RPC_TASK_QUEUED 1
+#define RPC_TASK_WAKEUP 2
+#define RPC_TASK_HAS_TIMER 3
+#define RPC_TASK_ACTIVE 4
+
+#define RPC_IS_RUNNING(t) (test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define rpc_set_running(t) (set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define rpc_test_and_set_running(t) (test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define rpc_clear_running(t) do { smp_mb__before_clear_bit(); clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate); smp_mb__after_clear_bit(); } while (0)
+
+#define RPC_IS_QUEUED(t) (test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate))
+#define rpc_set_queued(t) (set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate))
+#define rpc_clear_queued(t) do { smp_mb__before_clear_bit(); clear_bit(RPC_TASK_QUEUED, &(t)->tk_runstate); smp_mb__after_clear_bit(); } while (0)
+
+#define rpc_start_wakeup(t) (test_and_set_bit(RPC_TASK_WAKEUP, &(t)->tk_runstate) == 0)
+#define rpc_finish_wakeup(t) do { smp_mb__before_clear_bit(); clear_bit(RPC_TASK_WAKEUP, &(t)->tk_runstate); smp_mb__after_clear_bit(); } while (0)
+
+#define RPC_IS_ACTIVATED(t) (test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate))
+#define rpc_set_active(t) (set_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate))
+#define rpc_clear_active(t) do { smp_mb__before_clear_bit(); clear_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate); smp_mb__after_clear_bit(); } while(0)
+
+#define RPC_PRIORITY_LOW 0
+#define RPC_PRIORITY_NORMAL 1
+#define RPC_PRIORITY_HIGH 2
+#define RPC_NR_PRIORITY (RPC_PRIORITY_HIGH+1)
+
+struct rpc_wait_queue {
+ spinlock_t lock;
+ struct list_head tasks[RPC_NR_PRIORITY];
+ unsigned long cookie;
+ unsigned char maxpriority;
+ unsigned char priority;
+ unsigned char count;
+ unsigned char nr;
+ unsigned short qlen;
+#ifdef RPC_DEBUG
+ const char * name;
+#endif
+};
+
+#define RPC_BATCH_COUNT 16
+
+#ifndef RPC_DEBUG
+#define RPC_WAITQ_INIT(var,qname) { .lock = SPIN_LOCK_UNLOCKED, .tasks = { [0] = LIST_HEAD_INIT(var.tasks[0]), [1] = LIST_HEAD_INIT(var.tasks[1]), [2] = LIST_HEAD_INIT(var.tasks[2]), }, }
+#else
+#define RPC_WAITQ_INIT(var,qname) { .lock = SPIN_LOCK_UNLOCKED, .tasks = { [0] = LIST_HEAD_INIT(var.tasks[0]), [1] = LIST_HEAD_INIT(var.tasks[1]), [2] = LIST_HEAD_INIT(var.tasks[2]), }, .name = qname, }
+#endif
+#define RPC_WAITQ(var,qname) struct rpc_wait_queue var = RPC_WAITQ_INIT(var,qname)
+
+#define RPC_IS_PRIORITY(q) ((q)->maxpriority > 0)
+
+struct rpc_task *rpc_new_task(struct rpc_clnt *, int flags,
+ const struct rpc_call_ops *ops, void *data);
+struct rpc_task *rpc_run_task(struct rpc_clnt *clnt, int flags,
+ const struct rpc_call_ops *ops, void *data);
+struct rpc_task *rpc_new_child(struct rpc_clnt *, struct rpc_task *parent);
+
+struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *);
+
+#ifdef RPC_DEBUG
+
+#endif
+
+#ifdef RPC_DEBUG
+#endif
+#endif
diff --git a/libc/kernel/common/linux/sunrpc/stats.h b/libc/kernel/common/linux/sunrpc/stats.h
new file mode 100644
index 0000000..03e7338
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/stats.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_STATS_H
+#define _LINUX_SUNRPC_STATS_H
+
+#include <linux/proc_fs.h>
+
+struct rpc_stat {
+ struct rpc_program * program;
+
+ unsigned int netcnt,
+ netudpcnt,
+ nettcpcnt,
+ nettcpconn,
+ netreconn;
+ unsigned int rpccnt,
+ rpcretrans,
+ rpcauthrefresh,
+ rpcgarbage;
+};
+
+struct svc_stat {
+ struct svc_program * program;
+
+ unsigned int netcnt,
+ netudpcnt,
+ nettcpcnt,
+ nettcpconn;
+ unsigned int rpccnt,
+ rpcbadfmt,
+ rpcbadauth,
+ rpcbadclnt;
+};
+
+#ifdef MODULE
+
+#endif
+
+#define proc_net_rpc NULL
+#endif
diff --git a/libc/kernel/common/linux/sunrpc/svc.h b/libc/kernel/common/linux/sunrpc/svc.h
new file mode 100644
index 0000000..7a0cc2d
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/svc.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef SUNRPC_SVC_H
+#define SUNRPC_SVC_H
+
+#include <linux/in.h>
+#include <linux/sunrpc/types.h>
+#include <linux/sunrpc/xdr.h>
+#include <linux/sunrpc/svcauth.h>
+#include <linux/wait.h>
+#include <linux/mm.h>
+
+struct svc_serv {
+ struct list_head sv_threads;
+ struct list_head sv_sockets;
+ struct svc_program * sv_program;
+ struct svc_stat * sv_stats;
+ spinlock_t sv_lock;
+ unsigned int sv_nrthreads;
+ unsigned int sv_bufsz;
+ unsigned int sv_xdrsize;
+
+ struct list_head sv_permsocks;
+ struct list_head sv_tempsocks;
+ int sv_tmpcnt;
+
+ char * sv_name;
+};
+
+#define RPCSVC_MAXPAYLOAD (64*1024u)
+
+#define RPCSVC_MAXPAGES ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE + 2)
+
+struct svc_program {
+ struct svc_program * pg_next;
+ u32 pg_prog;
+ unsigned int pg_lovers;
+ unsigned int pg_hivers;
+ unsigned int pg_nvers;
+ struct svc_version ** pg_vers;
+ char * pg_name;
+ char * pg_class;
+ struct svc_stat * pg_stats;
+ int (*pg_authenticate)(struct svc_rqst *);
+};
+
+struct svc_version {
+ u32 vs_vers;
+ u32 vs_nproc;
+ struct svc_procedure * vs_proc;
+ u32 vs_xdrsize;
+
+ int (*vs_dispatch)(struct svc_rqst *, u32 *);
+};
+
+typedef int (*svc_procfunc)(struct svc_rqst *, void *argp, void *resp);
+struct svc_procedure {
+ svc_procfunc pc_func;
+ kxdrproc_t pc_decode;
+ kxdrproc_t pc_encode;
+ kxdrproc_t pc_release;
+ unsigned int pc_argsize;
+ unsigned int pc_ressize;
+ unsigned int pc_count;
+ unsigned int pc_cachetype;
+ unsigned int pc_xdrressize;
+};
+
+typedef void (*svc_thread_fn)(struct svc_rqst *);
+
+struct svc_serv * svc_create(struct svc_program *, unsigned int);
+
+#endif
diff --git a/libc/kernel/common/linux/sunrpc/svcauth.h b/libc/kernel/common/linux/sunrpc/svcauth.h
new file mode 100644
index 0000000..9b414d7
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/svcauth.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_SVCAUTH_H_
+#define _LINUX_SUNRPC_SVCAUTH_H_
+
+#endif
diff --git a/libc/kernel/common/linux/sunrpc/timer.h b/libc/kernel/common/linux/sunrpc/timer.h
new file mode 100644
index 0000000..8fb78e5
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/timer.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_TIMER_H
+#define _LINUX_SUNRPC_TIMER_H
+
+#include <asm/atomic.h>
+
+struct rpc_rtt {
+ unsigned long timeo;
+ unsigned long srtt[5];
+ unsigned long sdrtt[5];
+ int ntimeouts[5];
+};
+
+#endif
diff --git a/libc/kernel/common/linux/sunrpc/types.h b/libc/kernel/common/linux/sunrpc/types.h
new file mode 100644
index 0000000..ce52052
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/types.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_TYPES_H_
+#define _LINUX_SUNRPC_TYPES_H_
+
+#include <linux/timer.h>
+#include <linux/workqueue.h>
+#include <linux/sunrpc/debug.h>
+#include <linux/list.h>
+
+#define signalled() (signal_pending(current))
+
+#endif
diff --git a/libc/kernel/common/linux/sunrpc/xdr.h b/libc/kernel/common/linux/sunrpc/xdr.h
new file mode 100644
index 0000000..d513843
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/xdr.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _SUNRPC_XDR_H_
+#define _SUNRPC_XDR_H_
+
+#endif
diff --git a/libc/kernel/common/linux/sunrpc/xprt.h b/libc/kernel/common/linux/sunrpc/xprt.h
new file mode 100644
index 0000000..145a26d
--- /dev/null
+++ b/libc/kernel/common/linux/sunrpc/xprt.h
@@ -0,0 +1,172 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_XPRT_H
+#define _LINUX_SUNRPC_XPRT_H
+
+#include <linux/uio.h>
+#include <linux/socket.h>
+#include <linux/in.h>
+#include <linux/sunrpc/sched.h>
+#include <linux/sunrpc/xdr.h>
+
+#define RPC_MIN_SLOT_TABLE (2U)
+#define RPC_DEF_SLOT_TABLE (16U)
+#define RPC_MAX_SLOT_TABLE (128U)
+
+#define RPC_CALLHDRSIZE 6
+#define RPC_REPHDRSIZE 4
+
+#define RPC_MIN_RESVPORT (1U)
+#define RPC_MAX_RESVPORT (65535U)
+#define RPC_DEF_MIN_RESVPORT (665U)
+#define RPC_DEF_MAX_RESVPORT (1023U)
+
+struct rpc_timeout {
+ unsigned long to_initval,
+ to_maxval,
+ to_increment;
+ unsigned int to_retries;
+ unsigned char to_exponential;
+};
+
+struct rpc_task;
+struct rpc_xprt;
+struct seq_file;
+
+struct rpc_rqst {
+
+ struct rpc_xprt * rq_xprt;
+ struct xdr_buf rq_snd_buf;
+ struct xdr_buf rq_rcv_buf;
+
+ struct rpc_task * rq_task;
+ __u32 rq_xid;
+ int rq_cong;
+ int rq_received;
+ u32 rq_seqno;
+ int rq_enc_pages_num;
+ struct page **rq_enc_pages;
+ void (*rq_release_snd_buf)(struct rpc_rqst *);
+ struct list_head rq_list;
+
+ __u32 * rq_buffer;
+ size_t rq_bufsize;
+
+ struct xdr_buf rq_private_buf;
+ unsigned long rq_majortimeo;
+ unsigned long rq_timeout;
+ unsigned int rq_retries;
+
+ u32 rq_bytes_sent;
+
+ unsigned long rq_xtime;
+ int rq_ntrans;
+};
+#define rq_svec rq_snd_buf.head
+#define rq_slen rq_snd_buf.len
+
+struct rpc_xprt_ops {
+ void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize);
+ int (*reserve_xprt)(struct rpc_task *task);
+ void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
+ void (*set_port)(struct rpc_xprt *xprt, unsigned short port);
+ void (*connect)(struct rpc_task *task);
+ void * (*buf_alloc)(struct rpc_task *task, size_t size);
+ void (*buf_free)(struct rpc_task *task);
+ int (*send_request)(struct rpc_task *task);
+ void (*set_retrans_timeout)(struct rpc_task *task);
+ void (*timer)(struct rpc_task *task);
+ void (*release_request)(struct rpc_task *task);
+ void (*close)(struct rpc_xprt *xprt);
+ void (*destroy)(struct rpc_xprt *xprt);
+ void (*print_stats)(struct rpc_xprt *xprt, struct seq_file *seq);
+};
+
+struct rpc_xprt {
+ struct rpc_xprt_ops * ops;
+ struct socket * sock;
+ struct sock * inet;
+
+ struct rpc_timeout timeout;
+ struct sockaddr_in addr;
+ int prot;
+
+ unsigned long cong;
+ unsigned long cwnd;
+
+ size_t rcvsize,
+ sndsize;
+
+ size_t max_payload;
+ unsigned int tsh_size;
+
+ struct rpc_wait_queue sending;
+ struct rpc_wait_queue resend;
+ struct rpc_wait_queue pending;
+ struct rpc_wait_queue backlog;
+ struct list_head free;
+ struct rpc_rqst * slot;
+ unsigned int max_reqs;
+ unsigned long state;
+ unsigned char shutdown : 1,
+ resvport : 1;
+
+ __u32 xid;
+
+ u32 tcp_recm,
+ tcp_xid,
+ tcp_reclen,
+ tcp_offset;
+ unsigned long tcp_copied,
+ tcp_flags;
+
+ unsigned long connect_timeout,
+ bind_timeout,
+ reestablish_timeout;
+ struct work_struct connect_worker;
+ unsigned short port;
+
+ struct work_struct task_cleanup;
+ struct timer_list timer;
+ unsigned long last_used,
+ idle_timeout;
+
+ spinlock_t transport_lock;
+ spinlock_t reserve_lock;
+ struct rpc_task * snd_task;
+
+ struct list_head recv;
+
+ struct {
+ unsigned long bind_count,
+ connect_count,
+ connect_start,
+ connect_time,
+ sends,
+ recvs,
+ bad_xids;
+
+ unsigned long long req_u,
+ bklog_u;
+ } stat;
+
+ void (*old_data_ready)(struct sock *, int);
+ void (*old_state_change)(struct sock *);
+ void (*old_write_space)(struct sock *);
+};
+
+#define XPRT_LAST_FRAG (1 << 0)
+#define XPRT_COPY_RECM (1 << 1)
+#define XPRT_COPY_XID (1 << 2)
+#define XPRT_COPY_DATA (1 << 3)
+
+#endif