X-Git-Url: https://git.tcpdump.org/libpcap/blobdiff_plain/405ab1a9312c678758897f1da18f0ca961fdede2..refs/heads/libpcap-1.2:/gencode.h diff --git a/gencode.h b/gencode.h index 6b97e892..e8b0593d 100644 --- a/gencode.h +++ b/gencode.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.60 2004-06-16 08:20:30 hannes Exp $ (LBL) + * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.71 2007-11-18 02:03:52 guy Exp $ (LBL) */ /* @@ -55,6 +55,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef HAVE___ATTRIBUTE__ +#define __attribute__(x) +#endif /* HAVE___ATTRIBUTE__ */ + /* Address qualifiers. */ #define Q_HOST 1 @@ -63,6 +67,7 @@ #define Q_GATEWAY 4 #define Q_PROTO 5 #define Q_PROTOCHAIN 6 +#define Q_PORTRANGE 7 /* Protocol qualifiers. */ @@ -119,12 +124,22 @@ #define Q_ISIS_PSNP 38 #define Q_ISIS_LSP 39 +#define Q_RADIO 40 + +#define Q_CARP 41 + /* Directional qualifiers. */ #define Q_SRC 1 #define Q_DST 2 #define Q_OR 3 #define Q_AND 4 +#define Q_ADDR1 5 +#define Q_ADDR2 6 +#define Q_ADDR3 7 +#define Q_ADDR4 8 +#define Q_RA 9 +#define Q_TA 10 #define Q_DEFAULT 0 #define Q_UNDEF 255 @@ -166,6 +181,18 @@ end-to-end circuits, ILMI circuits or connection signalling circuit. */ +/* MTP2 types */ +#define M_FISU 22 /* FISU */ +#define M_LSSU 23 /* LSSU */ +#define M_MSU 24 /* MSU */ + +/* MTP3 field types */ +#define M_SIO 1 +#define M_OPC 2 +#define M_DPC 3 +#define M_SLS 4 + + struct slist; struct stmt { @@ -275,10 +302,16 @@ struct block *gen_inbound(int); struct block *gen_vlan(int); struct block *gen_mpls(int); -struct block *gen_atmfield_code(int atmfield, bpf_u_int32 jvalue, bpf_u_int32 jtype, int reverse); +struct block *gen_pppoed(void); +struct block *gen_pppoes(void); + +struct block *gen_atmfield_code(int atmfield, bpf_int32 jvalue, bpf_u_int32 jtype, int reverse); struct block *gen_atmtype_abbrev(int type); struct block *gen_atmmulti_abbrev(int type); +struct block *gen_mtp2type_abbrev(int type); +struct block *gen_mtp3field_code(int mtp3field, bpf_u_int32 jvalue, bpf_u_int32 jtype, int reverse); + struct block *gen_pf_ifname(const char *); struct block *gen_pf_rnr(int); struct block *gen_pf_srnr(int); @@ -287,19 +320,19 @@ struct block *gen_pf_reason(int); struct block *gen_pf_action(int); struct block *gen_pf_dir(int); +struct block *gen_p80211_type(int, int); +struct block *gen_p80211_fcdir(int); + void bpf_optimize(struct block **); void bpf_error(const char *, ...) -#if HAVE___ATTRIBUTE__ - __attribute__((noreturn, format (printf, 1, 2))) -#endif -; + __attribute__((noreturn, format (printf, 1, 2))); void finish_parse(struct block *); char *sdup(const char *); struct bpf_insn *icode_to_fcode(struct block *, int *); int pcap_parse(void); -void lex_init(char *); +void lex_init(const char *); void lex_cleanup(void); void sappend(struct slist *, struct slist *);