#include <pcap-stdinc.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include <setjmp.h>
#include <stdarg.h>
#include "pcap-int.h"
#include "ethertype.h"
#include "nlpid.h"
#include "llc.h"
#include "gencode.h"
#include "atmuni31.h"
#include "sunatmpos.h"
#include "ppp.h"
#include "sll.h"
#include "arcnet.h"
#include <pcap-namedb.h>
Go to the source code of this file.
Data Structures | |
struct | chunk |
Defines | |
#define | ETHERMTU 1500 |
#define | IPPROTO_SCTP 132 |
#define | JMP(c) ((c)|BPF_JMP|BPF_K) |
#define | NCHUNKS 16 |
#define | CHUNK0SIZE 1024 |
#define | SWAPLONG(y) ((((y)&0xff)<<24) | (((y)&0xff00)<<8) | (((y)&0xff0000)>>8) | (((y)>>24)&0xff)) |
#define | IPPROTO_IGMP 2 |
#define | IPPROTO_IGRP 9 |
#define | IPPROTO_PIM 103 |
#define | IPPROTO_VRRP 112 |
#define | IPPROTO_AH 51 |
#define | IPPROTO_ESP 50 |
#define | IPPROTO_NONE 59 |
Functions | |
void | bpf_error (const char *fmt,...) |
void | init_linktype (int) |
int | alloc_reg (void) |
void | free_reg (int) |
void * | newchunk (u_int) |
void | freechunks (void) |
block * | new_block (int) |
slist * | new_stmt (int) |
block * | gen_retblk (int) |
void | syntax (void) |
void | backpatch (struct block *, struct block *) |
void | merge (struct block *, struct block *) |
block * | gen_cmp (u_int, u_int, bpf_int32) |
block * | gen_cmp_gt (u_int, u_int, bpf_int32) |
block * | gen_mcmp (u_int, u_int, bpf_int32, bpf_u_int32) |
block * | gen_bcmp (u_int, u_int, const u_char *) |
block * | gen_ncmp (bpf_u_int32, bpf_u_int32, bpf_u_int32, bpf_u_int32, bpf_u_int32, int) |
block * | gen_uncond (int) |
block * | gen_true (void) |
block * | gen_false (void) |
block * | gen_linktype (int) |
block * | gen_snap (bpf_u_int32, bpf_u_int32, u_int) |
block * | gen_llc (int) |
block * | gen_hostop (bpf_u_int32, bpf_u_int32, int, int, u_int, u_int) |
block * | gen_ahostop (const u_char *, int) |
block * | gen_ehostop (const u_char *, int) |
block * | gen_fhostop (const u_char *, int) |
block * | gen_thostop (const u_char *, int) |
block * | gen_dnhostop (bpf_u_int32, int, u_int) |
block * | gen_host (bpf_u_int32, bpf_u_int32, int, int) |
block * | gen_gateway (const u_char *, bpf_u_int32 **, int, int) |
block * | gen_ipfrag (void) |
block * | gen_portatom (int, bpf_int32) |
block * | gen_portop (int, int, int) |
block * | gen_port (int, int, int) |
int | lookup_proto (const char *, int) |
block * | gen_protochain (int, int, int) |
block * | gen_proto (int, int, int) |
slist * | xfer_to_x (struct arth *) |
slist * | xfer_to_a (struct arth *) |
block * | gen_len (int, int) |
block * | gen_msg_abbrev (int type) |
void * | newchunk (n) u_int n |
int | pcap_compile (pcap_t *p, struct bpf_program *program, char *buf, int optimize, bpf_u_int32 mask) |
Compiles a packet filter. Converts an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine. More... | |
int | pcap_compile_nopcap (int snaplen_arg, int linktype_arg, struct bpf_program *program, char *buf, int optimize, bpf_u_int32 mask) |
Deprecated, use pcap_open_dead() and pcap_compile() instead . Compiles a packet filter without the need of opening an adapter. Converts an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine. More... | |
void | pcap_freecode (struct bpf_program *program) |
Frees a filter. More... | |
void | backpatch (list, target) struct block *list |
void | init_linktype (type) int type |
void | free_reg (n) int n |
block * | gen_broadcast (proto) int proto |
Variables | |
const char | rcsid [] |
jmp_buf | top_ctx |
pcap_t * | bpf_pcap |
u_int | orig_linktype = -1 |
u_int | orig_nl = -1 |
u_int | orig_nl_nosnap = -1 |
int | pcap_fddipad |
block * | root |
chunk | chunks [NCHUNKS] |
int | cur_chunk |
int | snaplen |
int | no_optimize |
void * | target |
* | b1 |
size | |
bpf_int32 | v |
bpf_u_int32 | mask |
offset | |
jtype | |
jvalue | |
int | reverse |
int | is_atm = 0 |
u_int | off_vpi |
u_int | off_vci |
u_int | off_proto |
u_int | off_msg_type |
u_int | off_nl |
u_int | off_nl_nosnap |
int | linktype |
bpf_u_int32 | ptype |
int | dir |
int | proto |
u_int | src_off |
u_int | dst_off |
u_int | base_off |
bpf_u_int32 ** | alist |
int | ip_proto |
qual | q |
* | s2 |
register int | masklen |
* | s1 |
arth * | index |
arth * | a0 |
arth * | a1 |
int | reversed |
int | curreg |
n | |
idx | |
val |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 108 of file gencode.c. References bpf_pcap, PCAP_ERRBUF_SIZE, pcap_geterr, and top_ctx. Referenced by alloc_reg, and pcap_compile. |
|
|
|
|
|
Referenced by pcap_compile. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Referenced by pcap_compile. |
|
|
|
|
|
|
|
|
|
Referenced by pcap_compile. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Referenced by pcap_compile. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 94 of file gencode.c. Referenced by bpf_error, and pcap_compile. |
|
|
|
|
|
Definition at line 3845 of file gencode.c. Referenced by alloc_reg. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 1979 of file gencode.c. Referenced by pcap_compile, pcap_compile_nopcap, and pcap_setmode. |
|
|
|
Definition at line 3880 of file gencode.c. Referenced by alloc_reg. |
|
Definition at line 303 of file gencode.c. Referenced by pcap_compile. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 103 of file gencode.c. Referenced by pcap_open_offline. |
|
|
|
|
|
|
|
Initial value: "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.175 2002/08/06 07:35:46 guy Exp $ (LBL)" |
|
|
|
|
|
Definition at line 127 of file gencode.c. Referenced by pcap_compile. |
|
|
|
|
|
Definition at line 3613 of file gencode.c. Referenced by pcap_sendpacket, pcap_sendqueue_destroy, pcap_setmintocopy, pcap_setmode, and pcap_setuserbuffer. |
|
Definition at line 302 of file gencode.c. Referenced by pcap_compile. |
|
|
|
|
|
Definition at line 93 of file gencode.c. Referenced by bpf_error, and pcap_compile. |
|
|
|
Definition at line 3917 of file gencode.c. Referenced by inet_addrU. |
documentation. Copyright (c) 2002 Politecnico di Torino. All rights reserved.