Fixed tools/env utilities
[u-boot-openmoko/mini2440.git] / net / nfs.h
blob712afa089aa98428a7c2f13c5e4788aaf4831271
1 /*
2 * (C) Masami Komiya <mkomiya@sonare.it> 2004
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2, or (at
7 * your option) any later version.
8 */
10 #ifndef __NFS_H__
11 #define __NFS_H__
13 #define SUNRPC_PORT 111
15 #define PROG_PORTMAP 100000
16 #define PROG_NFS 100003
17 #define PROG_MOUNT 100005
19 #define MSG_CALL 0
20 #define MSG_REPLY 1
22 #define PORTMAP_GETPORT 3
24 #define MOUNT_ADDENTRY 1
25 #define MOUNT_UMOUNTALL 4
27 #define NFS_LOOKUP 4
28 #define NFS_READLINK 5
29 #define NFS_READ 6
31 #define NFS_FHSIZE 32
33 #define NFSERR_PERM 1
34 #define NFSERR_NOENT 2
35 #define NFSERR_ACCES 13
36 #define NFSERR_ISDIR 21
37 #define NFSERR_INVAL 22
39 /* Block size used for NFS read accesses. A RPC reply packet (including all
40 * headers) must fit within a single Ethernet frame to avoid fragmentation.
41 * Chosen to be a power of two, as most NFS servers are optimized for this. */
42 #define NFS_READ_SIZE 1024
44 #define NFS_MAXLINKDEPTH 16
46 struct rpc_t {
47 union {
48 uint8_t data[2048];
49 struct {
50 uint32_t id;
51 uint32_t type;
52 uint32_t rpcvers;
53 uint32_t prog;
54 uint32_t vers;
55 uint32_t proc;
56 uint32_t data[1];
57 } call;
58 struct {
59 uint32_t id;
60 uint32_t type;
61 uint32_t rstatus;
62 uint32_t verifier;
63 uint32_t v2;
64 uint32_t astatus;
65 uint32_t data[19];
66 } reply;
67 } u;
69 extern void NfsStart (void); /* Begin NFS */
72 /**********************************************************************/
74 #endif /* __NFS_H__ */