]> git.pld-linux.org Git - packages/libpcap.git/blame - libpcap-scanner.patch
- don't build parser debuging code (tcpdump was fixed to properly detect
[packages/libpcap.git] / libpcap-scanner.patch
CommitLineData
d662860c
AF
1--- libpcap_0_5rel2/nametoaddr.c.wiget Thu Nov 25 09:25:35 1999
2+++ libpcap_0_5rel2/nametoaddr.c Thu Jul 13 16:31:19 2000
3@@ -308,7 +308,7 @@
cdb146fe 4 e = ep = (u_char *)malloc(6);
5
6 while (*s) {
7- if (*s == ':')
8+ if (*s == ':' || *s == '.')
9 s += 1;
10 d = xdtoi(*s++);
11 if (isxdigit(*s)) {
d662860c
AF
12--- libpcap_0_5rel2/scanner.l.wiget Wed Nov 17 05:09:58 1999
13+++ libpcap_0_5rel2/scanner.l Thu Jul 13 16:30:01 2000
14@@ -82,6 +82,7 @@
cdb146fe 15 N ([0-9]+|(0X|0x)[0-9A-Fa-f]+)
16 B ([0-9A-Fa-f][0-9A-Fa-f]?)
d662860c 17 W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?)
cdb146fe 18+X [0-9A-Fa-f]
19
d662860c
AF
20 %a 15000
21 %o 17000
22@@ -235,7 +236,8 @@
cdb146fe 23 {N} { yylval.i = stoi((char *)yytext); return NUM; }
24 ({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) {
25 yylval.s = sdup((char *)yytext); return HID; }
26-{B}:{B}:{B}:{B}:{B}:{B} { yylval.e = pcap_ether_aton((char *)yytext);
27+({B}:{B}:{B}:{B}:{B}:{B})|({B}\.{B}\.{B}\.{B}\.{B}\.{B}) {
28+ yylval.e = pcap_ether_aton((char *)yytext);
29 return EID; }
d662860c
AF
30 {V6} {
31 #ifdef INET6
32@@ -253,6 +255,8 @@
33 #endif /*INET6*/
34 }
cdb146fe 35 {B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); }
36+{X}{12} { yylval.e = pcap_ether_aton((char *)yytext);
37+ return EID; }
38 [A-Za-z0-9][-_.A-Za-z0-9]*[.A-Za-z0-9] {
39 yylval.s = sdup((char *)yytext); return ID; }
40 "\\"[^ !()\n\t]+ { yylval.s = sdup((char *)yytext + 1); return ID; }
This page took 0.037496 seconds and 4 git commands to generate.