Lines 1-28
Link Here
|
1 |
--- ngrep.c.orig Mon Jun 26 12:52:50 2000 |
1 |
--- ngrep.c.orig Wed Aug 8 23:36:09 2001 |
2 |
+++ ngrep.c Sat Aug 26 17:34:40 2000 |
2 |
+++ ngrep.c Wed Aug 8 23:36:31 2001 |
3 |
@@ -48,6 +48,7 @@ |
3 |
@@ -62,6 +62,7 @@ |
4 |
#include "regex.h" |
4 |
|
5 |
#include "ngrep.h" |
5 |
#include "ngrep.h" |
6 |
|
6 |
|
7 |
+extern FILE *yyin; |
7 |
+extern FILE *yyin; |
8 |
|
8 |
|
9 |
static char rcsver[] = "$Revision: 1.3 $"; |
9 |
static char rcsver[] = "$Revision: 1.18 $"; |
10 |
|
10 |
|
11 |
@@ -196,7 +197,7 @@ |
11 |
@@ -232,7 +233,7 @@ |
12 |
free(filter); |
|
|
13 |
filter = get_filter(&argv[optind-1]); |
12 |
filter = get_filter(&argv[optind-1]); |
14 |
|
13 |
|
|
|
14 |
#ifdef NEED_RESTART |
15 |
- PCAP_RESTART(); |
15 |
- PCAP_RESTART(); |
16 |
+ PCAP_RESTART(yyin); |
16 |
+ PCAP_RESTART(yyin); |
|
|
17 |
#endif |
17 |
if (pcap_compile(pd, &pcapfilter, filter, 0, mask.s_addr)) { |
18 |
if (pcap_compile(pd, &pcapfilter, filter, 0, mask.s_addr)) { |
18 |
pcap_perror(pd, "pcap compile"); |
19 |
pcap_perror(pd, "pcap compile"); |
19 |
clean_exit(-1); |
|
|
20 |
@@ -653,7 +654,7 @@ |
21 |
struct tm *t = localtime(&h->ts.tv_sec); |
22 |
|
23 |
printf("%02d/%02d/%02d %02d:%02d:%02d.%06d ", |
24 |
- t->tm_year+1900, t->tm_mon, t->tm_mday, t->tm_hour, |
25 |
+ t->tm_year+1900, t->tm_mon+1, t->tm_mday, t->tm_hour, |
26 |
t->tm_min, t->tm_sec, h->ts.tv_usec); |
27 |
} |
28 |
|