1%{
2/*
3 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that: (1) source code distributions
8 * retain the above copyright notice and this paragraph in its entirety, (2)
--- 5 unchanged lines hidden (view full) ---
14 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
15 * the University nor the names of its contributors may be used to endorse
16 * or promote products derived from this software without specific prior
17 * written permission.
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
19 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 *
22 * $FreeBSD: head/contrib/libpcap/scanner.l 146771 2005-05-29 18:09:04Z sam $
23 */
24
25#ifndef lint
26static const char rcsid[] _U_ =
27 "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.99 2004/06/16 08:20:28 hannes Exp $ (LBL)";
28#endif
29
30#ifdef HAVE_CONFIG_H
31#include "config.h"
32#endif
33
34#include <ctype.h>
35#include <string.h>
--- 143 unchanged lines hidden (view full) ---
179sctp return SCTP;
180tcp return TCP;
181udp return UDP;
182icmp return ICMP;
183igmp return IGMP;
184igrp return IGRP;
185pim return PIM;
186vrrp return VRRP;
187
188ip6 {
189#ifdef INET6
190 return IPV6;
191#else
192 bpf_error("%s not supported", yytext);
193#endif
194 }
--- 35 unchanged lines hidden (view full) ---
230ipx return IPX;
231
232netbeui return NETBEUI;
233
234host return HOST;
235net return NET;
236mask return NETMASK;
237port return PORT;
238proto return PROTO;
239protochain {
240#ifdef NO_PROTOCHAIN
241 bpf_error("%s not supported", yytext);
242#else
243 return PROTOCHAIN;
244#endif
245 }
--- 34 unchanged lines hidden (view full) ---
280
281on|ifname return PF_IFNAME;
282rset|ruleset return PF_RSET;
283rnr|rulenum return PF_RNR;
284srnr|subrulenum return PF_SRNR;
285reason return PF_REASON;
286action return PF_ACTION;
287
288[ \r\n\t] ;
289[+\-*/:\[\]!<>()&|=] return yytext[0];
290">=" return GEQ;
291"<=" return LEQ;
292"!=" return NEQ;
293"==" return '=';
294"<<" return LSH;
295">>" return RSH;
--- 127 unchanged lines hidden ---
2/*
3 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that: (1) source code distributions
8 * retain the above copyright notice and this paragraph in its entirety, (2)
--- 5 unchanged lines hidden (view full) ---
14 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
15 * the University nor the names of its contributors may be used to endorse
16 * or promote products derived from this software without specific prior
17 * written permission.
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
19 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 *
22 * $FreeBSD: head/contrib/libpcap/scanner.l 146771 2005-05-29 18:09:04Z sam $
23 */
24
25#ifndef lint
26static const char rcsid[] _U_ =
27 "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.99 2004/06/16 08:20:28 hannes Exp $ (LBL)";
28#endif
29
30#ifdef HAVE_CONFIG_H
31#include "config.h"
32#endif
33
34#include <ctype.h>
35#include <string.h>
--- 143 unchanged lines hidden (view full) ---
179sctp return SCTP;
180tcp return TCP;
181udp return UDP;
182icmp return ICMP;
183igmp return IGMP;
184igrp return IGRP;
185pim return PIM;
186vrrp return VRRP;
187
188ip6 {
189#ifdef INET6
190 return IPV6;
191#else
192 bpf_error("%s not supported", yytext);
193#endif
194 }
--- 35 unchanged lines hidden (view full) ---
230ipx return IPX;
231
232netbeui return NETBEUI;
233
234host return HOST;
235net return NET;
236mask return NETMASK;
237port return PORT;
238proto return PROTO;
239protochain {
240#ifdef NO_PROTOCHAIN
241 bpf_error("%s not supported", yytext);
242#else
243 return PROTOCHAIN;
244#endif
245 }
--- 34 unchanged lines hidden (view full) ---
280
281on|ifname return PF_IFNAME;
282rset|ruleset return PF_RSET;
283rnr|rulenum return PF_RNR;
284srnr|subrulenum return PF_SRNR;
285reason return PF_REASON;
286action return PF_ACTION;
287
288[ \r\n\t] ;
289[+\-*/:\[\]!<>()&|=] return yytext[0];
290">=" return GEQ;
291"<=" return LEQ;
292"!=" return NEQ;
293"==" return '=';
294"<<" return LSH;
295">>" return RSH;
--- 127 unchanged lines hidden ---