gencode.h (146771) | gencode.h (147897) |
---|---|
1/* 2 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 4 unchanged lines hidden (view full) --- 13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 * the University nor the names of its contributors may be used to endorse 15 * or promote products derived from this software without specific prior 16 * written permission. 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 * | 1/* 2 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 4 unchanged lines hidden (view full) --- 13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 * the University nor the names of its contributors may be used to endorse 15 * or promote products derived from this software without specific prior 16 * written permission. 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 * |
21 * $FreeBSD: head/contrib/libpcap/gencode.h 146771 2005-05-29 18:09:04Z sam $ 22 * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.60 2004/06/16 08:20:30 hannes Exp $ (LBL) | 21 * $FreeBSD: head/contrib/libpcap/gencode.h 147897 2005-07-11 03:43:25Z sam $ 22 * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.60.2.5 2005/06/20 21:30:17 guy Exp $ (LBL) |
23 */ 24 25/* 26 * ATM support: 27 * 28 * Copyright (c) 1997 Yen Yen Lim and North Dakota State University 29 * All rights reserved. 30 * --- 20 unchanged lines hidden (view full) --- 51 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 52 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 53 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 54 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 55 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 56 * POSSIBILITY OF SUCH DAMAGE. 57 */ 58 | 23 */ 24 25/* 26 * ATM support: 27 * 28 * Copyright (c) 1997 Yen Yen Lim and North Dakota State University 29 * All rights reserved. 30 * --- 20 unchanged lines hidden (view full) --- 51 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 52 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 53 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 54 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 55 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 56 * POSSIBILITY OF SUCH DAMAGE. 57 */ 58 |
59#ifndef HAVE___ATTRIBUTE__ 60#define __attribute__(x) 61#endif /* HAVE___ATTRIBUTE__ */ 62 |
|
59/* Address qualifiers. */ 60 61#define Q_HOST 1 62#define Q_NET 2 63#define Q_PORT 3 64#define Q_GATEWAY 4 65#define Q_PROTO 5 66#define Q_PROTOCHAIN 6 | 63/* Address qualifiers. */ 64 65#define Q_HOST 1 66#define Q_NET 2 67#define Q_PORT 3 68#define Q_GATEWAY 4 69#define Q_PROTO 5 70#define Q_PROTOCHAIN 6 |
71#define Q_PORTRANGE 7 |
|
67 68/* Protocol qualifiers. */ 69 70#define Q_LINK 1 71#define Q_IP 2 72#define Q_ARP 3 73#define Q_RARP 4 74#define Q_SCTP 5 --- 40 unchanged lines hidden (view full) --- 115#define Q_ISIS_IIH 33 116#define Q_ISIS_LAN_IIH 34 117#define Q_ISIS_PTP_IIH 35 118#define Q_ISIS_SNP 36 119#define Q_ISIS_CSNP 37 120#define Q_ISIS_PSNP 38 121#define Q_ISIS_LSP 39 122 | 72 73/* Protocol qualifiers. */ 74 75#define Q_LINK 1 76#define Q_IP 2 77#define Q_ARP 3 78#define Q_RARP 4 79#define Q_SCTP 5 --- 40 unchanged lines hidden (view full) --- 120#define Q_ISIS_IIH 33 121#define Q_ISIS_LAN_IIH 34 122#define Q_ISIS_PTP_IIH 35 123#define Q_ISIS_SNP 36 124#define Q_ISIS_CSNP 37 125#define Q_ISIS_PSNP 38 126#define Q_ISIS_LSP 39 127 |
128#define Q_RADIO 40 129 |
|
123/* Directional qualifiers. */ 124 125#define Q_SRC 1 126#define Q_DST 2 127#define Q_OR 3 128#define Q_AND 4 129 130#define Q_DEFAULT 0 --- 31 unchanged lines hidden (view full) --- 162 virtual connection */ 163#define A_METACONNECT 71 /* returns Q.2931 signalling messages for 164 establishing and destroying predefined 165 virtual circuits, such as broadcast 166 circuit, oamf4 segment circuit, oamf4 167 end-to-end circuits, ILMI circuits or 168 connection signalling circuit. */ 169 | 130/* Directional qualifiers. */ 131 132#define Q_SRC 1 133#define Q_DST 2 134#define Q_OR 3 135#define Q_AND 4 136 137#define Q_DEFAULT 0 --- 31 unchanged lines hidden (view full) --- 169 virtual connection */ 170#define A_METACONNECT 71 /* returns Q.2931 signalling messages for 171 establishing and destroying predefined 172 virtual circuits, such as broadcast 173 circuit, oamf4 segment circuit, oamf4 174 end-to-end circuits, ILMI circuits or 175 connection signalling circuit. */ 176 |
177/*MTP3 field types */ 178#define M_SIO 1 179#define M_OPC 2 180#define M_DPC 3 181#define M_SLS 4 182 183 |
|
170struct slist; 171 172struct stmt { 173 int code; 174 struct slist *jt; /*only for relative jump in block*/ 175 struct slist *jf; /*only for relative jump in block*/ 176 bpf_int32 k; 177}; --- 93 unchanged lines hidden (view full) --- 271struct block *gen_byteop(int, int, int); 272struct block *gen_broadcast(int); 273struct block *gen_multicast(int); 274struct block *gen_inbound(int); 275 276struct block *gen_vlan(int); 277struct block *gen_mpls(int); 278 | 184struct slist; 185 186struct stmt { 187 int code; 188 struct slist *jt; /*only for relative jump in block*/ 189 struct slist *jf; /*only for relative jump in block*/ 190 bpf_int32 k; 191}; --- 93 unchanged lines hidden (view full) --- 285struct block *gen_byteop(int, int, int); 286struct block *gen_broadcast(int); 287struct block *gen_multicast(int); 288struct block *gen_inbound(int); 289 290struct block *gen_vlan(int); 291struct block *gen_mpls(int); 292 |
279struct block *gen_atmfield_code(int atmfield, bpf_u_int32 jvalue, bpf_u_int32 jtype, int reverse); | 293struct block *gen_atmfield_code(int atmfield, bpf_int32 jvalue, bpf_u_int32 jtype, int reverse); |
280struct block *gen_atmtype_abbrev(int type); 281struct block *gen_atmmulti_abbrev(int type); 282 | 294struct block *gen_atmtype_abbrev(int type); 295struct block *gen_atmmulti_abbrev(int type); 296 |
297struct block *gen_mtp3field_code(int mtp3field, bpf_u_int32 jvalue, bpf_u_int32 jtype, int reverse); 298 |
|
283struct block *gen_pf_ifname(const char *); 284struct block *gen_pf_rnr(int); 285struct block *gen_pf_srnr(int); 286struct block *gen_pf_ruleset(char *); 287struct block *gen_pf_reason(int); 288struct block *gen_pf_action(int); 289struct block *gen_pf_dir(int); 290 291void bpf_optimize(struct block **); 292void bpf_error(const char *, ...) | 299struct block *gen_pf_ifname(const char *); 300struct block *gen_pf_rnr(int); 301struct block *gen_pf_srnr(int); 302struct block *gen_pf_ruleset(char *); 303struct block *gen_pf_reason(int); 304struct block *gen_pf_action(int); 305struct block *gen_pf_dir(int); 306 307void bpf_optimize(struct block **); 308void bpf_error(const char *, ...) |
293#if HAVE___ATTRIBUTE__ 294 __attribute__((noreturn, format (printf, 1, 2))) 295#endif 296; | 309 __attribute__((noreturn, format (printf, 1, 2))); |
297 298void finish_parse(struct block *); 299char *sdup(const char *); 300 301struct bpf_insn *icode_to_fcode(struct block *, int *); 302int pcap_parse(void); 303void lex_init(char *); 304void lex_cleanup(void); 305void sappend(struct slist *, struct slist *); 306 307/* XXX */ 308#define JT(b) ((b)->et.succ) 309#define JF(b) ((b)->ef.succ) 310 311extern int no_optimize; | 310 311void finish_parse(struct block *); 312char *sdup(const char *); 313 314struct bpf_insn *icode_to_fcode(struct block *, int *); 315int pcap_parse(void); 316void lex_init(char *); 317void lex_cleanup(void); 318void sappend(struct slist *, struct slist *); 319 320/* XXX */ 321#define JT(b) ((b)->et.succ) 322#define JF(b) ((b)->ef.succ) 323 324extern int no_optimize; |