source:
freewrt/package/libpcap/patches/102-alt-ether.patch@
428f140
| Last change on this file since 428f140 was 475ad56, checked in by , 20 years ago | |
|---|---|
|
|
| File size: 1.5 KB | |
-
nametoaddr.c
diff -urN libpcap-0.9.4.orig/nametoaddr.c libpcap-0.9.4/nametoaddr.c
old new 410 410 e = ep = (u_char *)malloc(6); 411 411 412 412 while (*s) { 413 if (*s == ':' )413 if (*s == ':' || *s == '.') 414 414 s += 1; 415 415 d = xdtoi(*s++); 416 416 if (isxdigit((unsigned char)*s)) { -
libpcap-0.9.4
diff -urN libpcap-0.9.4.orig/scanner.l libpcap-0.9.4/scanner.l
old new 80 80 N ([0-9]+|(0X|0x)[0-9A-Fa-f]+) 81 81 B ([0-9A-Fa-f][0-9A-Fa-f]?) 82 82 W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?) 83 X [0-9A-Fa-f] 83 84 84 85 %a 16000 85 86 %o 19000 … … 306 307 {N} { yylval.i = stoi((char *)yytext); return NUM; } 307 308 ({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) { 308 309 yylval.s = sdup((char *)yytext); return HID; } 309 {B}:{B}:{B}:{B}:{B}:{B}{ yylval.e = pcap_ether_aton((char *)yytext);310 ({B}:{B}:{B}:{B}:{B}:{B})|({B}\.{B}\.{B}\.{B}\.{B}\.{B}) { yylval.e = pcap_ether_aton((char *)yytext); 310 311 return EID; } 311 312 {V6} { 312 313 #ifdef INET6 … … 324 325 #endif /*INET6*/ 325 326 } 326 327 {B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); } 328 {X}{12} { yylval.e = pcap_ether_aton((char *)yytext); return EID;} 327 329 icmptype { yylval.i = 0; return NUM; } 328 330 icmpcode { yylval.i = 1; return NUM; } 329 331 icmp-echoreply { yylval.i = 0; return NUM; }
Note:
See TracBrowser
for help on using the repository browser.
