summaryrefslogtreecommitdiff
path: root/include/linux/lockd/lockd.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-09-03 22:35:46 +0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-09-30 02:13:39 +0400
commit90151e6e4d00a3150d03d52170c246734b274622 (patch)
treebb0c7b1ab2b08ca86e87a30e0da0779a14a9b94d /include/linux/lockd/lockd.h
parentb4ed58fd34d4def88bda59f9cc566ec9fca6a096 (diff)
downloadlinux-90151e6e4d00a3150d03d52170c246734b274622.tar.xz
lockd: Use sockaddr_storage for h_saddr field
To store larger addresses in the nlm_host structure, make h_saddr a sockaddr_storage. And let's call it something more self-explanatory: "saddr" could easily be mistaken for "server address". Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux/lockd/lockd.h')
-rw-r--r--include/linux/lockd/lockd.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index 41d7a8e61cea..964e6c93830f 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -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"
*/