X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fnetwork.h;h=9c75856c9ca898999e650df19e53242fcbe0ad23;hp=2f4ff3a16fd7e85734e70c1d2f15a777d707cdce;hb=HEAD;hpb=6ab9cdacd2ea314a837c7affb840aeeec620cb66 diff --git a/utils/mount/network.h b/utils/mount/network.h index 2f4ff3a..9c75856 100644 --- a/utils/mount/network.h +++ b/utils/mount/network.h @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 021110-1307, USA. + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 0211-1301 USA * */ @@ -25,16 +25,6 @@ #define _NFS_UTILS_MOUNT_NETWORK_H #include -#include - -#include "mount.h" - -#ifdef HAVE_RPCSVC_NFS_PROT_H -#include -#else -#include -#define nfsstat nfs_stat -#endif #define MNT_SENDBUFSIZE (2048U) #define MNT_RECVBUFSIZE (1024U) @@ -50,26 +40,42 @@ static const struct timeval TIMEOUT = { 20, 0 }; static const struct timeval RETRY_TIMEOUT = { 3, 0 }; int probe_bothports(clnt_addr_t *, clnt_addr_t *); +int nfs_probe_bothports(const struct sockaddr *, const socklen_t, + struct pmap *, const struct sockaddr *, + const socklen_t, struct pmap *); int nfs_gethostbyname(const char *, struct sockaddr_in *); -int nfs_name_to_address(const char *, const sa_family_t, - struct sockaddr *, socklen_t *); -int nfs_string_to_sockaddr(const char *, const size_t, - struct sockaddr *, socklen_t *); +int nfs_lookup(const char *hostname, const sa_family_t family, + struct sockaddr *sap, socklen_t *salen); +int nfs_string_to_sockaddr(const char *, struct sockaddr *, socklen_t *); int nfs_present_sockaddr(const struct sockaddr *, const socklen_t, char *, const size_t); -int get_client_address(struct sockaddr_in *, struct sockaddr_in *); int nfs_callback_address(const struct sockaddr *, const socklen_t, struct sockaddr *, socklen_t *); -int nfs_call_umount(clnt_addr_t *, dirpath *); int clnt_ping(struct sockaddr_in *, const unsigned long, const unsigned long, const unsigned int, struct sockaddr_in *); +struct mount_options; + +int nfs_nfs_proto_family(struct mount_options *options, sa_family_t *family); +int nfs_mount_proto_family(struct mount_options *options, sa_family_t *family); +int nfs_nfs_version(struct mount_options *options, unsigned long *version); +int nfs_nfs_protocol(struct mount_options *options, unsigned long *protocol); + +int nfs_options2pmap(struct mount_options *, + struct pmap *, struct pmap *); + int start_statd(void); unsigned long nfsvers_to_mnt(const unsigned long); +int nfs_call_umount(clnt_addr_t *, dirpath *); +int nfs_advise_umount(const struct sockaddr *, const socklen_t, + const struct pmap *, const dirpath *); CLIENT *mnt_openclnt(clnt_addr_t *, int *); void mnt_closeclnt(CLIENT *, int); +int nfs_umount_do_umnt(struct mount_options *options, + char **hostname, char **dirname); + #endif /* _NFS_UTILS_MOUNT_NETWORK_H */