NSM: Move nsm_addr() to fs/lockd/mon.c
[safe/jmp/linux-2.6] / include / linux / lockd / lockd.h
index 30a6a9c..6ab0449 100644 (file)
@@ -85,6 +85,7 @@ struct nsm_handle {
        size_t                  sm_addrlen;
        unsigned int            sm_monitored : 1,
                                sm_sticky : 1;  /* don't unmonitor */
+       struct nsm_private      sm_priv;
        char                    sm_addrbuf[NSM_ADDRBUF];
 };
 
@@ -111,16 +112,6 @@ static inline struct sockaddr *nlm_srcaddr(const struct nlm_host *host)
        return (struct sockaddr *)&host->h_srcaddr;
 }
 
-static inline struct sockaddr_in *nsm_addr_in(const struct nsm_handle *handle)
-{
-       return (struct sockaddr_in *)&handle->sm_addr;
-}
-
-static inline struct sockaddr *nsm_addr(const struct nsm_handle *handle)
-{
-       return (struct sockaddr *)&handle->sm_addr;
-}
-
 /*
  * Map an fl_owner_t into a unique 32-bit "pid"
  */
@@ -204,6 +195,7 @@ extern struct svc_procedure nlmsvc_procedures4[];
 extern int                     nlmsvc_grace_period;
 extern unsigned long           nlmsvc_timeout;
 extern int                     nsm_use_hostnames;
+extern int                     nsm_local_state;
 
 /*
  * Lockd client functions
@@ -238,13 +230,20 @@ void                nlm_rebind_host(struct nlm_host *);
 struct nlm_host * nlm_get_host(struct nlm_host *);
 void             nlm_release_host(struct nlm_host *);
 void             nlm_shutdown_hosts(void);
-extern void      nlm_host_rebooted(const struct sockaddr_in *, const char *,
-                                       unsigned int, u32);
+void             nlm_host_rebooted(const struct nlm_reboot *);
 
 /*
  * Host monitoring
  */
 int              nsm_monitor(const struct nlm_host *host);
+void             nsm_unmonitor(const struct nlm_host *host);
+
+struct nsm_handle *nsm_get_handle(const struct sockaddr *sap,
+                                       const size_t salen,
+                                       const char *hostname,
+                                       const size_t hostname_len);
+struct nsm_handle *nsm_reboot_lookup(const struct nlm_reboot *info);
+void             nsm_release(struct nsm_handle *nsm);
 
 /*
  * This is used in garbage collection and resource reclaim