replace lots of manual install commands with INSTALL_* variables
[openwrt/svn-archive/archive.git] / package / libpcap / patches / 102-alt-ether.patch
1 diff -urN libpcap-0.9.4.orig/nametoaddr.c libpcap-0.9.4/nametoaddr.c
2 --- libpcap-0.9.4.orig/nametoaddr.c 2005-04-20 13:13:51.000000000 +0200
3 +++ libpcap-0.9.4/nametoaddr.c 2006-02-05 16:58:46.000000000 +0100
4 @@ -410,7 +410,7 @@
5 e = ep = (u_char *)malloc(6);
6
7 while (*s) {
8 - if (*s == ':')
9 + if (*s == ':' || *s == '.')
10 s += 1;
11 d = xdtoi(*s++);
12 if (isxdigit((unsigned char)*s)) {
13 diff -urN libpcap-0.9.4.orig/scanner.l libpcap-0.9.4/scanner.l
14 --- libpcap-0.9.4.orig/scanner.l 2005-09-05 11:08:07.000000000 +0200
15 +++ libpcap-0.9.4/scanner.l 2006-02-05 17:00:13.000000000 +0100
16 @@ -80,6 +80,7 @@
17 N ([0-9]+|(0X|0x)[0-9A-Fa-f]+)
18 B ([0-9A-Fa-f][0-9A-Fa-f]?)
19 W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?)
20 +X [0-9A-Fa-f]
21
22 %a 16000
23 %o 19000
24 @@ -306,7 +307,7 @@
25 {N} { yylval.i = stoi((char *)yytext); return NUM; }
26 ({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) {
27 yylval.s = sdup((char *)yytext); return HID; }
28 -{B}:{B}:{B}:{B}:{B}:{B} { yylval.e = pcap_ether_aton((char *)yytext);
29 +({B}:{B}:{B}:{B}:{B}:{B})|({B}\.{B}\.{B}\.{B}\.{B}\.{B}) { yylval.e = pcap_ether_aton((char *)yytext);
30 return EID; }
31 {V6} {
32 #ifdef INET6
33 @@ -324,6 +325,7 @@
34 #endif /*INET6*/
35 }
36 {B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); }
37 +{X}{12} { yylval.e = pcap_ether_aton((char *)yytext); return EID;}
38 icmptype { yylval.i = 0; return NUM; }
39 icmpcode { yylval.i = 1; return NUM; }
40 icmp-echoreply { yylval.i = 0; return NUM; }