Deleted Added
sdiff udiff text old ( 17749 ) new ( 56891 )
full compact
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 * @(#) $Header: gencode.h,v 1.36 96/07/17 00:11:34 leres Exp $ (LBL)
22 */
23
24/*XXX*/
25#include "gnuc.h"
26
27/* Address qualifiers. */
28
29#define Q_HOST 1
30#define Q_NET 2
31#define Q_PORT 3
32#define Q_GATEWAY 4
33#define Q_PROTO 5
34
35/* Protocol qualifiers. */
36
37#define Q_LINK 1
38#define Q_IP 2
39#define Q_ARP 3
40#define Q_RARP 4
41#define Q_TCP 5

--- 4 unchanged lines hidden (view full) ---

46
47
48#define Q_ATALK 10
49#define Q_DECNET 11
50#define Q_LAT 12
51#define Q_SCA 13
52#define Q_MOPRC 14
53#define Q_MOPDL 15
54#define Q_ISO 16
55#define Q_ESIS 17
56#define Q_ISIS 18
57
58/* Directional qualifiers. */
59
60#define Q_SRC 1
61#define Q_DST 2
62#define Q_OR 3
63#define Q_AND 4
64
65#define Q_DEFAULT 0
66#define Q_UNDEF 255
67
68struct stmt {
69 int code;
70 bpf_int32 k;
71};
72
73struct slist {
74 struct stmt s;
75 struct slist *next;
76};
77

--- 70 unchanged lines hidden (view full) ---

148
149void gen_and(struct block *, struct block *);
150void gen_or(struct block *, struct block *);
151void gen_not(struct block *);
152
153struct block *gen_scode(const char *, struct qual);
154struct block *gen_ecode(const u_char *, struct qual);
155struct block *gen_mcode(const char *, const char *, int, struct qual);
156struct block *gen_ncode(const char *, bpf_u_int32, struct qual);
157struct block *gen_proto_abbrev(int);
158struct block *gen_relation(int, struct arth *, struct arth *, int);
159struct block *gen_less(int);
160struct block *gen_greater(int);
161struct block *gen_byteop(int, int, int);
162struct block *gen_broadcast(int);
163struct block *gen_multicast(int);

--- 11 unchanged lines hidden (view full) ---

175struct bpf_insn *icode_to_fcode(struct block *, int *);
176int pcap_parse(void);
177void lex_init(char *);
178void sappend(struct slist *, struct slist *);
179
180/* XXX */
181#define JT(b) ((b)->et.succ)
182#define JF(b) ((b)->ef.succ)