]> git.pld-linux.org Git - packages/libpcap.git/blob - libpcap-scanner.patch
updated to cvs20001217
[packages/libpcap.git] / libpcap-scanner.patch
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 @@
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)) {
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 @@
15  N              ([0-9]+|(0X|0x)[0-9A-Fa-f]+)
16  B              ([0-9A-Fa-f][0-9A-Fa-f]?)
17  W              ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?)
18 +X              [0-9A-Fa-f]
19  
20  %a 15000
21  %o 17000
22 @@ -235,7 +236,8 @@
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; }
30  {V6}                   {
31  #ifdef INET6
32 @@ -253,6 +255,8 @@
33  #endif /*INET6*/
34                         }
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.07158 seconds and 3 git commands to generate.