- int Bflag=0; /* buffer size */
- int jflag=-1; /* packet time stamp source */
- int Oflag=1; /* run filter code optimizer */
- int pflag=0; /* don't go promiscuous */
- netdissect_options *ndo;
-
-#ifdef WIN32
- if(wsockinit() != 0) return 1;
-#endif /* WIN32 */
-
- if((ndo = calloc(1, sizeof(*ndo))) == NULL)
- error("malloc ndo: %s", strerror(errno));
- ndo->ndo_Rflag=1;
- ndo->ndo_dlt=-1;
+ int Bflag = 0; /* buffer size */
+ int jflag = -1; /* packet time stamp source */
+ int Oflag = 1; /* run filter code optimizer */
+ int pflag = 0; /* don't go promiscuous */
+ int yflag_dlt = -1;
+ const char *yflag_dlt_name = NULL;
+
+ netdissect_options Ndo;
+ netdissect_options *ndo = &Ndo;
+ int immediate_mode = 0;
+
+ memset(ndo, 0, sizeof(*ndo));