source: freewrt/package/libpcap/patches/102-alt-ether.patch@ 428f140

freewrt_1_0 freewrt_2_0
Last change on this file since 428f140 was 475ad56, checked in by Waldemar Brodkorb <wbx@…>, 20 years ago

add OpenWrt trunk revision 3830.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@1 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 1.5 KB
  • nametoaddr.c

    diff -urN libpcap-0.9.4.orig/nametoaddr.c libpcap-0.9.4/nametoaddr.c
    old new  
    410410        e = ep = (u_char *)malloc(6);
    411411
    412412        while (*s) {
    413                 if (*s == ':')
     413                if (*s == ':' || *s == '.')
    414414                        s += 1;
    415415                d = xdtoi(*s++);
    416416                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  
    8080N               ([0-9]+|(0X|0x)[0-9A-Fa-f]+)
    8181B               ([0-9A-Fa-f][0-9A-Fa-f]?)
    8282W               ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?)
     83X               [0-9A-Fa-f]
    8384
    8485%a 16000
    8586%o 19000
     
    306307{N}                     { yylval.i = stoi((char *)yytext); return NUM; }
    307308({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) {
    308309                        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);
    310311                          return EID; }
    311312{V6}                    {
    312313#ifdef INET6
     
    324325#endif /*INET6*/
    325326                        }
    326327{B}:+({B}:+)+           { bpf_error("bogus ethernet address %s", yytext); }
     328{X}{12}                        { yylval.e = pcap_ether_aton((char *)yytext); return EID;}
    327329icmptype                { yylval.i = 0; return NUM; }
    328330icmpcode                { yylval.i = 1; return NUM; }
    329331icmp-echoreply          { yylval.i = 0; return NUM; }
Note: See TracBrowser for help on using the repository browser.