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