4 e = ep = (u_char *)malloc(6);
8 + if (*s == ':' || *s == '.')
11 if (isxdigit((unsigned char)*s)) {
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]?)
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}) { yylval.e = pcap_ether_aton((char *)yytext);
34 {B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); }
35 +{X}{12} { yylval.e = pcap_ether_aton((char *)yytext); return EID;}
36 icmptype { yylval.i = 0; return NUM; }
37 icmpcode { yylval.i = 1; return NUM; }
38 icmp-echoreply { yylval.i = 0; return NUM; }