DECL_PIOCTL(PPrefetchFromTape);
DECL_PIOCTL(PResidencyCmd);
DECL_PIOCTL(PCallBackAddr);
+DECL_PIOCTL(PDiscon);
/*
* A macro that says whether we're going to need HandleClientContext().
PNewAlias, /* 1 -- create new cell alias */
PListAliases, /* 2 -- list cell aliases */
PCallBackAddr, /* 3 -- request addr for callback rxcon */
+ PBogus, /* 4 */
+ PDiscon, /* 5 -- get/set discon mode */
};
#define PSetClientContext 99 /* Special pioctl to setup caller's creds */
#endif /* UKERNEL */
return 0;
}
+
+DECL_PIOCTL(PDiscon)
+{
+#ifdef AFS_DISCON_ENV
+ static afs_int32 mode;
+
+ if (ainSize == sizeof(afs_int32)) {
+ memcpy(&mode, ain, sizeof(afs_int32));
+
+ /* 3 is magic, should be a #define. */
+ afs_SetCheckServerNATmode(mode == 3);
+ } else if (ainSize != 0) {
+ return EINVAL;
+ }
+
+ /* Return new mode */
+ memcpy(aout, &mode, sizeof(afs_int32));
+ *aoutSize = sizeof(struct VenusFid);
+ return 0;
+#else
+ return EINVAL;
+#endif
+}
struct AFS_UCRED *acred,
afs_size_t asparm0, afs_size_t asparm1,
void *apparm0);
+extern void afs_SetCheckServerNATmode(int isnat);
extern void afs_CheckServerDaemon(void);
extern int afs_CheckRootVolume(void);
extern void afs_BRelease(register struct brequest *ab);