diff options
author | fenner <fenner@FreeBSD.org> | 2002-06-21 01:36:27 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 2002-06-21 01:36:27 +0000 |
commit | 1e8ea467791f99f6068888787c27fd8b6b923d2c (patch) | |
tree | 4bf19d614b784f03cdea171c65cf7b2e9f63715c /contrib/libpcap/grammar.y | |
parent | a6bce8883c0f9dd7fee0eb03667f57b40b1d9dab (diff) | |
download | FreeBSD-src-1e8ea467791f99f6068888787c27fd8b6b923d2c.zip FreeBSD-src-1e8ea467791f99f6068888787c27fd8b6b923d2c.tar.gz |
Import libpcap 0.7.1, from
http://www.tcpdump.org/release/libpcap-0.7.1.tar.gz
Diffstat (limited to 'contrib/libpcap/grammar.y')
-rw-r--r-- | contrib/libpcap/grammar.y | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/contrib/libpcap/grammar.y b/contrib/libpcap/grammar.y index 570d571..e978de4 100644 --- a/contrib/libpcap/grammar.y +++ b/contrib/libpcap/grammar.y @@ -22,7 +22,7 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/grammar.y,v 1.64 2000/10/28 10:18:40 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/grammar.y,v 1.71 2001/07/03 19:15:48 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -106,21 +106,25 @@ pcap_parse() %token DST SRC HOST GATEWAY %token NET MASK PORT LESS GREATER PROTO PROTOCHAIN BYTE -%token ARP RARP IP TCP UDP ICMP IGMP IGRP PIM +%token ARP RARP IP SCTP TCP UDP ICMP IGMP IGRP PIM VRRP %token ATALK AARP DECNET LAT SCA MOPRC MOPDL %token TK_BROADCAST TK_MULTICAST %token NUM INBOUND OUTBOUND %token LINK %token GEQ LEQ NEQ -%token ID EID HID HID6 +%token ID EID HID HID6 AID %token LSH RSH %token LEN %token IPV6 ICMPV6 AH ESP %token VLAN %token ISO ESIS ISIS CLNP +%token STP +%token IPX +%token NETBEUI %type <s> ID %type <e> EID +%type <e> AID %type <s> HID HID6 %type <i> NUM @@ -184,7 +188,24 @@ nid: ID { $$.b = gen_scode($1, $$.q = $<blk>0.q); } "in this configuration"); #endif /*INET6*/ } - | EID { $$.b = gen_ecode($1, $$.q = $<blk>0.q); } + | EID { + $$.b = gen_ecode($1, $$.q = $<blk>0.q); + /* + * $1 was allocated by "pcap_ether_aton()", + * so we must free it now that we're done + * with it. + */ + free($1); + } + | AID { + $$.b = gen_acode($1, $$.q = $<blk>0.q); + /* + * $1 was allocated by "pcap_ether_aton()", + * so we must free it now that we're done + * with it. + */ + free($1); + } | not id { gen_not($2.b); $$ = $2; } ; not: '!' { $$ = $<blk>0; } @@ -242,12 +263,14 @@ pname: LINK { $$ = Q_LINK; } | IP { $$ = Q_IP; } | ARP { $$ = Q_ARP; } | RARP { $$ = Q_RARP; } + | SCTP { $$ = Q_SCTP; } | TCP { $$ = Q_TCP; } | UDP { $$ = Q_UDP; } | ICMP { $$ = Q_ICMP; } | IGMP { $$ = Q_IGMP; } | IGRP { $$ = Q_IGRP; } | PIM { $$ = Q_PIM; } + | VRRP { $$ = Q_VRRP; } | ATALK { $$ = Q_ATALK; } | AARP { $$ = Q_AARP; } | DECNET { $$ = Q_DECNET; } @@ -263,6 +286,9 @@ pname: LINK { $$ = Q_LINK; } | ESIS { $$ = Q_ESIS; } | ISIS { $$ = Q_ISIS; } | CLNP { $$ = Q_CLNP; } + | STP { $$ = Q_STP; } + | IPX { $$ = Q_IPX; } + | NETBEUI { $$ = Q_NETBEUI; } ; other: pqual TK_BROADCAST { $$ = gen_broadcast($1); } | pqual TK_MULTICAST { $$ = gen_multicast($1); } |