diff options
Diffstat (limited to 'contrib/libpcap/scanner.l')
-rw-r--r-- | contrib/libpcap/scanner.l | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/contrib/libpcap/scanner.l b/contrib/libpcap/scanner.l index 5e2d24e..98c7842 100644 --- a/contrib/libpcap/scanner.l +++ b/contrib/libpcap/scanner.l @@ -22,11 +22,6 @@ * $FreeBSD$ */ -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.112 2008-02-06 10:21:30 guy Exp $ (LBL)"; -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -312,13 +307,20 @@ fisu return FISU; lssu return LSSU; lsu return LSSU; msu return MSU; +hfisu return HFISU; +hlssu return HLSSU; +hmsu return HMSU; sio return SIO; opc return OPC; dpc return DPC; sls return SLS; +hsio return HSIO; +hopc return HOPC; +hdpc return HDPC; +hsls return HSLS; [ \r\n\t] ; -[+\-*/:\[\]!<>()&|=] return yytext[0]; +[+\-*/%:\[\]!<>()&|\^=] return yytext[0]; ">=" return GEQ; "<=" return LEQ; "!=" return NEQ; @@ -326,8 +328,12 @@ sls return SLS; "<<" return LSH; ">>" return RSH; ${B} { yylval.e = pcap_ether_aton(((char *)yytext)+1); + if (yylval.e == NULL) + bpf_error("malloc"); return AID; } {MAC} { yylval.e = pcap_ether_aton((char *)yytext); + if (yylval.e == NULL) + bpf_error("malloc"); return EID; } {N} { yylval.i = stoi((char *)yytext); return NUM; } ({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) { |