* LF, CR and SPACE as graphical chars
*/
int ndo_dlt; /* if != -1, ask libpcap for the DLT it names */
- int ndo_immediate; /* use immediate mode */
int ndo_Hflag; /* dissect 802.11s draft mesh standard */
int ndo_packet_number; /* print a packet number in the beginning of line */
int pflag=0; /* don't go promiscuous */
netdissect_options Ndo;
netdissect_options *ndo = &Ndo;
+ int immediate_mode = 0;
memset(ndo, 0, sizeof(*ndo));
ndo->ndo_dlt=-1;
ndo_set_function_pointers(ndo);
ndo->ndo_snaplen = DEFAULT_SNAPLEN;
- ndo->ndo_immediate = 0;
cnt = -1;
device = NULL;
#ifdef HAVE_PCAP_SET_IMMEDIATE_MODE
case OPTION_IMMEDIATE_MODE:
- ndo->ndo_immediate = 1;
+ immediate_mode = 1;
break;
#endif
* probably expecting to see packets pop up immediately.
*/
if (WFileName == NULL && isatty(1))
- ndo->ndo_immediate = 1;
+ immediate_mode = 1;
#endif
#ifdef WITH_CHROOT
#endif
#ifdef HAVE_PCAP_SET_IMMEDIATE_MODE
- if (ndo->ndo_immediate) {
+ if (immediate_mode) {
status = pcap_set_immediate_mode(pd, 1);
if (status != 0)
error("%s: Can't set immediate mode: %s",