12 FILE_LICENCE ( GPL2_OR_LATER );
14 /** NFS MOUNT protocol number */
15 #define ONCRPC_MOUNT 100005
16 /** NFS MOUNT protocol version */
23 #define MNT3ERR_PERM 1
24 /** No such file or directory */
25 #define MNT3ERR_NOENT 2
28 /** Permission denied */
29 #define MNT3ERR_ACCES 13
30 /** Not a directory */
31 #define MNT3ERR_NOTDIR 20
32 /** Invalid argument */
33 #define MNT3ERR_INVAL 22
34 /** Filename too long */
35 #define MNT3ERR_NAMETOOLONG 63
36 /** Operation not supported */
37 #define MNT3ERR_NOTSUPP 10004
38 /** A failure on the server */
39 #define MNT3ERR_SERVERFAULT 10006
46 struct mount_mnt_reply {
49 /** Root file handle */
54 * Prepare an ONC RPC session to be used as a MOUNT session
56 * @v session ONC RPC session
57 * @v credential ONC RPC credential
59 * The credential parameter must not be NULL, use 'oncrpc_auth_none' if you
60 * don't want a particular scheme to be used.
62 static inline void mount_init_session ( struct oncrpc_session *session,
63 struct oncrpc_cred *credential ) {
64 oncrpc_init_session ( session, credential, &oncrpc_auth_none,
65 ONCRPC_MOUNT, MOUNT_VERS );
68 int mount_mnt ( struct interface *intf, struct oncrpc_session *session,
69 const char *mountpoint );
70 int mount_umnt ( struct interface *intf, struct oncrpc_session *session,
71 const char *mountpoint );
73 int mount_get_mnt_reply ( struct mount_mnt_reply *mnt_reply,
74 struct oncrpc_reply *reply );
76 #endif /* _IPXE_MOUNT_H */