diff options
Diffstat (limited to 'lib/libpcap/gencode.h')
| -rw-r--r-- | lib/libpcap/gencode.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/libpcap/gencode.h b/lib/libpcap/gencode.h index 23487021ca9..dbe45cd908d 100644 --- a/lib/libpcap/gencode.h +++ b/lib/libpcap/gencode.h @@ -1,4 +1,4 @@ -/* $NetBSD: gencode.h,v 1.5 1997/10/03 15:53:06 christos Exp $ */ +/* $NetBSD: gencode.h,v 1.6 1999/07/02 10:05:22 itojun Exp $ */ /* * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 @@ -33,6 +33,7 @@ #define Q_PORT 3 #define Q_GATEWAY 4 #define Q_PROTO 5 +#define Q_PROTOCHAIN 6 /* Protocol qualifiers. */ @@ -54,6 +55,14 @@ #define Q_MOPRC 14 #define Q_MOPDL 15 + +#define Q_IPV6 16 +#define Q_ICMPV6 17 +#define Q_AH 18 +#define Q_ESP 19 + +#define Q_PIM 20 + /* Directional qualifiers. */ #define Q_SRC 1 @@ -64,8 +73,12 @@ #define Q_DEFAULT 0 #define Q_UNDEF 255 +struct slist; + struct stmt { int code; + struct slist *jt; /*only for relative jump in block*/ + struct slist *jf; /*only for relative jump in block*/ bpf_int32 k; }; @@ -149,9 +162,14 @@ void gen_and(struct block *, struct block *); void gen_or(struct block *, struct block *); void gen_not(struct block *); +struct stmt *gen_joinsp __P((struct stmt **, int)); +struct block *gen_protochain __P((int, int, int)); struct block *gen_scode(const char *, struct qual); struct block *gen_ecode(const u_char *, struct qual); struct block *gen_mcode(const char *, const char *, int, struct qual); +#ifdef INET6 +struct block *gen_mcode6(const char *, const char *, int, struct qual); +#endif struct block *gen_ncode(const char *, bpf_u_int32, struct qual); struct block *gen_proto_abbrev(int); struct block *gen_relation(int, struct arth *, struct arth *, int); @@ -179,3 +197,5 @@ void sappend(struct slist *, struct slist *); /* XXX */ #define JT(b) ((b)->et.succ) #define JF(b) ((b)->ef.succ) + +extern int no_optimize; |
