File: fragment.h

package info (click to toggle)
lsfcc 0.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 324 kB
  • ctags: 217
  • sloc: ansic: 1,551; yacc: 408; sh: 337; lex: 85; makefile: 55
file content (29 lines) | stat: -rw-r--r-- 945 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef H_FRAGMENT
#define H_FRAGMENT

#include <sys/time.h>
#include <net/bpf.h>

struct fragment {
	struct bpf_insn *insns;				/* array of instructions */
	int numinsns;									/* number of instructions */
	int *true, *false;						/* arrays of offsets of fixups for
																	 true and false branches */
	int numtrue, numfalse;				/* lengths of offset arrays */
	int *ftrue, *tfalse;					/* arrays of offsets of fixups for
																	 true and false branches that aren't */
	int numftrue, numtfalse;
};

struct fragment *frag_new();
void frag_free(struct fragment *);
void frag_fixupt(struct fragment *, int);
void frag_fixupf(struct fragment *, int);
void frag_append(struct fragment *, struct fragment *);
void frag_add(struct fragment *, struct bpf_insn *);
void frag_sett(struct fragment *);
void frag_setf(struct fragment *);
void frag_setft(struct fragment *);
void frag_settf(struct fragment *);

#endif /* !H_FRAGMENT */