extern struct hostent *hostutil_GetHostByName();
+static int print_ctime = 0;
+
static int
PrintCacheConfig(struct rx_connection *aconn)
{
}
printf(" %12d bytes DV %12d refcnt %5d\n", centry.Length,
centry.DataVersion, centry.refCount);
- printf(" callback %08x\texpires %u\n", centry.callback,
- centry.cbExpires);
+ if (print_ctime) {
+ time_t t = centry.cbExpires;
+ printf(" callback %08x\texpires %s\n", centry.callback,
+ ctime(&t));
+ } else
+ printf(" callback %08x\texpires %u\n", centry.callback,
+ centry.cbExpires);
printf(" %d opens\t%d writers\n", centry.opens, centry.writers);
/* now display states */
printf(" %12d bytes DV %12d refcnt %5d\n", centry.Length,
centry.DataVersion, centry.refCount);
#endif
- printf(" callback %08x\texpires %u\n", centry.callback,
- centry.cbExpires);
+ if (print_ctime) {
+ time_t t = centry.cbExpires;
+ printf(" callback %08x\texpires %s\n", centry.callback,
+ ctime(&t));
+ } else
+ printf(" callback %08x\texpires %u\n", centry.callback,
+ centry.cbExpires);
printf(" %d opens\t%d writers\n", centry.opens, centry.writers);
/* now display states */
PrintCacheConfig(conn);
return 0;
}
+
+ if (as->parms[7].items)
+ print_ctime = 1;
+
if (as->parms[2].items)
/* -long */
int32p = 1;
"print only host interfaces");
cmd_AddParm(ts, "-cache", CMD_FLAG, CMD_OPTIONAL,
"print only cache configuration");
+ cmd_AddParm(ts, "-ctime", CMD_FLAG, CMD_OPTIONAL,
+ "print human readable expiration time");
cmd_Dispatch(argc, argv);
exit(0);