1
2
3
4
5
6
7
8
9
10
11
12#ifndef AFS_VL_H
13#define AFS_VL_H
14
15#include "afs.h"
16
17#define AFS_VL_PORT 7003
18#define VL_SERVICE 52
19#define YFS_VL_SERVICE 2503
20
21enum AFSVL_Operations {
22 VLGETENTRYBYID = 503,
23 VLGETENTRYBYNAME = 504,
24 VLPROBE = 514,
25 VLGETENTRYBYIDU = 526,
26 VLGETENTRYBYNAMEU = 527,
27 VLGETADDRSU = 533,
28 YVLGETENDPOINTS = 64002,
29 VLGETCAPABILITIES = 65537,
30};
31
32enum AFSVL_Errors {
33 AFSVL_IDEXIST = 363520,
34 AFSVL_IO = 363521,
35 AFSVL_NAMEEXIST = 363522,
36 AFSVL_CREATEFAIL = 363523,
37 AFSVL_NOENT = 363524,
38 AFSVL_EMPTY = 363525,
39 AFSVL_ENTDELETED = 363526,
40 AFSVL_BADNAME = 363527,
41 AFSVL_BADINDEX = 363528,
42 AFSVL_BADVOLTYPE = 363529,
43 AFSVL_BADSERVER = 363530,
44 AFSVL_BADPARTITION = 363531,
45 AFSVL_REPSFULL = 363532,
46 AFSVL_NOREPSERVER = 363533,
47 AFSVL_DUPREPSERVER = 363534,
48 AFSVL_RWNOTFOUND = 363535,
49 AFSVL_BADREFCOUNT = 363536,
50 AFSVL_SIZEEXCEEDED = 363537,
51 AFSVL_BADENTRY = 363538,
52 AFSVL_BADVOLIDBUMP = 363539,
53 AFSVL_IDALREADYHASHED = 363540,
54 AFSVL_ENTRYLOCKED = 363541,
55 AFSVL_BADVOLOPER = 363542,
56 AFSVL_BADRELLOCKTYPE = 363543,
57 AFSVL_RERELEASE = 363544,
58 AFSVL_BADSERVERFLAG = 363545,
59 AFSVL_PERM = 363546,
60 AFSVL_NOMEM = 363547,
61};
62
63enum {
64 YFS_SERVER_INDEX = 0,
65 YFS_SERVER_UUID = 1,
66 YFS_SERVER_ENDPOINT = 2,
67};
68
69enum {
70 YFS_ENDPOINT_IPV4 = 0,
71 YFS_ENDPOINT_IPV6 = 1,
72};
73
74#define YFS_MAXENDPOINTS 16
75
76
77
78
79struct afs_vldbentry {
80 char name[65];
81 afs_voltype_t type;
82 unsigned num_servers;
83 unsigned clone_id;
84
85 unsigned flags;
86#define AFS_VLF_RWEXISTS 0x1000
87#define AFS_VLF_ROEXISTS 0x2000
88#define AFS_VLF_BACKEXISTS 0x4000
89
90 afs_volid_t volume_ids[3];
91
92 struct {
93 struct in_addr addr;
94 unsigned partition;
95 unsigned flags;
96#define AFS_VLSF_NEWREPSITE 0x0001
97#define AFS_VLSF_ROVOL 0x0002
98#define AFS_VLSF_RWVOL 0x0004
99#define AFS_VLSF_BACKVOL 0x0008
100#define AFS_VLSF_UUID 0x0010
101#define AFS_VLSF_DONTUSE 0x0020
102 } servers[8];
103};
104
105#define AFS_VLDB_MAXNAMELEN 65
106
107
108struct afs_ListAddrByAttributes__xdr {
109 __be32 Mask;
110#define AFS_VLADDR_IPADDR 0x1
111#define AFS_VLADDR_INDEX 0x2
112#define AFS_VLADDR_UUID 0x4
113 __be32 ipaddr;
114 __be32 index;
115 __be32 spare;
116 struct afs_uuid__xdr uuid;
117};
118
119struct afs_uvldbentry__xdr {
120 __be32 name[AFS_VLDB_MAXNAMELEN];
121 __be32 nServers;
122 struct afs_uuid__xdr serverNumber[AFS_NMAXNSERVERS];
123 __be32 serverUnique[AFS_NMAXNSERVERS];
124 __be32 serverPartition[AFS_NMAXNSERVERS];
125 __be32 serverFlags[AFS_NMAXNSERVERS];
126 __be32 volumeId[AFS_MAXTYPES];
127 __be32 cloneId;
128 __be32 flags;
129 __be32 spares1;
130 __be32 spares2;
131 __be32 spares3;
132 __be32 spares4;
133 __be32 spares5;
134 __be32 spares6;
135 __be32 spares7;
136 __be32 spares8;
137 __be32 spares9;
138};
139
140struct afs_address_list {
141 refcount_t usage;
142 unsigned int version;
143 unsigned int nr_addrs;
144 struct sockaddr_rxrpc addrs[];
145};
146
147extern void afs_put_address_list(struct afs_address_list *alist);
148
149#endif
150