]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/lockd/lockd.h
lockd: Use sockaddr_storage for h_saddr field
[linux-2.6-omap-h63xx.git] / include / linux / lockd / lockd.h
index 41d7a8e61ceabc16732ee1b0ef6e8420dafbec41..964e6c93830fc299c06cc38e4131e06e39a545fd 100644 (file)
@@ -40,7 +40,7 @@ struct nlm_host {
        struct hlist_node       h_hash;         /* doubly linked list */
        struct sockaddr_storage h_addr;         /* peer address */
        size_t                  h_addrlen;
-       struct sockaddr_in      h_saddr;        /* our address (optional) */
+       struct sockaddr_storage h_srcaddr;      /* our address (optional) */
        struct rpc_clnt *       h_rpcclnt;      /* RPC client to talk to peer */
        char *                  h_name;         /* remote hostname */
        u32                     h_version;      /* interface version */
@@ -64,7 +64,7 @@ struct nlm_host {
        struct nsm_handle *     h_nsmhandle;    /* NSM status handle */
 
        char                    h_addrbuf[48],  /* address eyecatchers */
-                               h_saddrbuf[48];
+                               h_srcaddrbuf[48];
 };
 
 struct nsm_handle {
@@ -90,6 +90,16 @@ static inline struct sockaddr *nlm_addr(const struct nlm_host *host)
        return (struct sockaddr *)&host->h_addr;
 }
 
+static inline struct sockaddr_in *nlm_srcaddr_in(const struct nlm_host *host)
+{
+       return (struct sockaddr_in *)&host->h_srcaddr;
+}
+
+static inline struct sockaddr *nlm_srcaddr(const struct nlm_host *host)
+{
+       return (struct sockaddr *)&host->h_srcaddr;
+}
+
 /*
  * Map an fl_owner_t into a unique 32-bit "pid"
  */