#include <fcntl.h>
#include <sys/select.h>
#include <sys/stat.h>
+#include <netdb.h>
#include <afs/param.h>
#include <afs/afsint.h>
afs_int32 srvbuf[MAXHOSTS];
int code;
+ if (!strncmp(path, "@afs:", 5)) {
+ char *pdup, *p, *host, *id;
+ struct hostent *he;
+
+ pdup = strdup(path);
+ strtok(pdup, ":");
+
+ if (!(p = strtok(NULL, ":"))) {
+ free(pdup);
+ return -1;
+ }
+ strncpy(cellname, p, MAXCELLCHARS);
+
+ if (!(p = strtok(NULL, ":"))) {
+ free(pdup);
+ return -1;
+ }
+ he = gethostbyname(p);
+ if (!he) {
+ printf("Unknown host %s\n", p);
+ free(pdup);
+ return -1;
+ }
+ memcpy(server, he->h_addr, he->h_length);
+
+ if (!(p = strtok(NULL, ":"))) {
+ free(pdup);
+ return -1;
+ }
+ f->Volume = atoi(p);
+
+ if (!(p = strtok(NULL, ":"))) {
+ free(pdup);
+ return -1;
+ }
+ f->Vnode = atoi(p);
+
+ if (!(p = strtok(NULL, ":"))) {
+ free(pdup);
+ return -1;
+ }
+ f->Unique = atoi(p);
+
+ if (strtok(NULL, ":")) {
+ printf("Too much extra stuff after @afs:...\n");
+ free(pdup);
+ return -1;
+ }
+
+ return 0;
+ }
+
v.in = 0;
v.in_size = 0;
v.out = cellname;
case 'o':
dlcl = 1;
break;
- case 'a':
+ case 'u':
unauth = 1;
break;
default:
+ printf("Unknown option '%c'\n", ch);
exit(1);
}
}
fprintf(stderr, " -i Source is local (copy into AFS)\n");
fprintf(stderr, " -o Dest is local (copy out of AFS)\n");
fprintf(stderr, " -u Run unauthenticated\n");
+ fprintf(stderr, "source and dest can be paths or specified as:\n");
+ fprintf(stderr, " @afs:cellname:servername:volume:vnode:uniq\n");
exit(1);
}
srcf = argv[optind++];
#include <afs/param.h>
-#include <fsint/afscbint.h> /*Callback interface defs */
+#include <afs/afscbint.h> /*Callback interface defs */
int afs_cb_inited = 0;
struct interfaceAddr afs_cb_interface;
static int
afs_int32
-SRXAFSCB_GetCE(rxcall)
+SRXAFSCB_GetCE(rxcall, index, ce)
struct rx_call *rxcall;
-
+ afs_int32 index;
+ AFSDBCacheEntry * ce;
{ /*SRXAFSCB_GetCE */
return (0);
} /*SRXAFSCB_GetCE */
afs_int32
-SRXAFSCB_GetCE64(rxcall)
+SRXAFSCB_GetCE64(rxcall, index, ce)
struct rx_call *rxcall;
-
+ afs_int32 index;
+ AFSDBCacheEntry64 *ce;
{ /*SRXAFSCB_GetCE64 */
return (0);
} /*SRXAFSCB_GetCE64 */
afs_int32
-SRXAFSCB_GetLock(rxcall)
+SRXAFSCB_GetLock(rxcall, index, lock)
struct rx_call *rxcall;
-
+ afs_int32 index;
+ AFSDBLock *lock;
{ /*SRXAFSCB_GetLock */
return (0);
} /*SRXAFSCB_GetLock */
afs_int32
-SRXAFSCB_XStatsVersion(rxcall)
+SRXAFSCB_XStatsVersion(rxcall, v)
struct rx_call *rxcall;
-
+ afs_int32 *v;
{ /*SRXAFSCB_XStatsVersion */
return (0);
} /*SRXAFSCB_XStatsVersion */
afs_int32
-SRXAFSCB_GetXStats(rxcall)
+SRXAFSCB_GetXStats(rxcall, clientVersionNumber, collectionNumber, srvVersionNumberP, timeP, dataP)
struct rx_call *rxcall;
-
+ afs_int32 clientVersionNumber;
+ afs_int32 collectionNumber;
+ afs_int32 * srvVersionNumberP;
+ afs_int32 * timeP;
+ AFSCB_CollData * dataP;
{ /*SRXAFSCB_GetXStats */
return (0);
} /*SRXAFSCB_GetXStats */
SRXAFSCB_GetCellServDB(rxcall, cellIndex, cellName, cellHosts)
struct rx_call *rxcall;
afs_int32 cellIndex;
- char *cellName;
- afs_int32 *cellHosts;
+ char **cellName;
+ serverList *cellHosts;
{
return RXGEN_OPCODE;
}
afs_int32
SRXAFSCB_GetLocalCell(rxcall, cellName)
struct rx_call *rxcall;
- char *cellName;
+ char **cellName;
{
return RXGEN_OPCODE;
}
{
return RXGEN_OPCODE;
}
+
+afs_int32
+SRXAFSCB_GetCellByNum(rxcall, cellnum, cellname, cellhosts)
+ struct rx_call *rxcall;
+ afs_int32 cellnum;
+ char **cellname;
+ serverList *cellhosts;
+{
+ return RXGEN_OPCODE;
+}
+
+afs_int32
+SRXAFSCB_TellMeAboutYourself(rxcall, addr, cap)
+ struct rx_call *rxcall;
+ struct interfaceAddr *addr;
+ Capabilities *cap;
+{
+ return RXGEN_OPCODE;
+}