aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/svcsock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sunrpc/svcsock.h')
-rw-r--r--include/linux/sunrpc/svcsock.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h
index b4acb3d37c3f..98b21ad370fd 100644
--- a/include/linux/sunrpc/svcsock.h
+++ b/include/linux/sunrpc/svcsock.h
@@ -20,8 +20,9 @@ struct svc_sock {
20 struct socket * sk_sock; /* berkeley socket layer */ 20 struct socket * sk_sock; /* berkeley socket layer */
21 struct sock * sk_sk; /* INET layer */ 21 struct sock * sk_sk; /* INET layer */
22 22
23 struct svc_pool * sk_pool; /* current pool iff queued */
23 struct svc_serv * sk_server; /* service for this socket */ 24 struct svc_serv * sk_server; /* service for this socket */
24 unsigned int sk_inuse; /* use count */ 25 atomic_t sk_inuse; /* use count */
25 unsigned long sk_flags; 26 unsigned long sk_flags;
26#define SK_BUSY 0 /* enqueued/receiving */ 27#define SK_BUSY 0 /* enqueued/receiving */
27#define SK_CONN 1 /* conn pending */ 28#define SK_CONN 1 /* conn pending */
@@ -31,9 +32,12 @@ struct svc_sock {
31#define SK_DEAD 6 /* socket closed */ 32#define SK_DEAD 6 /* socket closed */
32#define SK_CHNGBUF 7 /* need to change snd/rcv buffer sizes */ 33#define SK_CHNGBUF 7 /* need to change snd/rcv buffer sizes */
33#define SK_DEFERRED 8 /* request on sk_deferred */ 34#define SK_DEFERRED 8 /* request on sk_deferred */
35#define SK_OLD 9 /* used for temp socket aging mark+sweep */
36#define SK_DETACHED 10 /* detached from tempsocks list */
34 37
35 int sk_reserved; /* space on outq that is reserved */ 38 atomic_t sk_reserved; /* space on outq that is reserved */
36 39
40 spinlock_t sk_defer_lock; /* protects sk_deferred */
37 struct list_head sk_deferred; /* deferred requests that need to 41 struct list_head sk_deferred; /* deferred requests that need to
38 * be revisted */ 42 * be revisted */
39 struct mutex sk_mutex; /* to serialize sending data */ 43 struct mutex sk_mutex; /* to serialize sending data */
@@ -50,6 +54,9 @@ struct svc_sock {
50 int sk_reclen; /* length of record */ 54 int sk_reclen; /* length of record */
51 int sk_tcplen; /* current read length */ 55 int sk_tcplen; /* current read length */
52 time_t sk_lastrecv; /* time of last received request */ 56 time_t sk_lastrecv; /* time of last received request */
57
58 /* cache of various info for TCP sockets */
59 void *sk_info_authunix;
53}; 60};
54 61
55/* 62/*
@@ -57,9 +64,14 @@ struct svc_sock {
57 */ 64 */
58int svc_makesock(struct svc_serv *, int, unsigned short); 65int svc_makesock(struct svc_serv *, int, unsigned short);
59void svc_delete_socket(struct svc_sock *); 66void svc_delete_socket(struct svc_sock *);
60int svc_recv(struct svc_serv *, struct svc_rqst *, long); 67int svc_recv(struct svc_rqst *, long);
61int svc_send(struct svc_rqst *); 68int svc_send(struct svc_rqst *);
62void svc_drop(struct svc_rqst *); 69void svc_drop(struct svc_rqst *);
63void svc_sock_update_bufs(struct svc_serv *serv); 70void svc_sock_update_bufs(struct svc_serv *serv);
71int svc_sock_names(char *buf, struct svc_serv *serv, char *toclose);
72int svc_addsock(struct svc_serv *serv,
73 int fd,
74 char *name_return,
75 int *proto);
64 76
65#endif /* SUNRPC_SVCSOCK_H */ 77#endif /* SUNRPC_SVCSOCK_H */