+#define PRNT_AUTO 0x1000
+#define PRNT_V2 0x2000
+#define PRNT_V3 0x4000
+#define PRNT_V4 0x8000
+#define PRNT_ALL 0x0fff
+
+int versions[] = {
+ PRNT_V2,
+ PRNT_V3,
+ PRNT_V4
+};
+
+void usage(char *name)
+{
+ printf("Usage: %s [OPTION]...\n\
+\n\
+ -m, --mounted\t\tShow statistics on mounted NFS filesystems\n\
+ -c, --client\t\tShow NFS client statistics\n\
+ -s, --server\t\tShow NFS server statistics\n\
+ -2\t\t\tShow NFS version 2 statistics\n\
+ -3\t\t\tShow NFS version 3 statistics\n\
+ -4\t\t\tShow NFS version 4 statistics\n\
+ -o [facility]\t\tShow statistics on particular facilities.\n\
+ nfs\tNFS protocol information\n\
+ rpc\tGeneral RPC information\n\
+ net\tNetwork layer statistics\n\
+ fh\t\tUsage information on the server's file handle cache\n\
+ rc\t\tUsage information on the server's request reply cache\n\
+ all\tSelect all of the above\n\
+ -v, --verbose, --all\tSame as '-o all'\n\
+ -r, --rpc\t\tShow RPC statistics\n\
+ -n, --nfs\t\tShow NFS statistics\n\
+ --version\t\tShow program version\n\
+ --help\t\tWhat you just did\n\
+\n", name);
+ exit(0);
+}
+
+static struct option longopts[] =
+{
+ { "acl", 0, 0, 'a' },
+ { "all", 0, 0, 'v' },
+ { "auto", 0, 0, '\3' },
+ { "client", 0, 0, 'c' },
+ { "mounts", 0, 0, 'm' },
+ { "nfs", 0, 0, 'n' },
+ { "rpc", 0, 0, 'r' },
+ { "server", 0, 0, 's' },
+ { "verbose", 0, 0, 'v' },
+ { "zero", 0, 0, 'z' },
+ { "help", 0, 0, '\1' },
+ { "version", 0, 0, '\2' },
+ { NULL, 0, 0, 0 }
+};