]> Git Repo - u-boot.git/blame - net/nfs.h
efi_loader: Use EFI_CACHELINE_SIZE in the image loader too
[u-boot.git] / net / nfs.h
CommitLineData
83d290c5 1/* SPDX-License-Identifier: GPL-2.0+ */
cbd8a35c
WD
2/*
3 * (C) Masami Komiya <[email protected]> 2004
cbd8a35c
WD
4 */
5
6#ifndef __NFS_H__
7#define __NFS_H__
8
9#define SUNRPC_PORT 111
10
11#define PROG_PORTMAP 100000
12#define PROG_NFS 100003
13#define PROG_MOUNT 100005
14
15#define MSG_CALL 0
16#define MSG_REPLY 1
17
18#define PORTMAP_GETPORT 3
19
20#define MOUNT_ADDENTRY 1
21#define MOUNT_UMOUNTALL 4
22
23#define NFS_LOOKUP 4
24#define NFS_READLINK 5
25#define NFS_READ 6
26
b0baca98
GG
27#define NFS3PROC_LOOKUP 3
28
cbd8a35c 29#define NFS_FHSIZE 32
b0baca98 30#define NFS3_FHSIZE 64
cbd8a35c
WD
31
32#define NFSERR_PERM 1
33#define NFSERR_NOENT 2
34#define NFSERR_ACCES 13
35#define NFSERR_ISDIR 21
36#define NFSERR_INVAL 22
37
0b1e5806
TR
38/*
39 * Block size used for NFS read accesses. A RPC reply packet (including all
cbd8a35c 40 * headers) must fit within a single Ethernet frame to avoid fragmentation.
0b1e5806
TR
41 * However, if CONFIG_IP_DEFRAG is set, a bigger value could be used. In any
42 * case, most NFS servers are optimized for a power of 2.
bd931ca6 43 */
0b1e5806 44#define NFS_READ_SIZE 1024 /* biggest power of two that fits Ether frame */
cbd8a35c 45
b0baca98
GG
46/* Values for Accept State flag on RPC answers (See: rfc1831) */
47enum rpc_accept_stat {
48 NFS_RPC_SUCCESS = 0, /* RPC executed successfully */
49 NFS_RPC_PROG_UNAVAIL = 1, /* remote hasn't exported program */
50 NFS_RPC_PROG_MISMATCH = 2, /* remote can't support version # */
51 NFS_RPC_PROC_UNAVAIL = 3, /* program can't support procedure */
52 NFS_RPC_GARBAGE_ARGS = 4, /* procedure can't decode params */
53 NFS_RPC_SYSTEM_ERR = 5 /* errors like memory allocation failure */
54};
55
cbd8a35c
WD
56struct rpc_t {
57 union {
58 uint8_t data[2048];
59 struct {
60 uint32_t id;
61 uint32_t type;
62 uint32_t rpcvers;
63 uint32_t prog;
64 uint32_t vers;
65 uint32_t proc;
66 uint32_t data[1];
67 } call;
68 struct {
69 uint32_t id;
70 uint32_t type;
71 uint32_t rstatus;
72 uint32_t verifier;
73 uint32_t v2;
74 uint32_t astatus;
11e8ec96 75 uint32_t data[NFS_READ_SIZE];
cbd8a35c
WD
76 } reply;
77 } u;
704f3acf 78} __attribute__((packed));
68c76a3a 79void nfs_start(void); /* Begin NFS */
cbd8a35c
WD
80
81
82/**********************************************************************/
83
84#endif /* __NFS_H__ */
This page took 0.269937 seconds and 4 git commands to generate.