1- /* Volume Location Service client interface
1+ /* AFS Volume Location Service client interface
22 *
3- * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
3+ * Copyright (C) 2002, 2007 Red Hat, Inc. All Rights Reserved.
44 * Written by David Howells ([email protected] ) 55 *
66 * This program is free software; you can redistribute it and/or
99 * 2 of the License, or (at your option) any later version.
1010 */
1111
12- #ifndef AFS_VLCLIENT_H
13- #define AFS_VLCLIENT_H
12+ #ifndef AFS_VL_H
13+ #define AFS_VL_H
1414
15- #include "types.h"
15+ #include "afs.h"
16+
17+ #define AFS_VL_PORT 7003 /* volume location service port */
18+ #define VL_SERVICE 52 /* RxRPC service ID for the Volume Location service */
19+
20+ enum AFSVL_Operations {
21+ VLGETENTRYBYID = 503 , /* AFS Get Cache Entry By ID operation ID */
22+ VLGETENTRYBYNAME = 504 , /* AFS Get Cache Entry By Name operation ID */
23+ VLPROBE = 514 , /* AFS Probe Volume Location Service operation ID */
24+ };
1625
1726enum AFSVL_Errors {
1827 AFSVL_IDEXIST = 363520 , /* Volume Id entry exists in vl database */
@@ -40,14 +49,16 @@ enum AFSVL_Errors {
4049 AFSVL_BADVOLOPER = 363542 , /* Bad volume operation code */
4150 AFSVL_BADRELLOCKTYPE = 363543 , /* Bad release lock type */
4251 AFSVL_RERELEASE = 363544 , /* Status report: last release was aborted */
43- AFSVL_BADSERVERFLAG = 363545 , /* Invalid replication site server °ag */
52+ AFSVL_BADSERVERFLAG = 363545 , /* Invalid replication site server °ag */
4453 AFSVL_PERM = 363546 , /* No permission access */
4554 AFSVL_NOMEM = 363547 , /* malloc/realloc failed to alloc enough memory */
4655};
4756
48- /* maps to "struct vldbentry" in vvl-spec.pdf */
57+ /*
58+ * maps to "struct vldbentry" in vvl-spec.pdf
59+ */
4960struct afs_vldbentry {
50- char name [65 ]; /* name of volume (including NUL char) */
61+ char name [65 ]; /* name of volume (with NUL char) */
5162 afs_voltype_t type ; /* volume type */
5263 unsigned num_servers ; /* num servers that hold instances of this vol */
5364 unsigned clone_id ; /* cloning ID */
@@ -70,16 +81,4 @@ struct afs_vldbentry {
7081 } servers [8 ];
7182};
7283
73- extern int afs_rxvl_get_entry_by_name (struct afs_server * , const char * ,
74- unsigned , struct afs_cache_vlocation * );
75- extern int afs_rxvl_get_entry_by_id (struct afs_server * , afs_volid_t ,
76- afs_voltype_t ,
77- struct afs_cache_vlocation * );
78-
79- extern int afs_rxvl_get_entry_by_id_async (struct afs_async_op * ,
80- afs_volid_t , afs_voltype_t );
81-
82- extern int afs_rxvl_get_entry_by_id_async2 (struct afs_async_op * ,
83- struct afs_cache_vlocation * );
84-
85- #endif /* AFS_VLCLIENT_H */
84+ #endif /* AFS_VL_H */
0 commit comments