-int dflag; /* print filter code */
-int eflag; /* print ethernet header */
-int fflag; /* don't translate "foreign" IP address */
-int Lflag; /* list available data link types and exit */
-int nflag; /* leave addresses as numbers */
-int Nflag; /* remove domains from printed host names */
-int Oflag = 1; /* run filter code optimizer */
-int pflag; /* don't go promiscuous */
-int qflag; /* quick (shorter) output */
-int Rflag = 1; /* print sequence # field in AH/ESP*/
-int sflag = 0; /* use the libsmi to translate OIDs */
-int Sflag; /* print raw TCP sequence numbers */
-int tflag = 1; /* print packet arrival time */
-int Uflag = 0; /* "unbuffered" output of dump files */
-int uflag = 0; /* Print undecoded NFS handles */
-int vflag; /* verbose */
-int xflag; /* print packet in hex */
-int Xflag; /* print packet in ascii as well as hex */
-off_t Cflag = 0; /* rotate dump files after this many bytes */
-int Aflag = 0; /* print packet only in ascii observing LF, CR, TAB, SPACE */
-int dlt = -1; /* if != -1, ask libpcap for the DLT it names */
-
-const char *dlt_name = NULL;
-
-char *espsecret = NULL; /* ESP secret key */
-
-int packettype;
+netdissect_options Gndo;
+netdissect_options *gndo = &Gndo;
+
+/*
+ * Define the maximum number of files for the -C flag, and how many
+ * characters can be added to a filename for the -C flag (which
+ * should be enough to handle MAX_CFLAG - 1).
+ */
+#define MAX_CFLAG 1000000
+#define MAX_CFLAG_CHARS 6
+
+int Lflag; /* list available data link types and exit */