Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
[firefly-linux-kernel-4.4.55.git] / include / linux / sunrpc / svc.h
index 96c1b6ae7d96db95bfc5299f70545cec3c5fd571..35fa4d5aadd06e4685339abe13ff9986535645cf 100644 (file)
@@ -11,6 +11,7 @@
 #define SUNRPC_SVC_H
 
 #include <linux/in.h>
+#include <linux/in6.h>
 #include <linux/sunrpc/types.h>
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/auth.h>
@@ -191,7 +192,11 @@ static inline void svc_putu32(struct kvec *iov, __be32 val)
        iov->iov_len += sizeof(__be32);
 }
 
-       
+union svc_addr_u {
+    struct in_addr     addr;
+    struct in6_addr    addr6;
+};
+
 /*
  * The context of a single thread, including the request currently being
  * processed.
@@ -227,8 +232,8 @@ struct svc_rqst {
        unsigned short
                                rq_secure  : 1; /* secure port */
 
-
-       __be32                  rq_daddr;       /* dest addr of request - reply from here */
+       union svc_addr_u        rq_daddr;       /* dest addr of request
+                                                *  - reply from here */
 
        void *                  rq_argp;        /* decoded arguments */
        void *                  rq_resp;        /* xdr'd results */
@@ -263,6 +268,11 @@ static inline struct sockaddr_in *svc_addr_in(struct svc_rqst *rqst)
        return (struct sockaddr_in *) &rqst->rq_addr;
 }
 
+static inline struct sockaddr_in6 *svc_addr_in6(struct svc_rqst *rqst)
+{
+       return (struct sockaddr_in6 *) &rqst->rq_addr;
+}
+
 static inline struct sockaddr *svc_addr(struct svc_rqst *rqst)
 {
        return (struct sockaddr *) &rqst->rq_addr;
@@ -308,7 +318,7 @@ struct svc_deferred_req {
        struct svc_sock         *svsk;
        struct sockaddr_storage addr;   /* where reply must go */
        size_t                  addrlen;
-       __be32                  daddr;  /* where reply must come from */
+       union svc_addr_u        daddr;  /* where reply must come from */
        struct cache_deferred_req handle;
        int                     argslen;
        __be32                  args[0];